entity

package
v0.0.0-...-46bccf7 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnique                  = errors.New("any field in your resource already existed")
	ErrNotFound                = errors.New("your requested resource is not found")
	ErrForbiddenAccess         = errors.New("forbidden to access resource")
	ErrNotSameLenSlice         = errors.New("length of 2 list is not equal")
	ErrEmptyPayload            = errors.New("your request payload should not be empty")
	ErrAnyEntityNotCreatedToDb = errors.New("any entity not created to db")
)

Functions

This section is empty.

Types

type Access

type Access string
const (
	AccessPUBLIC  Access = "PUBLIC"
	AccessPRIVATE Access = "PRIVATE"
)

func AllAccessValues

func AllAccessValues() []Access

func (Access) Valid

func (e Access) Valid() bool

type File

type File struct {
	ID        int64     `json:"id"`
	Name      string    `json:"name"`
	Access    Access    `json:"access"`
	Path      string    `json:"path"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
	Ext       string    `json:"ext"`
}

Jump to

Keyboard shortcuts

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