domain

package
v0.0.0-...-7fbc4b1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ADMIN = 1
	USER  = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	ID        uint
	Filename  string
	Size      string
	Location  string
	UserID    uint
	User      User
	CreatedAt time.Time
	UpdatedAt time.Time
}

func NewFile

func NewFile(filename string, size string, location string, userID uint) *File

type FileAccess

type FileAccess struct {
	ID        uint
	Hash      string
	Secret    string
	FileID    uint
	File      File
	CreatedAt time.Time
	UpdatedAt time.Time
}

func NewFileAccess

func NewFileAccess(hash string, secret string, fileID uint) *FileAccess

func (FileAccess) TableName

func (FileAccess) TableName() string

type Role

type Role struct {
	ID   uint
	Role string
}

type User

type User struct {
	ID        uint
	FirstName string `validate:"required,gte=2,lte=255"`
	LastName  string `validate:"required,gte=2,lte=255"`
	Email     string `validate:"required,email"`
	Password  string `validate:"required,gte=6,lte=255"`
	RoleID    uint   `validate:"required"`
	Role      Role
	CreatedAt time.Time
	UpdatedAt time.Time
}

func NewUser

func NewUser(firstName string, lastName string, email string, password string) (*User, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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