Documentation
¶
Index ¶
- Constants
- func Use(h fiber.Handler) *fiberMiddleware
- type AppInitializer
- type CORSConfig
- type Config
- type Connector
- type Context
- type Controller
- type ControllerInterface
- type Controllers
- type DB
- type Database
- type DatabaseConfig
- type Error
- func NewError(code int, descriptions ...string) *Error
- func NewErrorBadGateway(descriptions ...string) *Error
- func NewErrorBadRequest(descriptions ...string) *Error
- func NewErrorConflict(descriptions ...string) *Error
- func NewErrorExpectationFailed(descriptions ...string) *Error
- func NewErrorFailedDependency(descriptions ...string) *Error
- func NewErrorForbidden(descriptions ...string) *Error
- func NewErrorGatewayTimeout(descriptions ...string) *Error
- func NewErrorGone(descriptions ...string) *Error
- func NewErrorHTTPVersionNotSupported(descriptions ...string) *Error
- func NewErrorInsufficientStorage(descriptions ...string) *Error
- func NewErrorInternal(descriptions ...string) *Error
- func NewErrorLengthRequired(descriptions ...string) *Error
- func NewErrorLocked(descriptions ...string) *Error
- func NewErrorLoopDetected(descriptions ...string) *Error
- func NewErrorMethodNotAllowed(descriptions ...string) *Error
- func NewErrorMisdirectedRequest(descriptions ...string) *Error
- func NewErrorNetworkAuthenticationRequired(descriptions ...string) *Error
- func NewErrorNotAcceptable(descriptions ...string) *Error
- func NewErrorNotExtended(descriptions ...string) *Error
- func NewErrorNotFound(descriptions ...string) *Error
- func NewErrorNotImplemented(descriptions ...string) *Error
- func NewErrorPaymentRequired(descriptions ...string) *Error
- func NewErrorPreconditionFailed(descriptions ...string) *Error
- func NewErrorPreconditionRequired(descriptions ...string) *Error
- func NewErrorProxyAuthRequired(descriptions ...string) *Error
- func NewErrorRequestEntityTooLarge(descriptions ...string) *Error
- func NewErrorRequestHeaderFieldsTooLarge(descriptions ...string) *Error
- func NewErrorRequestTimeout(descriptions ...string) *Error
- func NewErrorRequestURITooLong(descriptions ...string) *Error
- func NewErrorRequestedRangeNotSatisfiable(descriptions ...string) *Error
- func NewErrorServiceUnavailable(descriptions ...string) *Error
- func NewErrorTeapot(descriptions ...string) *Error
- func NewErrorTooEarly(descriptions ...string) *Error
- func NewErrorTooManyRequests(descriptions ...string) *Error
- func NewErrorUnauthorized(descriptions ...string) *Error
- func NewErrorUnavailableForLegalReasons(descriptions ...string) *Error
- func NewErrorUnprocessableEntity(descriptions ...string) *Error
- func NewErrorUnsupportedMediaType(descriptions ...string) *Error
- func NewErrorUpgradeRequired(descriptions ...string) *Error
- func NewErrorVariantAlsoNegotiates(descriptions ...string) *Error
- type GeneralConfig
- type Map
- type Middleware
- type MiddlewareInterface
- type Middlewares
- type Migration
- type Migrations
- type Model
- type Raptor
- type Routes
- type SchemaMigration
- type ServerConfig
- type Service
- type ServiceInterface
- type Services
- type StaticConfig
- type Template
- type TemplatingConfig
- type Utils
Constants ¶
View Source
const ( DefaultGeneralConfigDevelopment = false DefaultServerConfigAddress = "127.0.0.1" DefaultServerConfigPort = 3000 DefaultShutdownTimeout = 3 DefaultProxyHeader = "" DefaultDatabaseConfigType = "none" DefaultDatabaseConfigHost = "localhost" DefaultDatabaseConfigPort = 5432 DefaultDatabaseConfigUser = "AppConfig" DefaultDatabaseConfigPass = "" DefaultDatabaseConfigName = "AppConfig" DefaultTemplatingConfigEnabled = false DefaultStaticConfigEnabled = true DefaultStaticConfigPrefix = "/public" DefaultStaticConfigRoot = "./public" DefaultCORSConfigOrigins = "*" DefaultCORSConfigCredentials = false )
View Source
const (
Version = "v1.0.2"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppInitializer ¶
type AppInitializer struct { Database Database Middlewares Middlewares Services Services Controllers Controllers Template Template }
type CORSConfig ¶ added in v0.6.0
type Config ¶
type Config struct { GeneralConfig GeneralConfig `toml:"General"` ServerConfig ServerConfig `toml:"Server"` DatabaseConfig DatabaseConfig `toml:"Database"` TemplatingConfig TemplatingConfig `toml:"Templating"` StaticConfig StaticConfig `toml:"Static"` CORSConfig CORSConfig `toml:"CORS"` AppConfig map[string]interface{} `toml:"App"` // contains filtered or unexported fields }
func (*Config) ApplyEnvirontmentVariable ¶ added in v0.6.3
func (*Config) ApplyEnvirontmentVariables ¶ added in v0.6.3
func (c *Config) ApplyEnvirontmentVariables()
type Controller ¶
type Controller struct { *Utils Services map[string]ServiceInterface // contains filtered or unexported fields }
func (*Controller) Init ¶ added in v0.3.3
func (c *Controller) Init(u *Utils, s map[string]ServiceInterface)
func (*Controller) OnInit ¶ added in v0.3.3
func (c *Controller) OnInit(callback func())
type ControllerInterface ¶
type ControllerInterface interface {
Init(u *Utils, s map[string]ServiceInterface)
}
type Controllers ¶
type Controllers []interface{}
type Database ¶ added in v0.3.4
type Database struct { Connector Connector Migrations Migrations }
type DatabaseConfig ¶ added in v0.6.0
type Error ¶ added in v0.9.1
type Error struct { Code int `json:"code"` Message string `json:"message"` Description string `json:"description,omitempty"` }
func NewErrorBadGateway ¶ added in v0.9.1
func NewErrorBadRequest ¶ added in v0.9.1
4xx
func NewErrorConflict ¶ added in v0.9.1
func NewErrorExpectationFailed ¶ added in v0.9.1
func NewErrorFailedDependency ¶ added in v0.9.1
func NewErrorForbidden ¶ added in v0.9.1
func NewErrorGatewayTimeout ¶ added in v0.9.1
func NewErrorGone ¶ added in v0.9.1
func NewErrorHTTPVersionNotSupported ¶ added in v0.9.1
func NewErrorInsufficientStorage ¶ added in v0.9.1
func NewErrorLengthRequired ¶ added in v0.9.1
func NewErrorLocked ¶ added in v0.9.1
func NewErrorLoopDetected ¶ added in v0.9.1
func NewErrorMethodNotAllowed ¶ added in v0.9.1
func NewErrorMisdirectedRequest ¶ added in v0.9.1
func NewErrorNetworkAuthenticationRequired ¶ added in v0.9.1
func NewErrorNotAcceptable ¶ added in v0.9.1
func NewErrorNotExtended ¶ added in v0.9.1
func NewErrorNotFound ¶ added in v0.9.1
func NewErrorNotImplemented ¶ added in v0.9.1
func NewErrorPaymentRequired ¶ added in v0.9.1
func NewErrorPreconditionFailed ¶ added in v0.9.1
func NewErrorPreconditionRequired ¶ added in v0.9.1
func NewErrorProxyAuthRequired ¶ added in v0.9.1
func NewErrorRequestEntityTooLarge ¶ added in v0.9.1
func NewErrorRequestHeaderFieldsTooLarge ¶ added in v0.9.1
func NewErrorRequestTimeout ¶ added in v0.9.1
func NewErrorRequestURITooLong ¶ added in v0.9.1
func NewErrorRequestedRangeNotSatisfiable ¶ added in v0.9.1
func NewErrorServiceUnavailable ¶ added in v0.9.1
func NewErrorTeapot ¶ added in v0.9.1
func NewErrorTooEarly ¶ added in v0.9.1
func NewErrorTooManyRequests ¶ added in v0.9.1
func NewErrorUnauthorized ¶ added in v0.9.1
func NewErrorUnavailableForLegalReasons ¶ added in v0.9.1
func NewErrorUnprocessableEntity ¶ added in v0.9.1
func NewErrorUnsupportedMediaType ¶ added in v0.9.1
func NewErrorUpgradeRequired ¶ added in v0.9.1
func NewErrorVariantAlsoNegotiates ¶ added in v0.9.1
type GeneralConfig ¶ added in v0.6.0
type GeneralConfig struct {
Development bool
}
type Middleware ¶
type Middleware struct { Utils *Utils // contains filtered or unexported fields }
func (*Middleware) Init ¶ added in v0.3.3
func (m *Middleware) Init(u *Utils)
func (*Middleware) OnInit ¶ added in v0.3.3
func (m *Middleware) OnInit(callback func())
type MiddlewareInterface ¶
type Middlewares ¶
type Middlewares []MiddlewareInterface
type Migrations ¶ added in v0.4.5
type Raptor ¶
type Raptor struct { Utils *Utils // contains filtered or unexported fields }
func (*Raptor) Init ¶
func (r *Raptor) Init(app *AppInitializer)
func (*Raptor) RegisterRoutes ¶ added in v0.8.3
type SchemaMigration ¶ added in v0.4.5
type ServerConfig ¶ added in v0.6.0
type ServiceInterface ¶
type ServiceInterface interface {
Init(u *Utils)
}
type Services ¶
type Services []ServiceInterface
type StaticConfig ¶ added in v0.6.0
type TemplatingConfig ¶ added in v0.6.0
type TemplatingConfig struct {
Enabled bool
}
Click to show internal directories.
Click to hide internal directories.