Documentation
¶
Index ¶
- Constants
- Variables
- func Import(r io.Reader, s *Effects) error
- type Effect
- type Effects
- func (s *Effects) Add(parent int, parentVersion int, user string, version string) (int, error)
- func (s *Effects) AddEffect(e Effect) error
- func (s *Effects) AddVersion(id int, code string) (int, error)
- func (s *Effects) Effect(id int) (Effect, error)
- func (s *Effects) Hide(id int, hidden bool) error
- func (s *Effects) Page(num int, size int, hidden bool) ([]Effect, error)
- func (s *Effects) PageSiblings(num int, size int, parent int) ([]Effect, error)
- type JSONDate
- type JSONEffect
- type JSONVersion
- type Role
- type User
- type Users
- type Version
Constants ¶
View Source
const ( RoleAdmin = "admin" RoleModerator = "moderator" RoleUser = "user" )
Variables ¶
View Source
var (
ErrNotFound = fmt.Errorf("not found")
)
Functions ¶
Types ¶
type Effect ¶
type Effects ¶
type Effects struct {
// contains filtered or unexported fields
}
type JSONEffect ¶
type JSONEffect struct {
ID int `json:"_id"`
CreatedAt JSONDate `json:"created_at"`
ImageURL string `json:"image_url"`
ModifiedAt JSONDate `json:"modified_at"`
Parent int `json:"parent"`
ParentVersion int `json:"parent_version"`
User string `json:"user"`
Hidden bool `json:"hidden"`
Versions []JSONVersion `json:"versions"`
}
JSONEffect contains the BSON dump structure.
type JSONVersion ¶
Click to show internal directories.
Click to hide internal directories.