models

package
v0.0.0-...-eeb60d1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CustomerType Access Type: only access to backend APIs
	CustomerType = "Customer"

	// AdminType Access Type: full access to backend and admin APIs
	AdminType = "Admin"

	// IdentityKey Authentication Identity Field Name
	IdentityKey = "email"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Name    string
	UUID    string
	Size    int
	TypeId  string
	UserId  int
	Content *multipart.FileHeader
	Tags    []string
}

File general object contains file details

type FileType

type FileType struct {
	Name        string
	AllowedSize int
	IsBanned    bool
}

FileType general object contains filetype details

type User

type User struct {
	Id          int        `json:"id"`
	FirstName   string     `json:"firstName"`
	LastName    string     `json:"lastName"`
	Email       string     `json:"email"`
	AccessType  string     `json:"accessType"`
	CreatedAt   time.Time  `json:"createdAt"`
	UpdatedAt   time.Time  `json:"updatedAt"`
	LastLoginAt *time.Time `json:"LastLoginAt"`
}

User general object contains user details

type UserCreationParameters

type UserCreationParameters struct {
	Password   string `json:"password"`
	FirstName  string `json:"firstName"`
	LastName   string `json:"lastName"`
	Email      string `json:"email"`
	AccessType string `json:"accessType"`
}

UserCreationParameters input parameters for creating users

type UserLoginCredentials

type UserLoginCredentials struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

UserLoginCredentials login credential

type UserRegisterParameters

type UserRegisterParameters struct {
	Password  string `json:"password"`
	FirstName string `json:"firstName"`
	LastName  string `json:"lastName"`
	Email     string `json:"email"`
}

UserRegisterParameters input parameters for creating users

type UserTokenResponse

type UserTokenResponse struct {
	Code   int       `json:"code"`
	Expire time.Time `json:"expire"`
	Token  string    `json:"token"`
}

UserTokenResponse successful login response object for JWT token output

type UserWithPassword

type UserWithPassword struct {
	Password    string     `json:"password"`
	Id          int        `json:"id"`
	FirstName   string     `json:"firstName"`
	LastName    string     `json:"lastName"`
	Email       string     `json:"email"`
	AccessType  string     `json:"accessType"`
	CreatedAt   time.Time  `json:"createdAt"`
	UpdatedAt   time.Time  `json:"updatedAt"`
	LastLoginAt *time.Time `json:"LastLoginAt"`
}

UserWithPassword private object to retrieve user's full details

Jump to

Keyboard shortcuts

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