Documentation
¶
Overview ¶
Package rpc ...
Package rpc ...
Package rpc ...
Package rpc ...
Index ¶
- type Account
- func (a *Account) Create(ctx context.Context, req *accountproto.CreateAccountRequest, ...) error
- func (a *Account) Delete(ctx context.Context, req *accountproto.DeleteAccountRequest, ...) error
- func (a *Account) GetAccount(ctx context.Context, req *accountproto.GetAccountRequest, ...) error
- func (a *Account) GetAccountServices(ctx context.Context, req *accountproto.AccountRequest, ...) error
- func (a *Account) GetAllAccounts(ctx context.Context, req *accountproto.AccountRequest, ...) error
- func (a *Account) Update(ctx context.Context, req *accountproto.UpdateAccountRequest, ...) error
- type Auth
- type Role
- func (r *Role) CreateRole(ctx context.Context, req *roleproto.RoleRequest, resp *roleproto.RoleResponse) error
- func (r *Role) DeleteRole(ctx context.Context, req *roleproto.DeleteRoleRequest, ...) error
- func (r *Role) GetAllRoles(ctx context.Context, req *roleproto.GetRoleRequest, ...) error
- func (r *Role) GetRole(ctx context.Context, req *roleproto.GetRoleRequest, ...) error
- func (r *Role) UpdateRole(ctx context.Context, req *roleproto.UpdateRoleRequest, ...) error
- type Session
- func (s *Session) CreateSession(ctx context.Context, req *sessionproto.SessionCreateRequest, ...) error
- func (s *Session) DeleteSession(ctx context.Context, req *sessionproto.SessionRequest, ...) error
- func (s *Session) GetAllActiveSessions(ctx context.Context, req *sessionproto.SessionRequest, ...) error
- func (s *Session) GetSession(ctx context.Context, req *sessionproto.SessionRequest, ...) error
- func (s *Session) GetSessionService(ctx context.Context, req *sessionproto.SessionRequest, ...) error
- func (s *Session) GetSessionUserName(ctx context.Context, req *sessionproto.SessionRequest, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct{}
Account struct helps to register service
func (*Account) Create ¶
func (a *Account) Create(ctx context.Context, req *accountproto.CreateAccountRequest, resp *accountproto.AccountResponse) error
Create defines the operations which handles the RPC request response for the create account service of account-session micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the util-lib package. The function also checks for the session time out of the token which is present in the request.
func (*Account) Delete ¶
func (a *Account) Delete(ctx context.Context, req *accountproto.DeleteAccountRequest, resp *accountproto.AccountResponse) error
Delete defines the operations which handles the RPC request response for the delete of a particular account service of account-session micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the util-lib package. The function also checks for the session time out of the token which is present in the request.
func (*Account) GetAccount ¶
func (a *Account) GetAccount(ctx context.Context, req *accountproto.GetAccountRequest, resp *accountproto.AccountResponse) error
GetAccount defines the operations which handles the RPC request response for the view of a particular account service of account-session micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the util-lib package. The function also checks for the session time out of the token which is present in the request.
func (*Account) GetAccountServices ¶
func (a *Account) GetAccountServices(ctx context.Context, req *accountproto.AccountRequest, resp *accountproto.AccountResponse) error
GetAccountServices defines the operations which handles the RPC request response for checking the availability of account-session micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the util-lib package. The function also checks for the session time out of the token which is present in the request.
func (*Account) GetAllAccounts ¶
func (a *Account) GetAllAccounts(ctx context.Context, req *accountproto.AccountRequest, resp *accountproto.AccountResponse) error
GetAllAccounts defines the operations which handles the RPC request response for the list all account service of account-session micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the util-lib package. The function also checks for the session time out of the token which is present in the request.
func (*Account) Update ¶
func (a *Account) Update(ctx context.Context, req *accountproto.UpdateAccountRequest, resp *accountproto.AccountResponse) error
Update defines the operations which handles the RPC request response for the update of a particular account service of account-session micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the util-lib package. The function also checks for the session time out of the token which is present in the request.
type Auth ¶
type Auth struct{}
Auth struct helps to register service
func (*Auth) IsAuthorized ¶
func (a *Auth) IsAuthorized(ctx context.Context, req *authproto.AuthRequest, resp *authproto.AuthResponse) error
IsAuthorized will accepts the request and send a request to Auth method from session package, if its authorized then respond with the status code.
type Role ¶
type Role struct { }
Role struct helps to register service
func (*Role) CreateRole ¶
func (r *Role) CreateRole(ctx context.Context, req *roleproto.RoleRequest, resp *roleproto.RoleResponse) error
CreateRole defines the operations which handles the RPC request response for the create role of account-session micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the util-lib package. The function also checks for the session time out of the token which is present in the request.
func (*Role) DeleteRole ¶
func (r *Role) DeleteRole(ctx context.Context, req *roleproto.DeleteRoleRequest, resp *roleproto.RoleResponse) error
DeleteRole handles the RPC call from the client
func (*Role) GetAllRoles ¶
func (r *Role) GetAllRoles(ctx context.Context, req *roleproto.GetRoleRequest, resp *roleproto.RoleResponse) error
GetAllRoles defines the operations which handles the RPC request response for the list all roles of account-session micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the util-lib package. The function also checks for the session time out of the token which is present in the request.
func (*Role) GetRole ¶
func (r *Role) GetRole(ctx context.Context, req *roleproto.GetRoleRequest, resp *roleproto.RoleResponse) error
GetRole defines the operations which handles the RPC request response for the view of a role of account-session micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the util-lib package. The function also checks for the session time out of the token which is present in the request.
func (*Role) UpdateRole ¶
func (r *Role) UpdateRole(ctx context.Context, req *roleproto.UpdateRoleRequest, resp *roleproto.RoleResponse) error
UpdateRole defines the operations which handles the RPC request response for the update of a particular role of account-session micro service. The functionality retrives the request and return backs the response to RPC according to the protoc file defined in the util-lib package. The function also checks for the session time out of the token which is present in the request.
type Session ¶
type Session struct{}
Session struct helps to register service
func (*Session) CreateSession ¶
func (s *Session) CreateSession(ctx context.Context, req *sessionproto.SessionCreateRequest, resp *sessionproto.SessionCreateResponse) error
CreateSession is a rpc call to create session and It will check the credentials of user, if user is authorized then create session for the same
func (*Session) DeleteSession ¶
func (s *Session) DeleteSession(ctx context.Context, req *sessionproto.SessionRequest, resp *sessionproto.SessionResponse) error
DeleteSession is a rpc call to delete session It will get all the session tokens from the db and from the session token get the session details if session id is matched with recieved session id ten delete the session
func (*Session) GetAllActiveSessions ¶
func (s *Session) GetAllActiveSessions(ctx context.Context, req *sessionproto.SessionRequest, resp *sessionproto.SessionResponse) error
GetAllActiveSessions is a rpc call to get all active sessions This method will accepts the sessionrequest which has session id and session token and it will call GetAllActiveSessions from the session package and respond all the sessionresponse values along with error if there is.
func (*Session) GetSession ¶
func (s *Session) GetSession(ctx context.Context, req *sessionproto.SessionRequest, resp *sessionproto.SessionResponse) error
GetSession is a rpc call to get session It will get all the session tokens from the db and from the session token get the session details if session id is matched with recieved session id then delete the session
func (*Session) GetSessionService ¶
func (s *Session) GetSessionService(ctx context.Context, req *sessionproto.SessionRequest, resp *sessionproto.SessionResponse) error
GetSessionService is a rpc call to get session service which basically checks if the session service is enabled or not
func (*Session) GetSessionUserName ¶
func (s *Session) GetSessionUserName(ctx context.Context, req *sessionproto.SessionRequest, resp *sessionproto.SessionUserName) error
GetSessionUserName is a rpc call to get session username It will get all the session username from the session