Documentation
¶
Index ¶
- Variables
- type History
- type Permission
- type RouteMatcher
- type Rule
- type RuleValue
- type Service
- type Session
- func (s *Session) Add(obj *schema.Session)
- func (s *Session) AddAndSave(obj *schema.Session)
- func (s *Session) Del(key string)
- func (s *Session) Get(key string) *schema.Session
- func (s *Session) List(user string) <-chan *schema.Session
- func (s *Session) Load(file string) error
- func (s *Session) Mod(obj *schema.Session)
- func (s *Session) Save() error
- type Users
- func (u *Users) Add(v *schema.User) error
- func (u *Users) Del(name string) error
- func (u *Users) Get(name string) (schema.User, bool)
- func (u *Users) List() <-chan *schema.User
- func (u *Users) Load(file string) error
- func (u *Users) Save() error
- func (u *Users) SetPass(name, old, new string) (schema.User, bool)
- type Zone
Constants ¶
This section is empty.
Variables ¶
View Source
var SERVICE = Service{ Zone: &Zone{ Host: make(map[string]*schema.Host, 32), }, Users: &Users{ Users: make(map[string]*schema.User, 32), }, Permission: &Permission{ Guest: RouteMatcher{ Match: make([]Rule, 0, 32), }, }, History: &History{ History: make([]*schema.History, 0, 128), }, Session: &Session{ Session: make(map[string]*schema.Session, 12), }, Done: make(chan bool), Ticker: time.NewTicker(2 * time.Second), }
Functions ¶
This section is empty.
Types ¶
type Permission ¶
type Permission struct {
Guest RouteMatcher `json:"guest"`
}
func (*Permission) Load ¶
func (p *Permission) Load(file string) error
type RouteMatcher ¶
type RouteMatcher struct {
Match []Rule
}
func (*RouteMatcher) Add ¶
func (r *RouteMatcher) Add(m Rule)
type Service ¶
type Session ¶ added in v0.9.1
type Session struct {
Lock sync.RWMutex
File string
Session map[string]*schema.Session `json:"session"`
}
func (*Session) AddAndSave ¶ added in v0.9.1
Click to show internal directories.
Click to hide internal directories.