Documentation ¶
Index ¶
- func StartUbadgeServer(log *zap.Logger, isTest bool, pwd string, dbOpt *common.DBOptions, ...)
- func StartUgroupServer(log *zap.Logger, isTest bool, pwd string, dbOpt *common.DBOptions, ...)
- func StartUserServer(log *zap.Logger, isTest bool, pwd string, dbOpt *common.DBOptions, ...)
- type CustomClaims
- type Roles
- type UbadgeService
- func (u *UbadgeService) AddUserToGroup(ctx context.Context, in *userproto.UbadgeUserRequest) (*commonproto.Empty, error)
- func (u *UbadgeService) CreateUbadge(ctx context.Context, in *userproto.CreateUbadgeRequest) (*userproto.Ubadge, error)
- func (u *UbadgeService) DeleteUbadge(ctx context.Context, in *commonproto.GetRequest) (*commonproto.Empty, error)
- func (u *UbadgeService) DeleteUserFromGroup(ctx context.Context, in *userproto.UbadgeUserRequest) (*commonproto.Empty, error)
- func (u *UbadgeService) GetUbadge(ctx context.Context, in *commonproto.GetRequest) (*userproto.Ubadge, error)
- func (u *UbadgeService) GetUbadgeUsers(ctx context.Context, in *commonproto.GetRequest) (*userproto.Ubadge, error)
- func (u *UbadgeService) GetUbadges(ctx context.Context, in *userproto.GetUbadgesRequest) (*userproto.UbadgeCursor, error)
- func (u *UbadgeService) UpdateUbadge(ctx context.Context, in *userproto.UpdateUbadgeRequest) (*commonproto.Empty, error)
- type UgroupService
- func (u *UgroupService) AddUserToGroup(ctx context.Context, in *userproto.UgroupUserRequest) (*commonproto.Empty, error)
- func (u *UgroupService) CreateChild(ctx context.Context, in *userproto.CreateUgroupRequest) (*userproto.Ugroup, error)
- func (u *UgroupService) CreateUgroup(ctx context.Context, in *userproto.CreateUgroupRequest) (*userproto.Ugroup, error)
- func (u *UgroupService) DeleteUgroup(ctx context.Context, in *commonproto.GetRequest) (*commonproto.Empty, error)
- func (u *UgroupService) DeleteUserFromGroup(ctx context.Context, in *userproto.UgroupUserRequest) (*commonproto.Empty, error)
- func (u *UgroupService) GetChildUgroups(ctx context.Context, in *commonproto.GetRequest) (*userproto.Ugroups, error)
- func (u *UgroupService) GetParent(ctx context.Context, in *commonproto.GetRequest) (*userproto.Ugroup, error)
- func (u *UgroupService) GetUgroup(ctx context.Context, in *commonproto.GetRequest) (*userproto.Ugroup, error)
- func (u *UgroupService) GetUgroupByPk(ctx context.Context, in *commonproto.GetByIdRequest) (*userproto.Ugroup, error)
- func (u *UgroupService) GetUgroupUsers(ctx context.Context, in *commonproto.GetRequest) (*userproto.Ugroup, error)
- func (u *UgroupService) GetUgroups(ctx context.Context, in *userproto.GetUgroupsRequest) (*userproto.UgroupCursor, error)
- func (u *UgroupService) TopLevelUgroups(ctx context.Context, in *userproto.TopLevelUgroupsRequest) (*userproto.Ugroups, error)
- func (u *UgroupService) UpdateUgroup(ctx context.Context, in *userproto.UpdateUgroupRequest) (*commonproto.Empty, error)
- type UserService
- func (u *UserService) ChangeEmail(ctx context.Context, in *userproto.ChangeEmailRequest) (*commonproto.Empty, error)
- func (u *UserService) ChangePassword(ctx context.Context, in *userproto.PasswordRequest) (*commonproto.Empty, error)
- func (u *UserService) CheckAuthorisation(ctx context.Context, in *userproto.ContextDataRequest) error
- func (u *UserService) ConfirmChangeEmail(ctx context.Context, in *userproto.ConfirmTokenRequest) (*commonproto.Empty, error)
- func (u *UserService) ConfirmEmail(ctx context.Context, in *userproto.ConfirmTokenRequest) (*commonproto.Empty, error)
- func (u *UserService) ConfirmForgotPassword(ctx context.Context, in *userproto.PasswordRequest) (*commonproto.Empty, error)
- func (u *UserService) CreateUser(ctx context.Context, form *userproto.CreateUserRequest) (*userproto.User, error)
- func (u *UserService) DeleteUser(ctx context.Context, in *commonproto.GetRequest) (*commonproto.Empty, error)
- func (u *UserService) ForgotPassword(ctx context.Context, in *userproto.ForgotPasswordRequest) (*commonproto.Empty, error)
- func (u *UserService) GetAuthUserDetails(ctx context.Context, in *userproto.ContextDataRequest) (*userproto.ContextData, error)
- func (u *UserService) GetUser(ctx context.Context, in *commonproto.GetRequest) (*userproto.User, error)
- func (u *UserService) GetUserByEmail(ctx context.Context, in *userproto.GetUserByEmailRequest) (*userproto.User, error)
- func (u *UserService) GetUsers(ctx context.Context, in *userproto.GetUsersRequest) (*userproto.UserCursor, error)
- func (u *UserService) Login(ctx context.Context, form *userproto.LoginRequest) (*userproto.User, error)
- func (u *UserService) UpdateUser(ctx context.Context, in *userproto.UpdateUserRequest) (*commonproto.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartUbadgeServer ¶
func StartUbadgeServer(log *zap.Logger, isTest bool, pwd string, dbOpt *common.DBOptions, redisOpt *common.RedisOptions, mailerOpt *common.MailerOptions, grpcServerOpt *common.GrpcServerOptions, jwtOpt *common.JWTOptions, oauthOpt *common.OauthOptions, userOpt *common.UserOptions, jaegerTracerOpt *common.JaegerTracerOptions, promOpt *common.PromOptions, elasticOpt *common.ElasticOptions, roleOpt *common.RoleOptions, dbService *common.DBService, redisService *common.RedisService, mailerService common.MailerIntf)
StartUbadgeServer - Start Ubadge Server
func StartUgroupServer ¶
func StartUgroupServer(log *zap.Logger, isTest bool, pwd string, dbOpt *common.DBOptions, redisOpt *common.RedisOptions, mailerOpt *common.MailerOptions, grpcServerOpt *common.GrpcServerOptions, jwtOpt *common.JWTOptions, oauthOpt *common.OauthOptions, userOpt *common.UserOptions, jaegerTracerOpt *common.JaegerTracerOptions, promOpt *common.PromOptions, elasticOpt *common.ElasticOptions, roleOpt *common.RoleOptions, dbService *common.DBService, redisService *common.RedisService, mailerService common.MailerIntf)
StartUgroupServer - Start Ugroup Server
func StartUserServer ¶
func StartUserServer(log *zap.Logger, isTest bool, pwd string, dbOpt *common.DBOptions, redisOpt *common.RedisOptions, mailerOpt *common.MailerOptions, grpcServerOpt *common.GrpcServerOptions, jwtOpt *common.JWTOptions, oauthOpt *common.OauthOptions, userOpt *common.UserOptions, jaegerTracerOpt *common.JaegerTracerOptions, promOpt *common.PromOptions, elasticOpt *common.ElasticOptions, roleOpt *common.RoleOptions, dbService *common.DBService, redisService *common.RedisService, mailerService common.MailerIntf)
StartUserServer - Start User Server
Types ¶
type CustomClaims ¶
type CustomClaims struct { EmailAddr string jwt.StandardClaims }
CustomClaims - used to type holds the token claims
type UbadgeService ¶
type UbadgeService struct { DBService *common.DBService RedisService *common.RedisService userproto.UnimplementedUbadgeServiceServer // contains filtered or unexported fields }
UbadgeService - For accessing Ubadge services
func NewUbadgeService ¶
func NewUbadgeService(log *zap.Logger, dbOpt *common.DBService, redisOpt *common.RedisService) *UbadgeService
NewUbadgeService - Create Ubadge Service
func (*UbadgeService) AddUserToGroup ¶
func (u *UbadgeService) AddUserToGroup(ctx context.Context, in *userproto.UbadgeUserRequest) (*commonproto.Empty, error)
AddUserToGroup - Add user to ubadge
func (*UbadgeService) CreateUbadge ¶
func (u *UbadgeService) CreateUbadge(ctx context.Context, in *userproto.CreateUbadgeRequest) (*userproto.Ubadge, error)
CreateUbadge - Create Ubadge
func (*UbadgeService) DeleteUbadge ¶
func (u *UbadgeService) DeleteUbadge(ctx context.Context, in *commonproto.GetRequest) (*commonproto.Empty, error)
DeleteUbadge - Delele Ubadge
func (*UbadgeService) DeleteUserFromGroup ¶
func (u *UbadgeService) DeleteUserFromGroup(ctx context.Context, in *userproto.UbadgeUserRequest) (*commonproto.Empty, error)
DeleteUserFromGroup - Delete user from Ubadge
func (*UbadgeService) GetUbadge ¶
func (u *UbadgeService) GetUbadge(ctx context.Context, in *commonproto.GetRequest) (*userproto.Ubadge, error)
GetUbadge - Get Ubadge by Id
func (*UbadgeService) GetUbadgeUsers ¶
func (u *UbadgeService) GetUbadgeUsers(ctx context.Context, in *commonproto.GetRequest) (*userproto.Ubadge, error)
GetUbadgeUsers - Get Ubadge Details
func (*UbadgeService) GetUbadges ¶
func (u *UbadgeService) GetUbadges(ctx context.Context, in *userproto.GetUbadgesRequest) (*userproto.UbadgeCursor, error)
GetUbadges - Get Ubadges
func (*UbadgeService) UpdateUbadge ¶
func (u *UbadgeService) UpdateUbadge(ctx context.Context, in *userproto.UpdateUbadgeRequest) (*commonproto.Empty, error)
UpdateUbadge - Update Ubadge
type UgroupService ¶
type UgroupService struct { DBService *common.DBService RedisService *common.RedisService userproto.UnimplementedUgroupServiceServer // contains filtered or unexported fields }
UgroupService - For accessing Ugroup services
func NewUgroupService ¶
func NewUgroupService(log *zap.Logger, dbOpt *common.DBService, redisOpt *common.RedisService) *UgroupService
NewUgroupService - Create Ugroup Service
func (*UgroupService) AddUserToGroup ¶
func (u *UgroupService) AddUserToGroup(ctx context.Context, in *userproto.UgroupUserRequest) (*commonproto.Empty, error)
AddUserToGroup - Add user to ugroup
func (*UgroupService) CreateChild ¶
func (u *UgroupService) CreateChild(ctx context.Context, in *userproto.CreateUgroupRequest) (*userproto.Ugroup, error)
CreateChild - Create child of ugroup
func (*UgroupService) CreateUgroup ¶
func (u *UgroupService) CreateUgroup(ctx context.Context, in *userproto.CreateUgroupRequest) (*userproto.Ugroup, error)
CreateUgroup - Create ugroup
func (*UgroupService) DeleteUgroup ¶
func (u *UgroupService) DeleteUgroup(ctx context.Context, in *commonproto.GetRequest) (*commonproto.Empty, error)
DeleteUgroup - Delete ugroup
func (*UgroupService) DeleteUserFromGroup ¶
func (u *UgroupService) DeleteUserFromGroup(ctx context.Context, in *userproto.UgroupUserRequest) (*commonproto.Empty, error)
DeleteUserFromGroup - Delete user from group
func (*UgroupService) GetChildUgroups ¶
func (u *UgroupService) GetChildUgroups(ctx context.Context, in *commonproto.GetRequest) (*userproto.Ugroups, error)
GetChildUgroups - Get child ugroups
func (*UgroupService) GetParent ¶
func (u *UgroupService) GetParent(ctx context.Context, in *commonproto.GetRequest) (*userproto.Ugroup, error)
GetParent - Get parent ugroup
func (*UgroupService) GetUgroup ¶
func (u *UgroupService) GetUgroup(ctx context.Context, in *commonproto.GetRequest) (*userproto.Ugroup, error)
GetUgroup - Get Ugroup
func (*UgroupService) GetUgroupByPk ¶
func (u *UgroupService) GetUgroupByPk(ctx context.Context, in *commonproto.GetByIdRequest) (*userproto.Ugroup, error)
GetUgroupByPk - Get Ugroup By Primary key
func (*UgroupService) GetUgroupUsers ¶
func (u *UgroupService) GetUgroupUsers(ctx context.Context, in *commonproto.GetRequest) (*userproto.Ugroup, error)
GetUgroupUsers - Get ugroup details with users by Id
func (*UgroupService) GetUgroups ¶
func (u *UgroupService) GetUgroups(ctx context.Context, in *userproto.GetUgroupsRequest) (*userproto.UgroupCursor, error)
GetUgroups - Get Groups
func (*UgroupService) TopLevelUgroups ¶
func (u *UgroupService) TopLevelUgroups(ctx context.Context, in *userproto.TopLevelUgroupsRequest) (*userproto.Ugroups, error)
TopLevelUgroups - Get top level ugroups
func (*UgroupService) UpdateUgroup ¶
func (u *UgroupService) UpdateUgroup(ctx context.Context, in *userproto.UpdateUgroupRequest) (*commonproto.Empty, error)
UpdateUgroup - Update Ugroup
type UserService ¶
type UserService struct { DBService *common.DBService RedisService *common.RedisService MailerService common.MailerIntf JWTOptions *common.JWTOptions UserOptions *common.UserOptions Enforcer *casbin.Enforcer userproto.UnimplementedUserServiceServer // contains filtered or unexported fields }
UserService - For accessing user services
func NewUserService ¶
func NewUserService(log *zap.Logger, dbOpt *common.DBService, redisOpt *common.RedisService, mailerOpt common.MailerIntf, jwtOptions *common.JWTOptions, userOpt *common.UserOptions, e *casbin.Enforcer) *UserService
NewUserService - Create User Service
func (*UserService) ChangeEmail ¶
func (u *UserService) ChangeEmail(ctx context.Context, in *userproto.ChangeEmailRequest) (*commonproto.Empty, error)
ChangeEmail - Change Email
func (*UserService) ChangePassword ¶
func (u *UserService) ChangePassword(ctx context.Context, in *userproto.PasswordRequest) (*commonproto.Empty, error)
ChangePassword - used to update password
func (*UserService) CheckAuthorisation ¶
func (u *UserService) CheckAuthorisation(ctx context.Context, in *userproto.ContextDataRequest) error
CheckAuthorisation - used for Authorisation
func (*UserService) ConfirmChangeEmail ¶
func (u *UserService) ConfirmChangeEmail(ctx context.Context, in *userproto.ConfirmTokenRequest) (*commonproto.Empty, error)
ConfirmChangeEmail - Confirm change email
func (*UserService) ConfirmEmail ¶
func (u *UserService) ConfirmEmail(ctx context.Context, in *userproto.ConfirmTokenRequest) (*commonproto.Empty, error)
ConfirmEmail - used to confirm email
func (*UserService) ConfirmForgotPassword ¶
func (u *UserService) ConfirmForgotPassword(ctx context.Context, in *userproto.PasswordRequest) (*commonproto.Empty, error)
ConfirmForgotPassword - used to confirm forgotten password
func (*UserService) CreateUser ¶
func (u *UserService) CreateUser(ctx context.Context, form *userproto.CreateUserRequest) (*userproto.User, error)
CreateUser - Create User
func (*UserService) DeleteUser ¶
func (u *UserService) DeleteUser(ctx context.Context, in *commonproto.GetRequest) (*commonproto.Empty, error)
DeleteUser - Delete user
func (*UserService) ForgotPassword ¶
func (u *UserService) ForgotPassword(ctx context.Context, in *userproto.ForgotPasswordRequest) (*commonproto.Empty, error)
ForgotPassword - used to reset forgotten Password
func (*UserService) GetAuthUserDetails ¶
func (u *UserService) GetAuthUserDetails(ctx context.Context, in *userproto.ContextDataRequest) (*userproto.ContextData, error)
GetAuthUserDetails - used to get auth user details
func (*UserService) GetUser ¶
func (u *UserService) GetUser(ctx context.Context, in *commonproto.GetRequest) (*userproto.User, error)
GetUser - Get user details by Id
func (*UserService) GetUserByEmail ¶
func (u *UserService) GetUserByEmail(ctx context.Context, in *userproto.GetUserByEmailRequest) (*userproto.User, error)
GetUserByEmail - Get user details by email
func (*UserService) GetUsers ¶
func (u *UserService) GetUsers(ctx context.Context, in *userproto.GetUsersRequest) (*userproto.UserCursor, error)
GetUsers - Get all users
func (*UserService) Login ¶
func (u *UserService) Login(ctx context.Context, form *userproto.LoginRequest) (*userproto.User, error)
Login - used for Login user
func (*UserService) UpdateUser ¶
func (u *UserService) UpdateUser(ctx context.Context, in *userproto.UpdateUserRequest) (*commonproto.Empty, error)
UpdateUser - Update User