Documentation ¶
Index ¶
- func GetUserWithNewContext(ctx context.Context, userId string, userEmail string, requestId string, ...) (*partyproto.User, error)
- func PartyTracer(ctx context.Context)
- func StartPartyServer(log *zap.Logger, isTest bool, pwd string, dbOpt *config.DBOptions, ...)
- func StartUserServer(log *zap.Logger, isTest bool, pwd string, dbOpt *config.DBOptions, ...)
- type PartyService
- func (ps *PartyService) CreateParty(ctx context.Context, in *partyproto.CreatePartyRequest) (*partyproto.CreatePartyResponse, error)
- func (ps *PartyService) CreatePartyContactDetail(ctx context.Context, in *partyproto.CreatePartyContactDetailRequest) (*partyproto.CreatePartyContactDetailResponse, error)
- func (ps *PartyService) DeleteParty(ctx context.Context, inReq *partyproto.DeletePartyRequest) (*partyproto.DeletePartyResponse, error)
- func (ps *PartyService) DeletePartyContactDetail(ctx context.Context, inReq *partyproto.DeletePartyContactDetailRequest) (*partyproto.DeletePartyContactDetailResponse, error)
- func (ps *PartyService) GetParties(ctx context.Context, in *partyproto.GetPartiesRequest) (*partyproto.GetPartiesResponse, error)
- func (ps *PartyService) GetParty(ctx context.Context, inReq *partyproto.GetPartyRequest) (*partyproto.GetPartyResponse, error)
- func (ps *PartyService) GetPartyByPk(ctx context.Context, inReq *partyproto.GetPartyByPkRequest) (*partyproto.GetPartyByPkResponse, error)
- func (ps *PartyService) GetPartyContactDetail(ctx context.Context, inReq *partyproto.GetPartyContactDetailRequest) (*partyproto.GetPartyContactDetailResponse, error)
- func (ps *PartyService) GetPartyContactDetailStruct(ctx context.Context, in *commonproto.GetRequest, ...) (*partyproto.PartyContactDetail, error)
- func (ps *PartyService) GetPartyStruct(ctx context.Context, in *commonproto.GetRequest, partyTmp partystruct.Party) (*partyproto.Party, error)
- func (ps *PartyService) UpdateParty(ctx context.Context, in *partyproto.UpdatePartyRequest) (*partyproto.UpdatePartyResponse, error)
- func (ps *PartyService) UpdatePartyContactDetail(ctx context.Context, in *partyproto.UpdatePartyContactDetailRequest) (*partyproto.UpdatePartyContactDetailResponse, error)
- type Roles
- type UserService
- func (u *UserService) AddPermisionsToRoles(ctx context.Context, in *partyproto.AddPermisionsToRolesRequest) (*partyproto.AddPermisionsToRolesResponse, error)
- func (u *UserService) AssignRolesToUsers(ctx context.Context, in *partyproto.AssignRolesToUsersRequest) (*partyproto.AssignRolesToUsersResponse, error)
- func (u *UserService) ChangePassword(ctx context.Context, in *partyproto.ChangePasswordRequest) (*partyproto.ChangePasswordResponse, error)
- func (u *UserService) CreateRole(ctx context.Context, in *partyproto.CreateRoleRequest) (*partyproto.CreateRoleResponse, error)
- func (u *UserService) DeleteRole(ctx context.Context, in *partyproto.DeleteRoleRequest) (*partyproto.DeleteRoleResponse, error)
- func (u *UserService) DeleteUser(ctx context.Context, in *partyproto.DeleteUserRequest) (*partyproto.DeleteUserResponse, error)
- func (u *UserService) GetAuthUserDetails(ctx context.Context, in *partyproto.GetAuthUserDetailsRequest) (*partyproto.GetAuthUserDetailsResponse, error)
- func (u *UserService) GetRole(ctx context.Context, in *partyproto.GetRoleRequest) (*partyproto.GetRoleResponse, error)
- func (u *UserService) GetRolePermissions(ctx context.Context, in *partyproto.GetRolePermissionsRequest) (*partyproto.GetRolePermissionsResponse, error)
- func (u *UserService) GetRoleUsers(ctx context.Context, in *partyproto.GetRoleUsersRequest) (*partyproto.GetRoleUsersResponse, error)
- func (u *UserService) GetRoles(ctx context.Context, in *partyproto.GetRolesRequest) (*partyproto.GetRolesResponse, error)
- func (u *UserService) GetUser(ctx context.Context, inReq *partyproto.GetUserRequest) (*partyproto.GetUserResponse, error)
- func (u *UserService) GetUserByEmail(ctx context.Context, in *partyproto.GetUserByEmailRequest) (*partyproto.GetUserByEmailResponse, error)
- func (u *UserService) GetUsers(ctx context.Context, in *partyproto.GetUsersRequest) (*partyproto.GetUsersResponse, error)
- func (u *UserService) RefreshToken(ctx context.Context, form *partyproto.RefreshTokenRequest) (*partyproto.RefreshTokenResponse, error)
- func (u *UserService) RemoveRolePermission(ctx context.Context, in *partyproto.RemoveRolePermissionRequest) (*partyproto.RemoveRolePermissionResponse, error)
- func (u *UserService) UpdateRole(ctx context.Context, in *partyproto.UpdateRoleRequest) (*partyproto.UpdateRoleResponse, error)
- func (u *UserService) UpdateUser(ctx context.Context, form *partyproto.UpdateUserRequest) (*partyproto.UpdateUserResponse, error)
- func (u *UserService) UserTracer(ctx context.Context)
- func (u *UserService) ViewUserRoles(ctx context.Context, in *partyproto.ViewUserRolesRequest) (*partyproto.ViewUserRolesResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUserWithNewContext ¶
func GetUserWithNewContext(ctx context.Context, userId string, userEmail string, requestId string, userServiceClient partyproto.UserServiceClient) (*partyproto.User, error)
GetUserWithNewContext - GetUserWithNewContext
func PartyTracer ¶
func StartPartyServer ¶
func StartPartyServer(log *zap.Logger, isTest bool, pwd string, dbOpt *config.DBOptions, redisOpt *config.RedisOptions, mailerOpt *config.MailerOptions, grpcServerOpt *config.GrpcServerOptions, jwtOpt *config.JWTOptions, oauthOpt *config.OauthOptions, userOpt *config.UserOptions, uptraceOpt *config.UptraceOptions, dbService *common.DBService, redisService *common.RedisService, mailerService common.MailerIntf)
StartPartyServer - Start Party server
func StartUserServer ¶
func StartUserServer(log *zap.Logger, isTest bool, pwd string, dbOpt *config.DBOptions, redisOpt *config.RedisOptions, mailerOpt *config.MailerOptions, serverOpt *config.ServerOptions, grpcServerOpt *config.GrpcServerOptions, jwtOpt *config.JWTOptions, oauthOpt *config.OauthOptions, userOpt *config.UserOptions, uptraceOpt *config.UptraceOptions, dbService *common.DBService, redisService *common.RedisService, mailerService common.MailerIntf)
StartUserServer - Start User Server
Types ¶
type PartyService ¶
type PartyService struct { DBService *common.DBService RedisService *common.RedisService UserServiceClient partyproto.UserServiceClient partyproto.UnimplementedPartyServiceServer // contains filtered or unexported fields }
PartyService - For accessing Party services
func NewPartyService ¶
func NewPartyService(log *zap.Logger, dbOpt *common.DBService, redisOpt *common.RedisService, userServiceClient partyproto.UserServiceClient) *PartyService
NewPartyService - Create Party service
func (*PartyService) CreateParty ¶
func (ps *PartyService) CreateParty(ctx context.Context, in *partyproto.CreatePartyRequest) (*partyproto.CreatePartyResponse, error)
CreateParty - Create Party
func (*PartyService) CreatePartyContactDetail ¶
func (ps *PartyService) CreatePartyContactDetail(ctx context.Context, in *partyproto.CreatePartyContactDetailRequest) (*partyproto.CreatePartyContactDetailResponse, error)
CreatePartyContactDetail - Create PartyContactDetail
func (*PartyService) DeleteParty ¶
func (ps *PartyService) DeleteParty(ctx context.Context, inReq *partyproto.DeletePartyRequest) (*partyproto.DeletePartyResponse, error)
DeleteParty - Delete party
func (*PartyService) DeletePartyContactDetail ¶
func (ps *PartyService) DeletePartyContactDetail(ctx context.Context, inReq *partyproto.DeletePartyContactDetailRequest) (*partyproto.DeletePartyContactDetailResponse, error)
DeletePartyContactDetail - Delete party contact
func (*PartyService) GetParties ¶
func (ps *PartyService) GetParties(ctx context.Context, in *partyproto.GetPartiesRequest) (*partyproto.GetPartiesResponse, error)
GetParties - Get Parties
func (*PartyService) GetParty ¶
func (ps *PartyService) GetParty(ctx context.Context, inReq *partyproto.GetPartyRequest) (*partyproto.GetPartyResponse, error)
GetParty - Get Party
func (*PartyService) GetPartyByPk ¶
func (ps *PartyService) GetPartyByPk(ctx context.Context, inReq *partyproto.GetPartyByPkRequest) (*partyproto.GetPartyByPkResponse, error)
GetPartyByPk - Get Party By Primary key(Id)
func (*PartyService) GetPartyContactDetail ¶
func (ps *PartyService) GetPartyContactDetail(ctx context.Context, inReq *partyproto.GetPartyContactDetailRequest) (*partyproto.GetPartyContactDetailResponse, error)
GetPartyContactDetail - Get Party Contact
func (*PartyService) GetPartyContactDetailStruct ¶
func (ps *PartyService) GetPartyContactDetailStruct(ctx context.Context, in *commonproto.GetRequest, partyContactDetailTmp partystruct.PartyContactDetail) (*partyproto.PartyContactDetail, error)
GetPartyContactDetailStruct - Get partyContactDetail
func (*PartyService) GetPartyStruct ¶
func (ps *PartyService) GetPartyStruct(ctx context.Context, in *commonproto.GetRequest, partyTmp partystruct.Party) (*partyproto.Party, error)
GetPartyStruct - Get party
func (*PartyService) UpdateParty ¶
func (ps *PartyService) UpdateParty(ctx context.Context, in *partyproto.UpdatePartyRequest) (*partyproto.UpdatePartyResponse, error)
UpdateParty - Update party
func (*PartyService) UpdatePartyContactDetail ¶
func (ps *PartyService) UpdatePartyContactDetail(ctx context.Context, in *partyproto.UpdatePartyContactDetailRequest) (*partyproto.UpdatePartyContactDetailResponse, error)
UpdatePartyContactDetail - Update User In Parties
type UserService ¶
type UserService struct { DBService *common.DBService RedisService *common.RedisService MailerService common.MailerIntf JWTOptions *config.JWTOptions UserOptions *config.UserOptions ServerOptions *config.ServerOptions partyproto.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 *config.JWTOptions, userOpt *config.UserOptions, serverOpt *config.ServerOptions) *UserService
NewUserService - Create User Service
func (*UserService) AddPermisionsToRoles ¶
func (u *UserService) AddPermisionsToRoles(ctx context.Context, in *partyproto.AddPermisionsToRolesRequest) (*partyproto.AddPermisionsToRolesResponse, error)
func (*UserService) AssignRolesToUsers ¶
func (u *UserService) AssignRolesToUsers(ctx context.Context, in *partyproto.AssignRolesToUsersRequest) (*partyproto.AssignRolesToUsersResponse, error)
AssignRolesToUsers - used to assign roles to users
func (*UserService) ChangePassword ¶
func (u *UserService) ChangePassword(ctx context.Context, in *partyproto.ChangePasswordRequest) (*partyproto.ChangePasswordResponse, error)
ChangePassword - used to update password
func (*UserService) CreateRole ¶
func (u *UserService) CreateRole(ctx context.Context, in *partyproto.CreateRoleRequest) (*partyproto.CreateRoleResponse, error)
CreateRole - used to create Role
func (*UserService) DeleteRole ¶
func (u *UserService) DeleteRole(ctx context.Context, in *partyproto.DeleteRoleRequest) (*partyproto.DeleteRoleResponse, error)
DeleteRole - used to delete Role
func (*UserService) DeleteUser ¶
func (u *UserService) DeleteUser(ctx context.Context, in *partyproto.DeleteUserRequest) (*partyproto.DeleteUserResponse, error)
DeleteUser - used to get user by Id
func (*UserService) GetAuthUserDetails ¶
func (u *UserService) GetAuthUserDetails(ctx context.Context, in *partyproto.GetAuthUserDetailsRequest) (*partyproto.GetAuthUserDetailsResponse, error)
GetAuthUserDetails - used to get auth user details
func (*UserService) GetRole ¶
func (u *UserService) GetRole(ctx context.Context, in *partyproto.GetRoleRequest) (*partyproto.GetRoleResponse, error)
GetRole - used to get Role
func (*UserService) GetRolePermissions ¶
func (u *UserService) GetRolePermissions(ctx context.Context, in *partyproto.GetRolePermissionsRequest) (*partyproto.GetRolePermissionsResponse, error)
func (*UserService) GetRoleUsers ¶
func (u *UserService) GetRoleUsers(ctx context.Context, in *partyproto.GetRoleUsersRequest) (*partyproto.GetRoleUsersResponse, error)
func (*UserService) GetRoles ¶
func (u *UserService) GetRoles(ctx context.Context, in *partyproto.GetRolesRequest) (*partyproto.GetRolesResponse, error)
GetRoles - used to get Roles
func (*UserService) GetUser ¶
func (u *UserService) GetUser(ctx context.Context, inReq *partyproto.GetUserRequest) (*partyproto.GetUserResponse, error)
GetUser - used to get user by Id
func (*UserService) GetUserByEmail ¶
func (u *UserService) GetUserByEmail(ctx context.Context, in *partyproto.GetUserByEmailRequest) (*partyproto.GetUserByEmailResponse, error)
GetUserByEmail - Get user details by email
func (*UserService) GetUsers ¶
func (u *UserService) GetUsers(ctx context.Context, in *partyproto.GetUsersRequest) (*partyproto.GetUsersResponse, error)
GetUsers - Get users
func (*UserService) RefreshToken ¶
func (u *UserService) RefreshToken(ctx context.Context, form *partyproto.RefreshTokenRequest) (*partyproto.RefreshTokenResponse, error)
RefreshToken - used for Refresh Token this needs to convert to auth0 code
func (*UserService) RemoveRolePermission ¶
func (u *UserService) RemoveRolePermission(ctx context.Context, in *partyproto.RemoveRolePermissionRequest) (*partyproto.RemoveRolePermissionResponse, error)
func (*UserService) UpdateRole ¶
func (u *UserService) UpdateRole(ctx context.Context, in *partyproto.UpdateRoleRequest) (*partyproto.UpdateRoleResponse, error)
UpdateRole - used to update Role
func (*UserService) UpdateUser ¶
func (u *UserService) UpdateUser(ctx context.Context, form *partyproto.UpdateUserRequest) (*partyproto.UpdateUserResponse, error)
func (*UserService) UserTracer ¶
func (u *UserService) UserTracer(ctx context.Context)
func (*UserService) ViewUserRoles ¶
func (u *UserService) ViewUserRoles(ctx context.Context, in *partyproto.ViewUserRolesRequest) (*partyproto.ViewUserRolesResponse, error)
ViewUserRoles - used to View User Roles