Documentation ¶
Index ¶
- Constants
- func ErrInvalidPath(s string) error
- func ErrInvalidValue(v interface{}) error
- func GroupIdFromPath(s string) (string, error)
- func GroupIdFromURL(s string) (string, error)
- func UsernameFromPath(s string) (string, error)
- func UsernameFromURL(s string) (string, error)
- type Group
- func (g *Group) AddGroup(sg *Group, merge bool) (*Group, error)
- func (g *Group) AddNode(sg Node, merge bool) (Node, error)
- func (g *Group) GetObjectsURL() string
- func (g *Group) GroupsAll() []*Group
- func (g *Group) HasNodes() bool
- func (g *Group) Id() string
- func (e *Group) Library() *Library
- func (e *Group) Lock() bool
- func (g *Group) Name() string
- func (g *Group) Nodes() []Node
- func (e *Group) OnError(g Node, err error)
- func (e *Group) OnNewNode(g Node)
- func (e *Group) OnNodeUpdate(g Node, field string, before, after interface{})
- func (g *Group) Parent() Node
- func (g *Group) Path() string
- func (g *Group) SetName(name string)
- func (g *Group) Type() NodeType
- func (e *Group) Unlock()
- func (g *Group) User() *User
- type Grouper
- type Id
- func (w *Id) Int() (int, bool)
- func (a Id) Lt(b Id) bool
- func (w Id) MarshalJSON() ([]byte, error)
- func (w Id) MarshalYAML() (interface{}, error)
- func (w *Id) Ok() bool
- func (w *Id) SetFromString(s string) bool
- func (w *Id) SetInt(n int) bool
- func (w *Id) SetString(s string) bool
- func (w *Id) String() string
- func (w *Id) UnmarshalJSON(data []byte) error
- func (w *Id) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (w *Id) Value() (interface{}, bool)
- type Library
- func (w *Library) AddUser(u *User, merge bool) (*User, error)
- func (w *Library) GetGroup(id string) (*Group, error)
- func (w *Library) GetUser(user string) (*User, error)
- func (w *Library) Groups() []string
- func (w *Library) Keys(typ NodeType) []string
- func (w *Library) OnError(g Node, err error)
- func (w *Library) OnNewNode(g Node)
- func (w *Library) OnNodeUpdate(g Node, field string, before, after interface{})
- func (w *Library) SetEvents(ev LibraryEvents)
- func (w *Library) Users() []string
- type LibraryEvents
- type Node
- type NodeType
- type Object
- type Store
- type Tribe
- func (g *Tribe) AddGroup(sg *Group, merge bool) (*Group, error)
- func (g *Tribe) AddNode(sg Node, merge bool) (Node, error)
- func (g *Tribe) GroupsAll() []*Group
- func (g *Tribe) HasNodes() bool
- func (g *Tribe) Id() string
- func (e *Tribe) Library() *Library
- func (e *Tribe) Lock() bool
- func (g *Tribe) Name() string
- func (g *Tribe) Nodes() []Node
- func (e *Tribe) OnError(g Node, err error)
- func (e *Tribe) OnNewNode(g Node)
- func (e *Tribe) OnNodeUpdate(g Node, field string, before, after interface{})
- func (g *Tribe) Parent() Node
- func (g *Tribe) Path() string
- func (g *Tribe) Type() NodeType
- func (e *Tribe) Unlock()
- func (g *Tribe) User() *User
- type User
- func (u *User) AddGroup(g *Group, merge bool) (*Group, error)
- func (u *User) AddNode(g Node, merge bool) (Node, error)
- func (u *User) AddTribe(g *Tribe, merge bool) (*Tribe, error)
- func (u *User) GetSharedGroupsURL() string
- func (u *User) GroupsAll() []*Group
- func (u *User) HasNodes() bool
- func (u *User) Id() string
- func (e *User) Library() *Library
- func (e *User) Lock() bool
- func (u *User) Name() string
- func (u *User) Nodes() []Node
- func (e *User) OnError(g Node, err error)
- func (e *User) OnNewNode(g Node)
- func (e *User) OnNodeUpdate(g Node, field string, before, after interface{})
- func (u *User) Parent() Node
- func (u *User) Path() string
- func (u *User) SetName(name string)
- func (u *User) Type() NodeType
- func (e *User) Unlock()
- func (u *User) User() *User
Constants ¶
View Source
const ( GroupNode NodeType = iota ObjectNode UserNode TribeNode NodeTypes int = 4 )
Each NodeType is an independent ID namespace
Variables ¶
This section is empty.
Functions ¶
func ErrInvalidPath ¶
func ErrInvalidValue ¶
func ErrInvalidValue(v interface{}) error
func GroupIdFromPath ¶
GroupIdFromPath() attempts to extract the group Id from a URL.Path
func GroupIdFromURL ¶
GroupIdFromURL() attempts to extract the group Id from a URL
func UsernameFromPath ¶
UsernameFromPath() attempts to extract the username from a URL.Path
func UsernameFromURL ¶
UsernameFromURL() attempts to extract the username from a URL
Types ¶
type Group ¶
type Group struct { NextGroupObjectsUpdate time.Time `json:"-"` Objects []*Object `json:",omitempty"` Groups []*Group `json:",omitempty"` // contains filtered or unexported fields }
func (*Group) GetObjectsURL ¶
func (*Group) OnNodeUpdate ¶
type Id ¶
type Id struct {
// contains filtered or unexported fields
}
func (Id) MarshalJSON ¶
func (Id) MarshalYAML ¶
func (*Id) SetFromString ¶
func (*Id) UnmarshalJSON ¶
func (*Id) UnmarshalYAML ¶
type Library ¶
type Library struct {
// contains filtered or unexported fields
}
func (*Library) OnNodeUpdate ¶
func (*Library) SetEvents ¶
func (w *Library) SetEvents(ev LibraryEvents)
type LibraryEvents ¶
type Tribe ¶
func (*Tribe) OnNodeUpdate ¶
type User ¶
type User struct { Avatar string `json:",omitempty"` Groups []*Group `json:",omitempty"` Tribes []*Tribe `json:",omitempty"` // contains filtered or unexported fields }
func (*User) GetSharedGroupsURL ¶
func (*User) OnNodeUpdate ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.