userservices

package
v0.0.0-...-4e281dc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

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 Roles

type Roles []string

Roles - Used for roles

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

AddUserToGroup - Add user to ubadge

func (*UbadgeService) CreateUbadge

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

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

GetUbadges - Get Ubadges

func (*UbadgeService) UpdateUbadge

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

AddUserToGroup - Add user to ugroup

func (*UgroupService) CreateChild

CreateChild - Create child of ugroup

func (*UgroupService) CreateUgroup

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

GetParent - Get parent ugroup

func (*UgroupService) GetUgroup

GetUgroup - Get Ugroup

func (*UgroupService) GetUgroupByPk

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

GetUgroups - Get Groups

func (*UgroupService) TopLevelUgroups

TopLevelUgroups - Get top level ugroups

func (*UgroupService) UpdateUgroup

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

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

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

DeleteUser - Delete user

func (*UserService) ForgotPassword

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

GetUser - Get user details by Id

func (*UserService) GetUserByEmail

GetUserByEmail - Get user details by email

func (*UserService) GetUsers

GetUsers - Get all users

func (*UserService) Login

Login - used for Login user

func (*UserService) UpdateUser

UpdateUser - Update User

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL