Documentation ¶
Index ¶
Constants ¶
View Source
const AllowedFileExtensions = "" // comma separated, e.g. "jpeg,jpg,gif,png,eps,raw,tif,tiff,bmp,log,txt,key,pem,csv"
AllowedFileExtensions default allowed file extensions
View Source
const MaxFileSize = 5242880 // 5 MB
MaxFileSize default max file size
Variables ¶
View Source
var ( // ErrGeneric is used for testing purposes and for errors handled later in the callstack ErrGeneric = errors.New("generic error") // ErrRecordNotFound (404) is returned when a record was not found ErrRecordNotFound = errors.New("record not found") ErrForbidden = errors.New("forbidden to access resource") ErrUnauthorized = errors.New(http.StatusText(http.StatusUnauthorized)) )
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct { ID int `json:"id" gorm:"primarykey"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt time.Time `json:"deleted_at,omitempty" gorm:"index"` }
Base contains common fields for all tables
type HTTPErrorResponse ¶
type HTTPErrorResponse struct {
Error string `json:"error"`
}
type HTTPOKResponse ¶
type HTTPOKResponse struct {
Data interface{} `json:"data"`
}
type MetaSetting ¶
type MetaSetting struct {
Hoster string `json:"hoster"`
}
type PolicySetting ¶
type PolicySetting struct { }
Click to show internal directories.
Click to hide internal directories.