Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError interface {
Error() string
GetStatus() int
SetStatus(int)
GetMessage() string
SetMessage(string)
}
APIError interface
type ApplicationError ¶
ApplicationError application error struct
func NewApplicationError ¶
func NewApplicationError(err error) *ApplicationError
NewApplicationError generates a new ApplicationError
func (*ApplicationError) Error ¶
func (r *ApplicationError) Error() string
func (*ApplicationError) GetMessage ¶
func (r *ApplicationError) GetMessage() string
GetMessage details of the error
func (*ApplicationError) GetStatus ¶
func (r *ApplicationError) GetStatus() int
GetStatus status code for the error
func (*ApplicationError) SetMessage ¶
func (r *ApplicationError) SetMessage(message string)
SetMessage sets the details map of the error
func (*ApplicationError) SetStatus ¶
func (r *ApplicationError) SetStatus(status int)
SetStatus sets the status code for the error
type Config ¶
type Config struct {
DB struct {
Type string `yaml:"type"`
} `yaml:"DB"`
SQLite3 struct {
Path string `yaml:"path"`
DBName string `yaml:"db_name"`
} `yaml:"SQLITE3"`
PostgreSQL struct {
Host string `yaml:"host"`
Port string `yaml:"port"`
DBName string `yaml:"db_name"`
} `yaml:"POSTGRESQL"`
Nitrado struct {
Accounts map[string][]string `yaml:"accounts"`
} `yaml:"NITRADO"`
}
Config struct that contians the structure of the config
type Log ¶
type Log struct {
MinSeverity int
LogInformation int
LogLow int
LogMedium int
LogHigh int
LogFatal int
}
Log struct
type ModelError ¶
ModelError model error struct
func NewModelError ¶
func NewModelError(err error) *ModelError
NewModelError generates a new ModelError
func (*ModelError) Error ¶
func (r *ModelError) Error() string
func (*ModelError) GetMessage ¶
func (r *ModelError) GetMessage() string
GetMessage details of the error
func (*ModelError) GetStatus ¶
func (r *ModelError) GetStatus() int
GetStatus status code for the error
func (*ModelError) SetMessage ¶
func (r *ModelError) SetMessage(message string)
SetMessage sets the details map of the error
func (*ModelError) SetStatus ¶
func (r *ModelError) SetStatus(status int)
SetStatus sets the status code for the error
type RequestError ¶
RequestError request error struct
func NewRequestError ¶
func NewRequestError(err error) *RequestError
NewRequestError generates a new RequestError
func (*RequestError) Error ¶
func (r *RequestError) Error() string
func (*RequestError) GetMessage ¶
func (r *RequestError) GetMessage() string
GetMessage details of the error
func (*RequestError) GetStatus ¶
func (r *RequestError) GetStatus() int
GetStatus status code for the error
func (*RequestError) SetMessage ¶
func (r *RequestError) SetMessage(message string)
SetMessage sets the details map of the error
func (*RequestError) SetStatus ¶
func (r *RequestError) SetStatus(status int)
SetStatus sets the status code for the error
type ValidationError ¶
ValidationError validation error struct
func NewValidationError ¶
func NewValidationError(err error) *ValidationError
NewValidationError generates a new ValidationError
func (*ValidationError) Error ¶
func (r *ValidationError) Error() string
func (*ValidationError) GetMessage ¶
func (r *ValidationError) GetMessage() string
GetMessage details of the error
func (*ValidationError) GetStatus ¶
func (r *ValidationError) GetStatus() int
GetStatus status code for the error
func (*ValidationError) SetMessage ¶
func (r *ValidationError) SetMessage(message string)
SetMessage sets the details map of the error
func (*ValidationError) SetStatus ¶
func (r *ValidationError) SetStatus(status int)
SetStatus sets the status code for the error