Documentation
¶
Index ¶
- Constants
- Variables
- func AddGroups(gs []string) error
- func AddPassword(us string, pw string) error
- func AddUsers(us []string)
- func AddUsersToGroups(gs []string, us []string) error
- func AuthUser(us string, p string, r *http.Request) bool
- func BucketList(p string) []string
- func CloseInstance()
- func DateBucket(p string, d string) storm.Node
- func DelGroups(gs []string) error
- func DelStatus(sT StatusS)
- func DelUsers(us []string)
- func DelUsersFromGroups(gs []string, us []string) error
- func Find(field string, value interface{}, to interface{}) error
- func GetAll(d interface{}) error
- func GetAllByIndex(field string, d interface{}) error
- func GetAllStatusBuckets() []string
- func InitStatus()
- func IsAdmin(user string) bool
- func IsSelf(me, user string) bool
- func ModifyGroups(gs []GroupS) error
- func One(field string, value interface{}, to interface{}) error
- func UserInGroup(g GroupS, u UserS) bool
- type DataS
- type Database
- type GroupS
- type StatusS
- type UserS
Constants ¶
View Source
const DFMT = "2006-01-02"
Variables ¶
View Source
var DStamp = time.Now().UTC().Format(DFMT)
Functions ¶
func AddPassword ¶
func AddUsersToGroups ¶
func BucketList ¶
There is no way with storm to get a list of all buckets. This uses a direct Bolt view to get the list
func CloseInstance ¶
func CloseInstance()
func DelUsersFromGroups ¶
func GetAllByIndex ¶
func GetAllStatusBuckets ¶
func GetAllStatusBuckets() []string
func InitStatus ¶
func InitStatus()
func ModifyGroups ¶
func UserInGroup ¶
Types ¶
type Database ¶
func GetInstance ¶
func GetInstance() *Database
type GroupS ¶
type GroupS struct {
ID int `json:"id"`
Name string `json:"name" storm:"index,unique"`
Members []UserS `json:"members,omitempty"`
}
func ListGroups ¶
func RemoveGroup ¶
type StatusS ¶
type StatusS struct {
ID int `json:"id"`
Date string `json:"date" storm:"index"`
Status string `json:"status"`
User UserS `json:"user" storm:"index"`
}
func GetAllStatusByDate ¶
Click to show internal directories.
Click to hide internal directories.