Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRandomID ¶
GetRandomID returns a string representing the requested number of random bytes in Base16. Depends on the existence of /dev/urandom which makes it Linux-specific.
Types ¶
type Connection ¶
type Connection struct { ID string SessionID string Name string Created int64 // contains filtered or unexported fields }
Connection comprises all of the information about a particular member of a Session.
type RolldModel ¶
type RolldModel struct {
// contains filtered or unexported fields
}
RolldModel encapsulates information about the backing store database.
func NewModel ¶
func NewModel(db *manageddb.ManagedDB) *RolldModel
NewModel create a new RolldModel instance.
func (*RolldModel) GetSession ¶
func (model *RolldModel) GetSession(sessionID string) (*Session, error)
GetSession retrieves Session information from the database.
func (*RolldModel) NewSession ¶
func (model *RolldModel) NewSession(connectionCount int) Session
NewSession adds a new Session to the database.
type Session ¶
type Session struct { ID string ConnectionCount int Created int64 // contains filtered or unexported fields }
Session comprises all of the information about a particular instance of users together.
func (Session) AddConnection ¶
func (session Session) AddConnection(name string) (*Connection, error)
AddConnection creates and associates a new Connection with a given Session.
func (Session) GetConnection ¶
func (session Session) GetConnection(id string) (*Connection, error)
GetConnection retrieves Connection information from the database.