Documentation ¶
Index ¶
- Constants
- type ChannelRules
- type MemberRecord
- type Opt
- type RelationManagerPostgres
- func (rm *RelationManagerPostgres) AddMembers(members []*bursary.MemberEntry, upstream string) error
- func (rm *RelationManagerPostgres) ChangePath(mid string, newPath []string) error
- func (rm *RelationManagerPostgres) ChangePathByUpstream(upstream string, newPath []string) error
- func (rm *RelationManagerPostgres) Close() error
- func (rm *RelationManagerPostgres) DeleteMembers(mids []string) error
- func (rm *RelationManagerPostgres) GetMember(mid string) (*bursary.Member, error)
- func (rm *RelationManagerPostgres) GetPath(mid string) ([]string, error)
- func (rm *RelationManagerPostgres) GetUpstreams(mid string) ([]*bursary.Member, error)
- func (rm *RelationManagerPostgres) Init() error
- func (rm *RelationManagerPostgres) ListMembers(upstream string, cond *bursary.Condition) ([]*bursary.Member, error)
- func (rm *RelationManagerPostgres) MoveMembers(mids []string, upstream string) error
- func (rm *RelationManagerPostgres) RemoveChannel(channel string) error
- func (rm *RelationManagerPostgres) RemoveChannelRule(mid string, channel string) error
- func (rm *RelationManagerPostgres) UpdateChannelRule(mid string, channel string, rule *bursary.Rule) error
- type Rule
Constants ¶
View Source
const RootNode = "00000000-0000-0000-0000-000000000000"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelRules ¶
func (*ChannelRules) Scan ¶
func (cr *ChannelRules) Scan(src interface{}) error
type MemberRecord ¶
type MemberRecord struct { ID string `db:"id"` ChannelRules ChannelRules `db:"channel_rules"` RelationPath pq.StringArray `db:"relation_path"` Upstream string `db:"upstream"` CreatedAt time.Time `db:"created_at"` }
func (*MemberRecord) ToMemberObject ¶
func (mr *MemberRecord) ToMemberObject() *bursary.Member
type RelationManagerPostgres ¶
type RelationManagerPostgres struct {
// contains filtered or unexported fields
}
func NewRelationManagerPostgres ¶
func NewRelationManagerPostgres(opts ...Opt) *RelationManagerPostgres
func (*RelationManagerPostgres) AddMembers ¶
func (rm *RelationManagerPostgres) AddMembers(members []*bursary.MemberEntry, upstream string) error
func (*RelationManagerPostgres) ChangePath ¶
func (rm *RelationManagerPostgres) ChangePath(mid string, newPath []string) error
func (*RelationManagerPostgres) ChangePathByUpstream ¶
func (rm *RelationManagerPostgres) ChangePathByUpstream(upstream string, newPath []string) error
func (*RelationManagerPostgres) Close ¶
func (rm *RelationManagerPostgres) Close() error
func (*RelationManagerPostgres) DeleteMembers ¶
func (rm *RelationManagerPostgres) DeleteMembers(mids []string) error
func (*RelationManagerPostgres) GetMember ¶
func (rm *RelationManagerPostgres) GetMember(mid string) (*bursary.Member, error)
func (*RelationManagerPostgres) GetPath ¶
func (rm *RelationManagerPostgres) GetPath(mid string) ([]string, error)
func (*RelationManagerPostgres) GetUpstreams ¶
func (rm *RelationManagerPostgres) GetUpstreams(mid string) ([]*bursary.Member, error)
func (*RelationManagerPostgres) Init ¶
func (rm *RelationManagerPostgres) Init() error
func (*RelationManagerPostgres) ListMembers ¶
func (*RelationManagerPostgres) MoveMembers ¶
func (rm *RelationManagerPostgres) MoveMembers(mids []string, upstream string) error
func (*RelationManagerPostgres) RemoveChannel ¶
func (rm *RelationManagerPostgres) RemoveChannel(channel string) error
func (*RelationManagerPostgres) RemoveChannelRule ¶
func (rm *RelationManagerPostgres) RemoveChannelRule(mid string, channel string) error
func (*RelationManagerPostgres) UpdateChannelRule ¶
Click to show internal directories.
Click to hide internal directories.