Documentation ¶
Index ¶
- type Handler
- type Manager
- func (m *Manager) Add(ctx context.Context, userAdditionRequest *user.AdditionRequest, ...) (*user.PasswordResponse, error)
- func (m *Manager) Authenticate(ctx context.Context, authenticationRequest *user.AuthenticationRequest) (*user.AuthenticationResponse, error)
- func (m *Manager) ChangeAdmin(ctx context.Context, userID string, changeAdminRequest user.AdminChangeRequest, ...) (*User, error)
- func (m *Manager) ChangePassword(ctx context.Context, userID string, ...) (*User, error)
- func (m *Manager) Delete(ctx context.Context, userID string, organizationID string) (*User, error)
- func (m *Manager) Get(ctx context.Context, userID string) (*User, error)
- func (m *Manager) GetByOrganization(ctx context.Context, userID string, organizationID string) (*User, error)
- func (m *Manager) List(ctx context.Context, organizationID string, page int64, size int64) ([]*User, error)
- func (m *Manager) ResetPassword(ctx context.Context, userID string, organizationID string) (*user.PasswordResponse, error)
- func (m *Manager) SignUp(ctx context.Context, signUpRequest *user.SignUpRequest) (*User, error)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(router *gin.Engine, authenticator *authentication.Authenticator, manager *Manager) *Handler
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(organizationManager *organization.Manager, authenticator *authentication.Authenticator) *Manager
func (*Manager) Add ¶
func (m *Manager) Add(ctx context.Context, userAdditionRequest *user.AdditionRequest, actor *authentication.AuthenticatedActor) (*user.PasswordResponse, error)
func (*Manager) Authenticate ¶
func (m *Manager) Authenticate(ctx context.Context, authenticationRequest *user.AuthenticationRequest) (*user.AuthenticationResponse, error)
func (*Manager) ChangeAdmin ¶
func (*Manager) ChangePassword ¶
func (*Manager) GetByOrganization ¶
func (*Manager) ResetPassword ¶
type User ¶
type User struct { mgm.DefaultModel `bson:",inline"` Username string `json:"username" bson:"username"` Password string `json:"-" bson:"password"` OrganizationID string `json:"organization_id" bson:"organization_id"` Admin bool `json:"admin" bson:"admin"` CreatorType actor.Type `json:"creator_type" bson:"creator_type"` CreatorID string `json:"creator_id" bson:"creator_id"` Deleted bool `json:"deleted" bson:"deleted"` }
Click to show internal directories.
Click to hide internal directories.