Documentation ¶
Index ¶
- type Module
- func (m *Module) EmailEditProfile(ctx context.Context, token, dbAlias, project, id, email, name, password string) (int, map[string]interface{}, error)
- func (m *Module) EmailSignIn(ctx context.Context, dbAlias, project, email, password string) (int, map[string]interface{}, error)
- func (m *Module) EmailSignUp(ctx context.Context, dbAlias, project, email, name, password, role string) (int, map[string]interface{}, error)
- func (m *Module) IsActive(method string) bool
- func (m *Module) IsEnabled() bool
- func (m *Module) Profile(ctx context.Context, token, dbAlias, project, id string) (int, map[string]interface{}, error)
- func (m *Module) Profiles(ctx context.Context, token, dbAlias, project string) (int, map[string]interface{}, error)
- func (m *Module) SetConfig(auth config.Auths)
- func (m *Module) SetProjectAESKey(aesKey string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
Module is responsible for user management
func Init ¶
func Init(crud model.CrudUserInterface, auth model.AuthUserInterface) *Module
Init creates a new instance of the user management object
func (*Module) EmailEditProfile ¶
func (m *Module) EmailEditProfile(ctx context.Context, token, dbAlias, project, id, email, name, password string) (int, map[string]interface{}, error)
EmailEditProfile allows the user to edit a profile
func (*Module) EmailSignIn ¶
func (m *Module) EmailSignIn(ctx context.Context, dbAlias, project, email, password string) (int, map[string]interface{}, error)
EmailSignIn signins the user and returns a JWT token
func (*Module) EmailSignUp ¶
func (m *Module) EmailSignUp(ctx context.Context, dbAlias, project, email, name, password, role string) (int, map[string]interface{}, error)
EmailSignUp signs up a user and return a JWT token
func (*Module) Profile ¶
func (m *Module) Profile(ctx context.Context, token, dbAlias, project, id string) (int, map[string]interface{}, error)
Profile fetches the profile of the user
func (*Module) Profiles ¶
func (m *Module) Profiles(ctx context.Context, token, dbAlias, project string) (int, map[string]interface{}, error)
Profiles fetches all the user profiles
func (*Module) SetProjectAESKey ¶
SetProjectAESKey set aes key
Click to show internal directories.
Click to hide internal directories.