Documentation ¶
Index ¶
- func Init(log *zap.Logger, rateOpt *common.RateOptions, jwtOpt *common.JWTOptions, ...) error
- func InitTest(log *zap.Logger, rateOpt *common.RateOptions, jwtOpt *common.JWTOptions, ...) error
- type UController
- func (uc *UController) ConfirmChangeEmail(w http.ResponseWriter, r *http.Request, id string, requestID string)
- func (uc *UController) ConfirmEmail(w http.ResponseWriter, r *http.Request, id string, requestID string)
- func (uc *UController) ConfirmForgotPassword(w http.ResponseWriter, r *http.Request, id string, requestID string)
- func (uc *UController) CreateUser(w http.ResponseWriter, r *http.Request, requestID string)
- func (uc *UController) ForgotPassword(w http.ResponseWriter, r *http.Request, requestID string)
- func (uc *UController) Login(w http.ResponseWriter, r *http.Request, requestID string)
- func (uc *UController) ServeHTTP(w http.ResponseWriter, r *http.Request)
- type UbadgeController
- func (uc *UbadgeController) AddUserToGroup(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, ...)
- func (uc *UbadgeController) CreateUbadge(ctx context.Context, w http.ResponseWriter, r *http.Request, ...)
- func (uc *UbadgeController) DeleteUbadge(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, ...)
- func (uc *UbadgeController) DeleteUserFromGroup(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, ...)
- func (uc *UbadgeController) GetUbadgeUsers(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, ...)
- func (uc *UbadgeController) GetUbadges(ctx context.Context, w http.ResponseWriter, r *http.Request, limit string, ...)
- func (uc *UbadgeController) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (uc *UbadgeController) UpdateUbadge(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, ...)
- type UgroupController
- func (uc *UgroupController) AddUserToGroup(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, ...)
- func (uc *UgroupController) CreateChild(ctx context.Context, w http.ResponseWriter, r *http.Request, ...)
- func (uc *UgroupController) CreateUgroup(ctx context.Context, w http.ResponseWriter, r *http.Request, ...)
- func (uc *UgroupController) DeleteUgroup(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, ...)
- func (uc *UgroupController) DeleteUserFromGroup(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, ...)
- func (uc *UgroupController) GetChildUgroups(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, ...)
- func (uc *UgroupController) GetParent(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, ...)
- func (uc *UgroupController) GetUgroupUsers(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, ...)
- func (uc *UgroupController) GetUgroups(ctx context.Context, w http.ResponseWriter, r *http.Request, limit string, ...)
- func (uc *UgroupController) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (uc *UgroupController) TopLevelGroups(ctx context.Context, w http.ResponseWriter, r *http.Request, ...)
- func (uc *UgroupController) UpdateUgroup(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, ...)
- type UserController
- func (uc *UserController) ChangeEmail(ctx context.Context, w http.ResponseWriter, r *http.Request, ...)
- func (uc *UserController) ChangePassword(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, ...)
- func (uc *UserController) DeleteUser(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, ...)
- func (uc *UserController) GetUser(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, ...)
- func (uc *UserController) GetUserByEmail(ctx context.Context, w http.ResponseWriter, r *http.Request, ...)
- func (uc *UserController) GetUsers(ctx context.Context, w http.ResponseWriter, r *http.Request, limit string, ...)
- func (uc *UserController) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (uc *UserController) UpdateUser(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(log *zap.Logger, rateOpt *common.RateOptions, jwtOpt *common.JWTOptions, mux *http.ServeMux, store *goredisstore.GoRedisStore, grpcServerOpt *common.GrpcServerOptions, jaegerTracerOpt *common.JaegerTracerOptions) error
Init the user controllers
func InitTest ¶
func InitTest(log *zap.Logger, rateOpt *common.RateOptions, jwtOpt *common.JWTOptions, mux *http.ServeMux, store *goredisstore.GoRedisStore, grpcServerOpt *common.GrpcServerOptions, jaegerTracerOpt *common.JaegerTracerOptions) error
InitTest the user controllers
Types ¶
type UController ¶
type UController struct { UserServiceClient userproto.UserServiceClient // contains filtered or unexported fields }
UController - create u controller
func NewUController ¶
func NewUController(log *zap.Logger, s userproto.UserServiceClient) *UController
NewUController - create u handler
func (*UController) ConfirmChangeEmail ¶
func (uc *UController) ConfirmChangeEmail(w http.ResponseWriter, r *http.Request, id string, requestID string)
ConfirmChangeEmail - Confirm Change Email
func (*UController) ConfirmEmail ¶
func (uc *UController) ConfirmEmail(w http.ResponseWriter, r *http.Request, id string, requestID string)
ConfirmEmail - Confirmation of email
func (*UController) ConfirmForgotPassword ¶
func (uc *UController) ConfirmForgotPassword(w http.ResponseWriter, r *http.Request, id string, requestID string)
ConfirmForgotPassword - Reset password
func (*UController) CreateUser ¶
func (uc *UController) CreateUser(w http.ResponseWriter, r *http.Request, requestID string)
CreateUser - Create User
func (*UController) ForgotPassword ¶
func (uc *UController) ForgotPassword(w http.ResponseWriter, r *http.Request, requestID string)
ForgotPassword - Send Link to reset password
func (*UController) Login ¶
func (uc *UController) Login(w http.ResponseWriter, r *http.Request, requestID string)
Login - User logins
func (*UController) ServeHTTP ¶
func (uc *UController) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP - parse url and call controller action
type UbadgeController ¶
type UbadgeController struct { UbadgeServiceClient userproto.UbadgeServiceClient UserServiceClient userproto.UserServiceClient // contains filtered or unexported fields }
UbadgeController - Create Ubadge Controller
func NewUbadgeController ¶
func NewUbadgeController(log *zap.Logger, s userproto.UbadgeServiceClient, userServiceClient userproto.UserServiceClient) *UbadgeController
NewUbadgeController - Create Ubadge Handler
func (*UbadgeController) AddUserToGroup ¶
func (uc *UbadgeController) AddUserToGroup(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, user *userproto.ContextData)
AddUserToGroup - Add user to Ubadge
func (*UbadgeController) CreateUbadge ¶
func (uc *UbadgeController) CreateUbadge(ctx context.Context, w http.ResponseWriter, r *http.Request, user *userproto.ContextData)
CreateUbadge - Create Ubadge
func (*UbadgeController) DeleteUbadge ¶
func (uc *UbadgeController) DeleteUbadge(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, user *userproto.ContextData)
DeleteUbadge - delete ubadge
func (*UbadgeController) DeleteUserFromGroup ¶
func (uc *UbadgeController) DeleteUserFromGroup(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, user *userproto.ContextData)
DeleteUserFromGroup - delete user from Ubadge
func (*UbadgeController) GetUbadgeUsers ¶
func (uc *UbadgeController) GetUbadgeUsers(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, user *userproto.ContextData)
GetUbadgeUsers - Get Ubadge Details
func (*UbadgeController) GetUbadges ¶
func (uc *UbadgeController) GetUbadges(ctx context.Context, w http.ResponseWriter, r *http.Request, limit string, cursor string, user *userproto.ContextData)
GetUbadges - Get Ubadges
func (*UbadgeController) ServeHTTP ¶
func (uc *UbadgeController) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP - parse url and call controller action
func (*UbadgeController) UpdateUbadge ¶
func (uc *UbadgeController) UpdateUbadge(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, user *userproto.ContextData)
UpdateUbadge - Update Ubadge
type UgroupController ¶
type UgroupController struct { UgroupServiceClient userproto.UgroupServiceClient UserServiceClient userproto.UserServiceClient // contains filtered or unexported fields }
UgroupController - Create Ugroup Controller
func NewUgroupController ¶
func NewUgroupController(log *zap.Logger, s userproto.UgroupServiceClient, userServiceClient userproto.UserServiceClient) *UgroupController
NewUgroupController - Create Ugroup Handler
func (*UgroupController) AddUserToGroup ¶
func (uc *UgroupController) AddUserToGroup(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, user *userproto.ContextData)
AddUserToGroup - Add user to group
func (*UgroupController) CreateChild ¶
func (uc *UgroupController) CreateChild(ctx context.Context, w http.ResponseWriter, r *http.Request, user *userproto.ContextData)
CreateChild - Create child of ugroup
func (*UgroupController) CreateUgroup ¶
func (uc *UgroupController) CreateUgroup(ctx context.Context, w http.ResponseWriter, r *http.Request, user *userproto.ContextData)
CreateUgroup - Create Ugroup
func (*UgroupController) DeleteUgroup ¶
func (uc *UgroupController) DeleteUgroup(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, user *userproto.ContextData)
DeleteUgroup - delete ugroup
func (*UgroupController) DeleteUserFromGroup ¶
func (uc *UgroupController) DeleteUserFromGroup(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, user *userproto.ContextData)
DeleteUserFromGroup - delete user from group
func (*UgroupController) GetChildUgroups ¶
func (uc *UgroupController) GetChildUgroups(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, user *userproto.ContextData)
GetChildUgroups - Get children of ugroup
func (*UgroupController) GetParent ¶
func (uc *UgroupController) GetParent(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, user *userproto.ContextData)
GetParent - Get Parent ugroup of child ugroup
func (*UgroupController) GetUgroupUsers ¶
func (uc *UgroupController) GetUgroupUsers(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, user *userproto.ContextData)
GetUgroupUsers - Get ugroup details
func (*UgroupController) GetUgroups ¶
func (uc *UgroupController) GetUgroups(ctx context.Context, w http.ResponseWriter, r *http.Request, limit string, cursor string, user *userproto.ContextData)
GetUgroups - Get Ugroups
func (*UgroupController) ServeHTTP ¶
func (uc *UgroupController) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP - parse url and call controller action
func (*UgroupController) TopLevelGroups ¶
func (uc *UgroupController) TopLevelGroups(ctx context.Context, w http.ResponseWriter, r *http.Request, user *userproto.ContextData)
TopLevelGroups - Get top level Groups
func (*UgroupController) UpdateUgroup ¶
func (uc *UgroupController) UpdateUgroup(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, user *userproto.ContextData)
UpdateUgroup - Update Ugroup
type UserController ¶
type UserController struct { UserServiceClient userproto.UserServiceClient // contains filtered or unexported fields }
UserController - used for
func NewUserController ¶
func NewUserController(log *zap.Logger, s userproto.UserServiceClient) *UserController
NewUserController - Used to create a users handler
func (*UserController) ChangeEmail ¶
func (uc *UserController) ChangeEmail(ctx context.Context, w http.ResponseWriter, r *http.Request, user *userproto.ContextData)
ChangeEmail - Changes Email
func (*UserController) ChangePassword ¶
func (uc *UserController) ChangePassword(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, user *userproto.ContextData)
ChangePassword - Changes Password
func (*UserController) DeleteUser ¶
func (uc *UserController) DeleteUser(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, user *userproto.ContextData)
DeleteUser - delete user
func (*UserController) GetUser ¶
func (uc *UserController) GetUser(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, user *userproto.ContextData)
GetUser - Get User Details
func (*UserController) GetUserByEmail ¶
func (uc *UserController) GetUserByEmail(ctx context.Context, w http.ResponseWriter, r *http.Request, user *userproto.ContextData)
GetUserByEmail - Get User By email
func (*UserController) GetUsers ¶
func (uc *UserController) GetUsers(ctx context.Context, w http.ResponseWriter, r *http.Request, limit string, cursor string, user *userproto.ContextData)
GetUsers - Get Users
func (*UserController) ServeHTTP ¶
func (uc *UserController) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP - parse url and call controller action
func (*UserController) UpdateUser ¶
func (uc *UserController) UpdateUser(ctx context.Context, w http.ResponseWriter, r *http.Request, id string, user *userproto.ContextData)
UpdateUser - Update User