userman

package
v0.0.0-...-260b785 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Module is responsible for user management

func Init

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) IsActive

func (m *Module) IsActive(method string) bool

IsActive shows if a given method is active

func (*Module) IsEnabled

func (m *Module) IsEnabled() bool

IsEnabled shows if the user management module is enabled

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) SetConfig

func (m *Module) SetConfig(auth config.Auths)

SetConfig sets the config required by the user management module

func (*Module) SetProjectAESKey

func (m *Module) SetProjectAESKey(aesKey string) error

SetProjectAESKey set aes key

Jump to

Keyboard shortcuts

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