Documentation
¶
Overview ¶
DO NOT EDIT! Code generated by ffjson <https://github.com/pquerna/ffjson> source: ./session.go DO NOT EDIT! Ups ... it's edited ...
Index ¶
Constants ¶
View Source
const ( AUTH_LEVEL_IGNORE authLevel = iota + 1 // we don't need the user in this handler AUTH_LEVEL_CHECK // prefetch user, doesn't matter if not logged in AUTH_LEVEL_LOGIN_WAIT // user required, 412 if not available AUTH_LEVEL_LOGIN // user required, 401 if not available AUTH_LEVEL_ADMIN // admin required, 401 if no user, 403 if not admin )
View Source
const ( PEM_CERT string = "cert.pem" PEM_KEY string = "key.pem" RD_DIST_DIR string = "responsive-dashboard/dist/" DEFAULT_TLS_SESSION_CACHE_CAPACITY int = 128 )
View Source
const ( USER_PASSWORD_LENGTH = 24 USER_RECOVERY_CODE_LENGTH = 30 USER_DB_COLLECTION_NAME = "users" USER_ROOT = "administrator" )
View Source
const (
TOKEN_EXPIRY = 60 // minutes
)
Variables ¶
This section is empty.
Functions ¶
func GetAllUsers ¶
func GetAllUsers(db rucksackdb.RDBIF) (*userModelCollection, error)
GetAllUsers returns a user collection with empty passwords
func NewUserModel ¶
func NewUserModel(userName string) *userModel
needed in auth when user tries to login
Types ¶
type PicnicApp ¶
type PicnicApp struct { ListenAddress string PemDir string // contains filtered or unexported fields }
func NewPicnicApp ¶
la = listen address, pd = pemDir, lo = logger
func (*PicnicApp) GetListenAddress ¶
func (*PicnicApp) GetSessionManager ¶
func (p *PicnicApp) GetSessionManager() SessionManagerIf
type SessionInfo ¶
Basic user session info
func (*SessionInfo) MarshalJSON ¶
func (mj *SessionInfo) MarshalJSON() ([]byte, error)
func (*SessionInfo) MarshalJSONBuf ¶
func (mj *SessionInfo) MarshalJSONBuf(buf *bytes.Buffer) error
type SystemInfo ¶
func (*SystemInfo) MarshalJSON ¶
func (mj *SystemInfo) MarshalJSON() ([]byte, error)
func (*SystemInfo) MarshalJSONBuf ¶
func (mj *SystemInfo) MarshalJSONBuf(buf *bytes.Buffer) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.