Documentation ¶
Index ¶
- Constants
- 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 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 DefaultServerConfigShutdownTimeout = 3 DefaultServerConfigProxyHeader = "" DefaultDatabaseConfigType = "none" DefaultDatabaseConfigHost = "localhost" DefaultDatabaseConfigPort = 5432 DefaultDatabaseConfigUser = "AppConfig" DefaultDatabaseConfigPass = "" DefaultDatabaseConfigName = "AppConfig" DefaultTemplatingConfigEnabled = false DefaultStaticConfigEnabled = true DefaultStaticConfigPrefix = "/public" DefaultStaticConfigRoot = "./public" DefaultStaticConfigHTML5 = false DefaultStaticConfigIndex = "index.html" DefaultStaticConfigBrowse = false DefaultCORSConfigOrigins = "*" DefaultCORSConfigCredentials = false )
View Source
const (
Version = "v3.0.1"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppInitializer ¶
type AppInitializer struct { Routes Routes Database Database Middlewares Middlewares Services Services Controllers Controllers Template Template }
type CORSConfig ¶
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 ¶
func (*Config) ApplyEnvirontmentVariables ¶
func (c *Config) ApplyEnvirontmentVariables()
type Controller ¶
type Controller struct { *Utils Services map[string]ServiceInterface // contains filtered or unexported fields }
func (*Controller) Init ¶
func (c *Controller) Init(u *Utils, s map[string]ServiceInterface)
func (*Controller) OnInit ¶
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 ¶
type Database struct { Connector Connector Migrations Migrations }
type DatabaseConfig ¶
type Error ¶
type Error struct { Code int `json:"code"` Message string `json:"message"` Description string `json:"description,omitempty"` }
func NewErrorBadGateway ¶
func NewErrorConflict ¶
func NewErrorForbidden ¶
func NewErrorGatewayTimeout ¶
func NewErrorGone ¶
func NewErrorLengthRequired ¶
func NewErrorLocked ¶
func NewErrorLoopDetected ¶
func NewErrorNotAcceptable ¶
func NewErrorNotExtended ¶
func NewErrorNotFound ¶
func NewErrorNotImplemented ¶
func NewErrorPaymentRequired ¶
func NewErrorRequestTimeout ¶
func NewErrorTeapot ¶
func NewErrorTooEarly ¶
func NewErrorTooManyRequests ¶
func NewErrorUnauthorized ¶
func NewErrorUpgradeRequired ¶
type GeneralConfig ¶
type GeneralConfig struct {
Development bool
}
type Middleware ¶
func (*Middleware) InitMiddleware ¶
func (m *Middleware) InitMiddleware(r *Raptor)
func (*Middleware) OnInit ¶
func (m *Middleware) OnInit(callback func())
type MiddlewareInterface ¶
type Middlewares ¶
type Middlewares []MiddlewareInterface
type Migrations ¶
type Raptor ¶
type Raptor struct { Utils *Utils Server *echo.Echo Routes Routes // contains filtered or unexported fields }
func (*Raptor) Init ¶
func (r *Raptor) Init(app *AppInitializer) *Raptor
type SchemaMigration ¶
type ServerConfig ¶
type Service ¶
func (*Service) InitService ¶
type ServiceInterface ¶
type ServiceInterface interface {
InitService(r *Raptor)
}
type Services ¶
type Services []ServiceInterface
type StaticConfig ¶
type TemplatingConfig ¶
type TemplatingConfig struct {
Enabled bool
}
Click to show internal directories.
Click to hide internal directories.