Documentation
¶
Index ¶
Constants ¶
View Source
const HeadersModelKey = "_abstracte_api_headersmodel_key"
View Source
const InputModelKey = "_abstracte_api_inputmodel_key"
View Source
const InputParamsKey = "_abstracte_api_inputparams_key"
View Source
const LogIdx = 0x0
View Source
const LogKey = "_abstracte_api_config_log_key"
View Source
const QueryParamsKey = "_abstracte_api_queryparams_key"
View Source
const RuntimeKey = "_abstracte_api_runtime_key"
View Source
const ServiceResultKey string = "_abstracte_serviceresult_key"
View Source
const TenantIdx = 0x1
View Source
const TenantKey = "_abstracte_api_config_tenant_key"
View Source
const TxIdx = 0x1
View Source
const TxKey = "_abstracte_api_config_tx_key"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigBuilder ¶
type ConfigBuilder interface {
Log(ConfigLog) ConfigBuilder
CustomLog(C) ConfigBuilder
Tenant(ConfigTenant) ConfigBuilder
CustomTenant(C) ConfigBuilder
Tx(ConfigTx) ConfigBuilder
CustomTx(C) ConfigBuilder
Headers(interface{}) ConfigBuilder
CustomHeaders(C) ConfigBuilder
InputModel(interface{}) ConfigBuilder
CustomInputModel(C) ConfigBuilder
InputParams(name []string) ConfigBuilder
CustomInputParam(C) ConfigBuilder
QueryParams(interface{}) ConfigBuilder
CustomQueryParams(C) ConfigBuilder
CustomBeforeRun(C) ConfigBuilder
CustomAfterRun(C) ConfigBuilder
Build() Config
}
type ConfigTenant ¶
type ConfigTenant uint
const ( ConfigTenantNo ConfigTenant = 0x0 ConfigTenantFromHeaders ConfigTenant = 0x1 )
type ErrorModel ¶
type ErrorModel struct {
// Service error code.
// required: true
Code ApiError `json:"code"`
// Error hint message
Msg string `json:"msg"`
// Detailed error hint message
DevMsg string `json:"devMsg"`
// Request correlation id
CorrId string `json:"corrId"`
}
swagger:model ErrorModel
type Model ¶
type Model struct {
// The error response of the API
//
// required: true
Error ErrorModel `json:"err"`
// Business response of the service. Skipped if error occurs
Data interface{} `json:"data,omitempty"`
}
swagger:model Model
type Service ¶
type Service func(runtime.Context, ServiceInput) ServiceOutput
type ServiceInput ¶
type ServiceOutput ¶
Click to show internal directories.
Click to hide internal directories.