Documentation ¶
Overview ¶
Package session ...
Package session ...
Package session ...
Package session ...
Index ¶
- func CreateNewSession(req *sessionproto.SessionCreateRequest) (response.RPC, string)
- func DeleteSession(req *sessionproto.SessionRequest) response.RPC
- func GetAllActiveSessions(req *sessionproto.SessionRequest) response.RPC
- func GetSession(req *sessionproto.SessionRequest) response.RPC
- func GetSessionService(req *sessionproto.SessionRequest) response.RPC
- func GetSessionUserName(req *sessionproto.SessionRequest, resp *sessionproto.SessionUserName) error
- func UpdateLastUsedTime(token string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNewSession ¶
func CreateNewSession(req *sessionproto.SessionCreateRequest) (response.RPC, string)
CreateNewSession is a method to to create a session it will accepts the SessionCreateRequest which will have username and password and check whether the credentials are correct also it will check privileges. and then add the session details in DB respond RPC response and error if there is.
func DeleteSession ¶
func DeleteSession(req *sessionproto.SessionRequest) response.RPC
DeleteSession is a method to delete a sessiom it will accepts the SessionCreateRequest which will have sessionid and sessiontoken and it will check privileges to delete session and then delete the session respond RPC response and error if there is.
func GetAllActiveSessions ¶
func GetAllActiveSessions(req *sessionproto.SessionRequest) response.RPC
GetAllActiveSessions is a method to get session it will accepts the SessionCreateRequest which will have sessionid and sessiontoken and it will check privileges to get session and then get all the active sessions respond RPC response and error if there is.
func GetSession ¶
func GetSession(req *sessionproto.SessionRequest) response.RPC
GetSession is a method to get session it will accepts the SessionCreateRequest which will have sessionid and sessiontoken and it will check privileges to get session and then get the session against the sessionID respond RPC response and error if there is.
func GetSessionService ¶
func GetSessionService(req *sessionproto.SessionRequest) response.RPC
GetSessionService is a method to get session it will accepts the SessionCreateRequest which will have sessionid and sessiontoken and it will check the session service is enabled or not from the config file. respond RPC response and error if there are.
func GetSessionUserName ¶
func GetSessionUserName(req *sessionproto.SessionRequest, resp *sessionproto.SessionUserName) error
GetSessionUserName is a RPC handle to get the session username from the session Token
func UpdateLastUsedTime ¶
UpdateLastUsedTime is supposed to be used whenever there is a session usage. The function is for updating the last used time of a session, so that the active sessions won't time out and expire. As the input of the function we are passing the session token. As return, function give backs the error, if any.
Types ¶
This section is empty.