Documentation
¶
Index ¶
- func ErrorHandler(w http.ResponseWriter, r *http.Request, code int, body []byte, err error)
- func RegistrarRota(rota string, tipoMetodo TipoMetodoEnum, funcao http.HandlerFunc)
- type CoreApi
- func (api *CoreApi) LogCritical(v ...interface{})
- func (api *CoreApi) LogDebug(v ...interface{})
- func (api *CoreApi) LogError(v ...interface{})
- func (api *CoreApi) LogFatal(v ...interface{})
- func (api *CoreApi) LogInfo(v ...interface{})
- func (api *CoreApi) LogWarning(v ...interface{})
- func (ca *CoreApi) Start() error
- type Metodo
- type Processo
- type RegistraController
- type RegistraRotasController
- type Rotas
- type Route
- type RouteGroup
- type RouteGroups
- type Tenant
- type Tenants
- type TipoMetodoEnum
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorHandler ¶
func RegistrarRota ¶
func RegistrarRota(rota string, tipoMetodo TipoMetodoEnum, funcao http.HandlerFunc)
Types ¶
type CoreApi ¶
type CoreApi struct {
Api *config.Api
Certs config.Certs
Dbs []*config.Database
Parans config.Params
Connection *dbconndataset.ConnDataSet
Processo *Processo
}
func NewCoreApi ¶
func (*CoreApi) LogCritical ¶
func (api *CoreApi) LogCritical(v ...interface{})
func (*CoreApi) LogWarning ¶
func (api *CoreApi) LogWarning(v ...interface{})
type Metodo ¶
type Metodo struct {
TipoMetodo TipoMetodoEnum
Funcao http.HandlerFunc
}
type Processo ¶
type Processo struct {
Tenants *Tenants
}
func (*Processo) Carregar ¶
func (pr *Processo) Carregar(conn *dbconndataset.ConnDataSet)
type RegistraController ¶
type RegistraController struct {
RouteGroups RouteGroups
}
func GetRegistraInstance ¶
func GetRegistraInstance() *RegistraController
func (*RegistraController) FindRouteGroup ¶
func (rc *RegistraController) FindRouteGroup(name string) *RouteGroup
func (*RegistraController) RegisterRouteGroup ¶
func (rc *RegistraController) RegisterRouteGroup(rg *RouteGroup)
type RegistraRotasController ¶
type RegistraRotasController struct {
RegisteredRoutes Rotas
}
func GetRegistraRotasInstance ¶
func GetRegistraRotasInstance() *RegistraRotasController
type Rotas ¶
func (Rotas) RegisterMetodo ¶
func (r Rotas) RegisterMetodo(rota string, tipoMetodo TipoMetodoEnum, funcao http.HandlerFunc)
type Route ¶
type Route struct {
Pattern string
Method TipoMetodoEnum
HandlerFunc http.HandlerFunc
}
type RouteGroup ¶
func RegisterRouterGroup ¶
func RegisterRouterGroup(name string) *RouteGroup
func (*RouteGroup) FindRoute ¶
func (rg *RouteGroup) FindRoute(pattern string, method TipoMetodoEnum) *Route
func (*RouteGroup) RegisterRoute ¶
func (rg *RouteGroup) RegisterRoute(pattern string, method TipoMetodoEnum, handler http.HandlerFunc)
type RouteGroups ¶
type RouteGroups []*RouteGroup
type Tenant ¶
type Tenant struct {
Name string
Connection *dbconndataset.ConnDataSet
}
type Tenants ¶
type Tenants []*Tenant
func (*Tenants) Add ¶
func (ts *Tenants) Add(name string, conn *dbconndataset.ConnDataSet)
func (*Tenants) FindByName ¶
type TipoMetodoEnum ¶
type TipoMetodoEnum int
const ( GET TipoMetodoEnum = iota POST PUT DELETE PATCH WEBSOCKET )
Click to show internal directories.
Click to hide internal directories.