MSP-1068 move out helper
This commit is contained in:
1 parent
abd9a937a1
commit
a720cef797
1 file changed
-41
@@ -1,41 +0,0 @@
|
||||
package helper
|
||||
|
||||
import (
|
||||
"google.golang.org/grpc/metadata"
|
||||
"msp-admin-service/conf"
|
||||
"msp-admin-service/controller"
|
||||
"msp-admin-service/entity"
|
||||
"msp-admin-service/structure"
|
||||
)
|
||||
|
||||
type Handlers struct {
|
||||
// ===== AUTH =====
|
||||
Login func(structure.AuthRequest) (*structure.Auth, error) `method:"login" group:"auth" inner:"false"`
|
||||
LoginWithSudir func(structure.SudirAuthRequest) (*structure.Auth, error) `method:"login_with_sudir" group:"auth" inner:"false"`
|
||||
Logout func(metadata.MD) error `method:"logout" group:"auth" inner:"true"`
|
||||
|
||||
// ===== USER =====
|
||||
GetProfile func(metadata.MD) (*structure.AdminUserShort, error) `method:"get_profile" group:"user" inner:"true"`
|
||||
GetUIDesign func(metadata metadata.MD) (conf.UIDesign, error) `method:"get_design" group:"user" inner:"true"`
|
||||
GetUsers func(structure.UsersRequest) (*structure.UsersResponse, error) `method:"get_users" group:"user" inner:"true"`
|
||||
CreateUpdateUser func(user entity.AdminUser) (*entity.AdminUser, error) `method:"create_update_user" group:"user" inner:"true"`
|
||||
DeleteUser func(identities structure.IdentitiesRequest) (*structure.DeleteResponse, error) `method:"delete_user" group:"user" inner:"true"`
|
||||
|
||||
Notify func() `method:"notify" group:"" inner:"false"`
|
||||
}
|
||||
|
||||
func GetHandlers() []interface{} {
|
||||
return []interface{}{
|
||||
&Handlers{
|
||||
Login: controller.Login,
|
||||
LoginWithSudir: controller.LoginWithSudir,
|
||||
Logout: controller.Logout,
|
||||
GetProfile: controller.GetProfile,
|
||||
GetUIDesign: controller.GetUIDesign,
|
||||
GetUsers: controller.GetUsers,
|
||||
CreateUpdateUser: controller.CreateUpdateUser,
|
||||
DeleteUser: controller.DeleteUser,
|
||||
Notify: nil,
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user