Documentation ¶
Overview ¶
Code generated by go generate forge model v0.2.0. DO NOT EDIT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct { SessionID string `` /* 130-byte string literal not displayed */ Userid string `model:"userid,VARCHAR(31) NOT NULL;index" query:"userid,deleq,userid"` KeyHash string `model:"keyhash,VARCHAR(127) NOT NULL" query:"keyhash"` Time int64 `model:"time,BIGINT NOT NULL" query:"time,getgroupeq,userid"` IPAddr string `model:"ipaddr,VARCHAR(63)" query:"ipaddr"` UserAgent string `model:"user_agent,VARCHAR(1023)" query:"user_agent"` }
Model is the db User session model
type Repo ¶
type Repo interface { New(userid, ipaddr, useragent string) (*Model, string, error) ValidateKey(key string, m *Model) (bool, error) RehashKey(m *Model) (string, error) GetByID(sessionid string) (*Model, error) GetUserSessions(userid string, limit, offset int) ([]Model, error) GetUserSessionIDs(userid string, limit, offset int) ([]string, error) Insert(m *Model) error Update(m *Model) error Delete(m *Model) error DeleteSessions(sessionids []string) error DeleteUserSessions(userid string) error Setup() error }
Click to show internal directories.
Click to hide internal directories.