entities

package
v0.0.0-...-31ddaea Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TemplateTypeWelcome       = "welcome"
	TemplateTypeEmailVerified = "email-verified"
	TemplateTypePasswordReset = "password-reset"
)
View Source
const (
	NotificationTypeEmail = "email"
)
View Source
const (
	RABBITMQ_AUTH_AUTH_DELETE = "auth.auth.delete"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AclMeta

type AclMeta struct {
	Roles       []*Role
	Permissions []*Permission
}

type AclPermissionDto

type AclPermissionDto struct {
	RoleId      string
	Permissions []string
}

type AclQueryParams

type AclQueryParams struct {
}

type AclUserDto

type AclUserDto struct {
	UserId      string
	Roles       []string
	Permissions []string
}

type Auth

type Auth struct {
	ID              common.ID
	UserId          string
	Email           string
	Password        string
	EmailVerifiedAt time.Time
	CreatedAt       time.Time
	UpdatedAt       time.Time
}

func NewAuth

func NewAuth(x AuthDto, finds ...*Auth) *Auth

func (*Auth) SetEmailVerifiedAt

func (x *Auth) SetEmailVerifiedAt()

func (*Auth) SetPasswordHash

func (x *Auth) SetPasswordHash(hashedPwd string)

func (*Auth) Validate

func (x *Auth) Validate() (err *multierror.Error)

type AuthDto

type AuthDto struct {
	ID       *common.ID
	UserId   string
	Email    string
	Password string
}

type AuthMeta

type AuthMeta struct {
	Auth  *Auth
	Roles []string
}

type AuthToken

type AuthToken struct {
	Sub   string
	JTI   string
	Roles []string
	Exp   int
}

type AuthTokenMeta

type AuthTokenMeta struct {
	AccessToken  AuthToken
	RefreshToken AuthToken
	Exp          int
}

func NewAuthLogin

func NewAuthLogin(x *AuthMeta) *AuthTokenMeta

type NotificationSends

type NotificationSends struct {
	UserId       string
	TemplateName string
	Data         string
	Services     []string
	PathEmail    string
}

type PasswordReset

type PasswordReset struct {
	Token    string
	Password string
}

type Permission

type Permission struct {
	ID          common.ID
	Name        string
	DisplayName string
	Description string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

func NewPermission

func NewPermission(x PermissionDto, finds ...*Permission) *Permission

func (*Permission) Validate

func (x *Permission) Validate() (err *multierror.Error)

type PermissionDto

type PermissionDto struct {
	ID          *common.ID
	Name        string
	DisplayName string
	Description string
}

type PermissionMeta

type PermissionMeta struct {
	Data  []*Permission
	Total int
}

type PermissionQueryParams

type PermissionQueryParams struct {
	Search  string
	Page    int
	PerPage int
}

type PermissionRole

type PermissionRole struct {
	ID           common.ID
	PermissionId string
	RoleId       string
}

func NewPermissionRole

func NewPermissionRole(x PermissionRoleDto) *PermissionRole

func (*PermissionRole) Validate

func (x *PermissionRole) Validate() (err *multierror.Error)

type PermissionRoleDto

type PermissionRoleDto struct {
	ID           *common.ID
	PermissionId string
	RoleId       string
}

type PermissionUser

type PermissionUser struct {
	ID           common.ID
	PermissionId string
	UserId       string
}

func NewPermissionUser

func NewPermissionUser(x PermissionUserDto) *PermissionUser

func (*PermissionUser) Validate

func (x *PermissionUser) Validate() (err *multierror.Error)

type PermissionUserDto

type PermissionUserDto struct {
	ID           *common.ID
	PermissionId string
	UserId       string
}

type Register

type Register struct {
	Name            string
	Email           string
	Password        string
	ConfirmPassword string
}

func NewRegister

func NewRegister(x RegisterDto) *Register

func (*Register) Validate

func (x *Register) Validate() (err *multierror.Error)

type RegisterDto

type RegisterDto struct {
	Name            string
	Email           string
	Password        string
	ConfirmPassword string
}

type Role

type Role struct {
	ID          common.ID
	Name        string
	DisplayName string
	Description string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

func NewRole

func NewRole(x RoleDto, finds ...*Role) *Role

func (*Role) Validate

func (x *Role) Validate() (err *multierror.Error)

type RoleDto

type RoleDto struct {
	ID          *common.ID
	Name        string
	DisplayName string
	Description string
}

type RoleMeta

type RoleMeta struct {
	Data  []*Role
	Total int
}

type RoleQueryParams

type RoleQueryParams struct {
	Search  string
	Page    int
	PerPage int
}

type RoleUser

type RoleUser struct {
	ID     common.ID
	UserId string
	RoleId string
}

func NewRoleUser

func NewRoleUser(x RoleUserDto) *RoleUser

func (*RoleUser) Validate

func (x *RoleUser) Validate() (err *multierror.Error)

type RoleUserDto

type RoleUserDto struct {
	ID     *common.ID
	UserId string
	RoleId string
}

type User

type User struct {
	ID              common.ID
	Name            string
	Email           string
	Role            string
	EmailVerifiedAt time.Time
	CreatedAt       time.Time
	UpdatedAt       time.Time
}

Jump to

Keyboard shortcuts

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