Documentation
¶
Index ¶
Constants ¶
View Source
const SYSTEM_USER string = "system"
Variables ¶
View Source
var PUBLIC_ROLES = []Role{ ROLE_ADMIN, }
Functions ¶
func IsPrivateRole ¶
Types ¶
type ClientData ¶
type ClientData struct {
Owner string `json:"username"`
Timestamp int64 `json:"timestamp"`
Transient string `json:"transient"`
Persistent string `json:"persistent"`
Collections string `json:"collections"`
Modified int64 `json:"modified"`
}
func NewClientData ¶
func NewClientData(owner, transient, persistent, collections string) *ClientData
func (ClientData) PersistenceId ¶
func (r ClientData) PersistenceId() string
type RepositorySession ¶
type RepositorySessionData ¶
type RepositorySessionData interface {
Find(owner string) (*ClientData, bool)
Insert(data *ClientData) *ClientData
Update(data *ClientData) (*ClientData, bool)
Delete(data *ClientData) *ClientData
}
type Session ¶
type Session struct {
Username string `json:"username"`
Lock bool `json:"lock"`
Secret []byte `json:"secret"`
Timestamp int64 `json:"timestamp"`
Publisher string `json:"publisher"`
Count int `json:"count"`
Refresh string `json:"refresh"`
Roles []Role `json:"roles"`
}
func (Session) IsNotVerified ¶
func (Session) IsVerified ¶
Click to show internal directories.
Click to hide internal directories.