Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrBadRequest ¶
ErrBadRequest returns a 400 status code response.
func ErrConflict ¶
ErrConflict returns a 409 status code response.
func ErrNotFound ¶
ErrNotFound returns a 404 status code response.
func ErrUnauthorized ¶
ErrUnauthorized returns a 401 status code response.
func RandomString ¶
RandomString generates random string of given length
Types ¶
type BaseModel ¶
type BaseModel struct { ID uuid.UUID `gorm:"type:uuid;primary_key;"` CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time `sql:"index"` }
BaseModel contains common columns for all tables.
type ErrorResponse ¶
ErrorResponse is the standard ContracterAPI error format
func (*ErrorResponse) Render ¶
func (e *ErrorResponse) Render(w http.ResponseWriter, r *http.Request) error
Render sets the error status code.
Click to show internal directories.
Click to hide internal directories.