model

package
v0.0.0-...-c7413e9 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	UserId       string    `bson:"user_id"`
	Username     string    `bson:"username"`
	Email        string    `bson:"email"`
	PasswordHash string    `bson:"password"`
	IsEnabled    bool      `bson:"is_enabled"`
	PhoneNumber  string    `bson:"phone_number"`
	Permissions  []string  `bson:"permissions"`
	CreatedAt    time.Time `bson:"created_at"`
	UpdatedAt    time.Time `bson:"updated_at"`
}

func NewUserByAdminCreateUserRequest

func NewUserByAdminCreateUserRequest(req v1.AdminCreateUserRequest) *User

func NewUserByCreateUserRequest

func NewUserByCreateUserRequest(req v1.CreateUserRequest) *User

func (*User) ToAdminUserResponse

func (usr *User) ToAdminUserResponse() v1.AdminUserResponse

func (*User) ToUserResponse

func (usr *User) ToUserResponse() v1.UserResponse

type UserConfiguration

type UserConfiguration struct {
	StorageLimit            string `bson:"storage_limit"`
	MinPasswordLength       int    `bson:"min_password_length"`
	AllowPublicUserCreation bool   `bson:"allow_public_user_creation"`
	AllowLoginWithEmail     bool   `bson:"allow_login_with_email"`
	EnforceMfa              bool   `bson:"enforce_mfa"`
}

func (*UserConfiguration) ToUserConfigurationResponse

func (m *UserConfiguration) ToUserConfigurationResponse() v1.UserConfigurationResponse

type UserPage

type UserPage struct {
	Content []*User `bson:"content"`
	Count   int     `bson:"count"`
}

func (*UserPage) ToUserResponseList

func (m *UserPage) ToUserResponseList(page int, size int, nextUrl string) v1.UserResponseList

Jump to

Keyboard shortcuts

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