Documentation
¶
Index ¶
- Variables
- func Errorf(baseErr error, format string, args ...interface{}) error
- func IsError(err, target error) bool
- func NewError(message string) error
- func NewErrorf(format string, args ...interface{}) error
- func WrapError(err error, message string) error
- func WrapErrorf(err error, format string, args ...interface{}) error
- type ActionBroker
- type ActionBrokerCreator
- type ActionHandler
- type ActionMessage
- type ActionsConfig
- type AuthProvider
- type AuthProviderItemConfig
- type AuthProviderManager
- type AuthProvidersConfig
- type BrokerConfig
- type CacheConfig
- type CacheEntry
- type CacheHandlerConfig
- type CacheManager
- type CacheManagerCreator
- type CallOptions
- type CertificateStatus
- type CircuitBreakerConfig
- type ClientManager
- type ClientsConfig
- type ConfigManager
- type Counter
- type CreateDocumentsRequest
- type CronConfig
- type CronManager
- type DatabaseConfig
- type DatabaseManager
- type DatabaseManagerCreator
- type DeleteDocumentsRequest
- type Dispatcher
- type DocConfig
- type DocsConfig
- type DocumentationManager
- type ErrorResponse
- type EventSchema
- type FastHTTPHandler
- type FastResponseWriter
- type Gauge
- type GroupBuilder
- type HTTPConfig
- type HTTPRouter
- type HTTPServer
- type HealthCheck
- type HealthChecker
- type HealthConfig
- type HealthManager
- type HealthReport
- type HealthStatus
- type HealthSummary
- type Histogram
- type JobEntry
- type LifecycleManager
- type Logger
- type LoggerConfig
- type LoggerCreator
- type LoggerManager
- type MetricValue
- type MetricsCollectorConfig
- type MetricsConfig
- type MetricsHTTPConfig
- type MetricsManager
- type MetricsManagerCreator
- type MetricsStats
- type Middleware
- type MiddlewareEntry
- type MiddlewareItemConfig
- type MiddlewareManager
- type MiddlewaresConfig
- type OpenAPISpec
- type ReadDocumentsRequest
- type RequestCtx
- func (ctx *RequestCtx) Error(err error, statusCode int)
- func (ctx *RequestCtx) Marshal(data any) ([]byte, error)
- func (ctx *RequestCtx) ReadJSON(request any) error
- func (ctx *RequestCtx) Success(data []byte, header []byte) (int, error)
- func (ctx *RequestCtx) SuccessJSON(data any) (int, error)
- func (ctx *RequestCtx) Unmarshal(data []byte, request any) error
- type RouteBuilder
- type RouteConfig
- type RouteDefinition
- type RouteDocumentation
- type RouteInfo
- type RouteMediaType
- type RouteOperation
- type RouteParameter
- type RoutePathItem
- type RouteRequestBody
- type RouteResponse
- type RouteSchema
- type RouteSecurityScheme
- type ServerConfig
- type ServiceAuthConfig
- type ServiceClientConfig
- type ServiceConfig
- type ServiceInfo
- type SpecComponents
- type SpecInfo
- type SpecServer
- type Summary
- type TLSConfig
- type TLSManager
- type UpdateDocumentsRequest
- type VersionInfo
- type WebhooksConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrConfigNotFound = NewError("config not found") ErrLoggerConfigInvalid = NewError("config invalid") ErrConfigInvalidPath = NewError("config invalid path") ErrConfigParseFailed = NewError("config parse failed") ErrConfigIsNil = NewError("config is nil") ErrConfigLoadFailed = NewError("config load failed") ErrConfigValidateFailed = NewError("config validate failed") )
View Source
var ( ErrServerNotRunning = NewError("server not running") ErrServerAlreadyRunning = NewError("server already running") ErrServerStartFailed = NewError("server start failed") ErrServerStopFailed = NewError("server stop failed") ErrRouteFinalizationFailed = NewError("route finalization failed") ErrHandlerIsNil = NewError("handler is nil") )
View Source
var ( ErrMiddlewareNotFound = NewError("middleware not found") ErrMiddlewareInvalidType = NewError("middleware invalid type") ErrMiddlewareOrderInvalid = NewError("middleware order invalid") ErrAuthTokenInvalid = NewError("auth token invalid") ErrBodyTooLarge = NewError("body too large") ErrRateLimitExceeded = NewError("rate limit exceeded") )
View Source
var ( ErrCacheNotFound = NewError("cache not found") ErrCacheKeyEmpty = NewError("cache key empty") ErrCacheConnectionFailed = NewError("cache connection failed") ErrCacheTypeUnknown = NewError("cache type unknown") ErrCacheOperationFailed = NewError("cache operation failed") ErrCacheIsDisabled = NewError("cache manager is disabled") )
View Source
var ( ErrDatabaseNotFound = NewError("database not found") ErrDatabaseConnectionFailed = NewError("database connection failed") ErrDatabaseTypeUnknown = NewError("database type unknown") ErrDatabaseOperationFailed = NewError("database operation failed") ErrDatabaseIsDisabled = NewError("database manager is disabled") ErrDatabaseCollectionExists = NewError("database collection exists") ErrDatabaseDocumentNotFound = NewError("database document not found") )
View Source
var ( ErrActionNotInitialized = NewError("action not initialized") ErrActionPublishFailed = NewError("action publish failed") ErrActionConnectionFailed = NewError("action connection failed") ErrActionConfigInvalid = NewError("action config invalid") ErrActionTypeUnknown = NewError("action type unknown") ErrActionIsDisabled = NewError("action broker is disabled") ErrActionIsRunning = NewError("action is running") )
View Source
var ( ErrCronJobNotFound = NewError("cron job not found") ErrCronIsRunning = NewError("cron is running") ErrCronSchedulerStopped = NewError("cron scheduler stopped") ErrCronJobExists = NewError("cron job exists") ErrCronExpressionInvalid = NewError("cron expression invalid") ErrCronJobFailed = NewError("cron job failed") ErrCronJobNameIsEmpty = NewError("cron job name is empty") ErrCronJobIsNil = NewError("cron job is nil") ErrCronJobTimeout = NewError("cron job timeout") )
View Source
var ( ErrMetricsNotRunning = NewError("metrics manager not running") ErrMetricsTypeUnknown = NewError("metrics type unknown") ErrMetricsStartFailed = NewError("metrics start failed") ErrMetricsConfigInvalid = NewError("metrics config invalid") ErrMetricsIsDisabled = NewError("metrics manager is disabled") ErrTemplateFailed = NewError("metrics manager template build failed") ErrMetricsGetFailed = NewError("metrics manager get failed") ErrMetricsStatsGetFailed = NewError("metrics manager stats get failed") )
View Source
var ( ErrClientNotFound = NewError("client not found") ErrClientCreateFailed = NewError("client create failed") ErrClientRequestFailed = NewError("client request failed") ErrClientResponseInvalid = NewError("client response invalid") ErrClientTimeout = NewError("client timeout") ErrCircuitBreakerOpen = NewError("circuit breaker open") )
View Source
var ( ErrHealthIsNotRunning = NewError("health manager is not running") ErrHealthCheckFailed = NewError("health check failed") ErrHealthCheckTimeout = NewError("health check timeout") )
View Source
var ( ErrDocsIsNotRunning = NewError("documentation manager is not running") ErrDocsGenerateFailed = NewError("documentation generation failed") )
View Source
var ( ErrLogFileIsEmpty = NewError("log file is empty") ErrLogFileWrongFormat = NewError("log file wrong format") ErrLoggerTypeUnknown = NewError("logger type unknown") )
View Source
var ( ErrServiceIsRunning = NewError("service is running") ErrServiceIsNotRunning = NewError("service is not running") ErrComponentNotFound = NewError("component not found") ErrComponentStartFailed = NewError("component start failed") ErrComponentStopFailed = NewError("component stop failed") )
View Source
var ( ErrInvalidParameter = NewError("invalid parameter") ErrOperationFailed = NewError("operation failed") ErrNotImplemented = NewError("not implemented") ErrPermissionDenied = NewError("permission denied") ErrResourceNotFound = NewError("resource not found") ErrInternalError = NewError("internal error") ErrContextCancelled = NewError("context cancelled") ErrContextTimeout = NewError("context timeout") ErrInvalidState = NewError("invalid state") ErrNotSupported = NewError("not supported") ErrMarshaling = NewError("error during marshalling") ErrUnMarshaling = NewError("error during unmarshalling") ErrWriteContext = NewError("error during write context") ErrPathNotFound = NewError("path not found") )
Functions ¶
func WrapErrorf ¶ added in v1.1.1
Types ¶
type ActionBroker ¶
type ActionBrokerCreator ¶
type ActionBrokerCreator func(config interface{}) (ActionBroker, error)
type ActionHandler ¶
type ActionHandler func(payload *ActionMessage) error
type ActionMessage ¶
type ActionsConfig ¶
type ActionsConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
Broker *BrokerConfig `yaml:"broker" json:"broker"`
Webhooks *WebhooksConfig `yaml:"webhooks" json:"webhooks"`
Events map[string]EventSchema `yaml:"events" json:"events"`
}
type AuthProvider ¶
type AuthProvider interface {
Type() string
ApplyToIncomingRequest(ctx *RequestCtx) error
ApplyToOutgoingRequest(req *fasthttp.Request, authConfig *ServiceAuthConfig) error
}
type AuthProviderItemConfig ¶
type AuthProviderItemConfig struct {
Params map[string]interface{} `yaml:"params" json:"params"`
}
type AuthProviderManager ¶
type AuthProviderManager interface {
Register(name string, provider AuthProvider) error
}
type AuthProvidersConfig ¶
type AuthProvidersConfig struct {
Token *AuthProviderItemConfig `json:"token" yaml:"token"`
Basic *AuthProviderItemConfig `json:"basic" yaml:"basic"`
}
type BrokerConfig ¶
type CacheConfig ¶
type CacheEntry ¶
type CacheHandlerConfig ¶
type CacheManager ¶
type CacheManager interface {
LifecycleManager
Get(key string) (interface{}, bool)
Set(key string, value interface{}, ttl time.Duration) error
Delete(key string) error
Invalidate(keys ...string) error
GetRevision(key string) uint64
SetRevision(key string, revision uint64)
BuildCacheKey(requestPath []byte, dependencies []string, metadata map[string][]byte) string
}
type CacheManagerCreator ¶
type CacheManagerCreator func(config interface{}) (CacheManager, error)
type CallOptions ¶
type CertificateStatus ¶
type CertificateStatus struct {
Domain string `json:"domain"`
Status string `json:"status"`
Issuer string `json:"issuer,omitempty"`
Subject string `json:"subject,omitempty"`
NotBefore time.Time `json:"not_before,omitempty"`
NotAfter time.Time `json:"not_after,omitempty"`
DaysUntilExpiry int `json:"days_until_expiry,omitempty"`
Error string `json:"error,omitempty"`
}
type CircuitBreakerConfig ¶
type CircuitBreakerConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
FailureThreshold int `yaml:"failure_threshold" json:"failure_threshold"`
RecoveryTimeout time.Duration `yaml:"recovery_timeout" json:"recovery_timeout"`
HalfOpenRequests int `yaml:"half_open_requests" json:"half_open_requests"`
}
type ClientManager ¶
type ClientManager interface {
Call(serviceName, method, path string, data interface{}, opts *CallOptions) ([]byte, int, error)
}
type ClientsConfig ¶ added in v1.1.1
type ClientsConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
DefaultTimeout time.Duration `yaml:"default_timeout" json:"default_timeout"`
MaxIdleConnections int `yaml:"max_idle_connections" json:"max_idle_connections"`
IdleConnTimeout time.Duration `yaml:"idle_conn_timeout" json:"idle_conn_timeout"`
DefaultRetries int `yaml:"default_retries" json:"default_retries"`
CircuitBreaker *CircuitBreakerConfig `yaml:"circuit_breaker" json:"circuit_breaker"`
Services map[string]*ServiceClientConfig `yaml:"services" json:"services"`
}
type ConfigManager ¶
type ConfigManager interface {
GetConfig() *ServiceConfig
GetValue(path string, defaultValue interface{}) interface{}
GetAs(path string, target interface{}) error
}
type CreateDocumentsRequest ¶ added in v1.1.2
type CreateDocumentsRequest struct {
Collection string `json:"collection"`
Data []interface{} `json:"data"`
}
type CronConfig ¶
type CronManager ¶
type DatabaseConfig ¶ added in v1.1.2
type DatabaseManager ¶ added in v1.1.2
type DatabaseManager interface {
LifecycleManager
CreateDocuments(ctx context.Context, request CreateDocumentsRequest) ([]string, error)
ReadDocuments(ctx context.Context, request ReadDocumentsRequest) ([]map[string]interface{}, int64, error)
UpdateDocuments(ctx context.Context, request UpdateDocumentsRequest) (int64, error)
DeleteDocuments(ctx context.Context, request DeleteDocumentsRequest) (int64, error)
CreateCollection(collectionName string) error
DropCollection(collectionName string) error
}
type DatabaseManagerCreator ¶ added in v1.1.2
type DatabaseManagerCreator func(*DatabaseConfig) (DatabaseManager, error)
type DeleteDocumentsRequest ¶ added in v1.1.2
type Dispatcher ¶
type Dispatcher interface {
ActionBroker
}
type DocsConfig ¶
type DocumentationManager ¶
type DocumentationManager interface {
LifecycleManager
}
type ErrorResponse ¶ added in v1.1.1
type EventSchema ¶
type FastHTTPHandler ¶
type FastHTTPHandler func(ctx *RequestCtx)
type FastResponseWriter ¶
type FastResponseWriter struct {
// contains filtered or unexported fields
}
func NewFastResponseWriter ¶
func NewFastResponseWriter(ctx *RequestCtx) *FastResponseWriter
func (*FastResponseWriter) Header ¶
func (frw *FastResponseWriter) Header() http.Header
func (*FastResponseWriter) WriteHeader ¶
func (frw *FastResponseWriter) WriteHeader(statusCode int)
type GroupBuilder ¶
type GroupBuilder interface {
WithCache(key string, ttl time.Duration, dependencies ...string) GroupBuilder
WithMiddlewares(names ...string) GroupBuilder
WithoutMiddlewares(names ...string) GroupBuilder
WithTimeout(duration time.Duration) GroupBuilder
Route(method, path string, handler FastHTTPHandler) RouteBuilder
GET(path string, handler FastHTTPHandler) RouteBuilder
POST(path string, handler FastHTTPHandler) RouteBuilder
PATCH(path string, handler FastHTTPHandler) RouteBuilder
PUT(path string, handler FastHTTPHandler) RouteBuilder
DELETE(path string, handler FastHTTPHandler) RouteBuilder
Group(prefix string) GroupBuilder
}
type HTTPConfig ¶
type HTTPConfig struct {
Host string `yaml:"host" json:"host"`
Port int `yaml:"port" json:"port" validate:"min=1,max=65535"`
ReadTimeout int `yaml:"read_timeout" json:"read_timeout"`
WriteTimeout int `yaml:"write_timeout" json:"write_timeout"`
IdleTimeout int `yaml:"idle_timeout" json:"idle_timeout"`
ShutdownTimeout int `yaml:"shutdown_timeout" json:"shutdown_timeout"`
}
type HTTPRouter ¶
type HTTPRouter interface {
Add(method, path string, handler FastHTTPHandler, config *RouteConfig)
Group(prefix string) GroupBuilder
GET(path string, handler FastHTTPHandler) RouteBuilder
POST(path string, handler FastHTTPHandler) RouteBuilder
PUT(path string, handler FastHTTPHandler) RouteBuilder
DELETE(path string, handler FastHTTPHandler) RouteBuilder
GetAllRoutes() map[string]*RouteInfo
}
type HTTPServer ¶
type HTTPServer interface {
LifecycleManager
}
type HealthCheck ¶
type HealthChecker ¶
type HealthChecker func(ctx context.Context) HealthCheck
type HealthConfig ¶
type HealthConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
}
type HealthManager ¶
type HealthManager interface {
LifecycleManager
RegisterChecker(name string, checker HealthChecker)
Check(ctx context.Context) HealthReport
}
type HealthReport ¶
type HealthReport struct {
Status HealthStatus `json:"status"`
Timestamp time.Time `json:"timestamp"`
Uptime time.Duration `json:"uptime"`
Service ServiceInfo `json:"service"`
Checks map[string]HealthCheck `json:"checks"`
Summary HealthSummary `json:"summary"`
}
type HealthStatus ¶
type HealthStatus string
const ( StatusHealthy HealthStatus = "healthy" StatusUnhealthy HealthStatus = "unhealthy" StatusUnknown HealthStatus = "unknown" )
type HealthSummary ¶
type LifecycleManager ¶
type Logger ¶
type Logger interface {
Error(msg string, fields ...zap.Field)
ErrorWithErrStack(msg string, err error, fields ...zap.Field)
ErrorWithStack(msg string, stack string, fields ...zap.Field)
Warn(msg string, fields ...zap.Field)
Info(msg string, fields ...zap.Field)
Debug(msg string, fields ...zap.Field)
Log(lvl zapcore.Level, msg string, fields ...zap.Field)
}
type LoggerConfig ¶
type LoggerCreator ¶
type LoggerManager ¶
type LoggerManager interface {
Logger
}
type MetricValue ¶
type MetricsCollectorConfig ¶
type MetricsConfig ¶
type MetricsConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
Type string `yaml:"type" json:"type" validate:"required_if=Enabled true"`
Config interface{} `yaml:"config" json:"config"`
Prefix string `yaml:"prefix" json:"prefix"`
Labels map[string]string `yaml:"labels" json:"labels"`
HTTP MetricsHTTPConfig `yaml:"http" json:"http"`
Collectors MetricsCollectorConfig `yaml:"collectors" json:"collectors"`
}
type MetricsHTTPConfig ¶
type MetricsManager ¶
type MetricsManager interface {
LifecycleManager
Counter(name string, labels map[string]string) Counter
Gauge(name string, labels map[string]string) Gauge
Histogram(name string, buckets []float64, labels map[string]string) Histogram
Summary(name string, objectives map[float64]float64, labels map[string]string) Summary
RegisterSystemMetrics() error
StartSystemCollection() error
StopSystemCollection() error
GetMetrics() ([]byte, error)
GetStats() ([]byte, error)
}
type MetricsManagerCreator ¶
type MetricsManagerCreator func(config interface{}) (MetricsManager, error)
type MetricsStats ¶
type MetricsStats struct {
TotalMetrics int `json:"total_metrics"`
CounterMetrics int `json:"counter_metrics"`
GaugeMetrics int `json:"gauge_metrics"`
HistogramMetrics int `json:"histogram_metrics"`
SummaryMetrics int `json:"summary_metrics"`
Labels map[string]int `json:"labels"`
LastUpdate time.Time `json:"last_update"`
MemoryUsage int64 `json:"memory_usage"`
Collections uint64 `json:"collections"`
Errors uint64 `json:"errors"`
Details map[string]interface{} `json:"details"`
}
type Middleware ¶
type Middleware interface {
Handle(ctx *RequestCtx, next func(*RequestCtx), config *RouteConfig)
Name() string
Weight() int
}
type MiddlewareEntry ¶
type MiddlewareEntry struct {
Name string
Middleware Middleware
Weight int
}
type MiddlewareItemConfig ¶
type MiddlewareManager ¶
type MiddlewareManager interface {
LifecycleManager
Register(middleware Middleware) error
Execute(ctx *RequestCtx, handler func(*RequestCtx), config *RouteConfig)
}
type MiddlewaresConfig ¶
type MiddlewaresConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
Auth *MiddlewareItemConfig `yaml:"auth" json:"auth"`
Metadata *MiddlewareItemConfig `yaml:"metadata" json:"metadata"`
Logging *MiddlewareItemConfig `yaml:"logging" json:"logging"`
Cache *MiddlewareItemConfig `yaml:"cache" json:"cache"`
Recovery *MiddlewareItemConfig `yaml:"recovery" json:"recovery"`
Compression *MiddlewareItemConfig `yaml:"compression" json:"compression"`
CORS *MiddlewareItemConfig `yaml:"cors" json:"cors"`
RateLimit *MiddlewareItemConfig `yaml:"rate_limit" json:"rate_limit"`
BodyLimit *MiddlewareItemConfig `yaml:"body_limit" json:"body_limit"`
}
type OpenAPISpec ¶
type OpenAPISpec struct {
OpenAPI string `json:"openapi"`
Info SpecInfo `json:"info"`
Servers []SpecServer `json:"servers"`
Paths map[string]*RoutePathItem `json:"paths"`
Components *SpecComponents `json:"components"`
Tags []string `json:"tags"`
}
type ReadDocumentsRequest ¶ added in v1.1.2
type RequestCtx ¶
type RequestCtx struct {
*fasthttp.RequestCtx
}
func (*RequestCtx) Error ¶ added in v1.1.1
func (ctx *RequestCtx) Error(err error, statusCode int)
func (*RequestCtx) Marshal ¶ added in v1.1.1
func (ctx *RequestCtx) Marshal(data any) ([]byte, error)
func (*RequestCtx) ReadJSON ¶
func (ctx *RequestCtx) ReadJSON(request any) error
func (*RequestCtx) Success ¶ added in v1.1.1
func (ctx *RequestCtx) Success(data []byte, header []byte) (int, error)
func (*RequestCtx) SuccessJSON ¶ added in v1.1.1
func (ctx *RequestCtx) SuccessJSON(data any) (int, error)
type RouteBuilder ¶
type RouteBuilder interface {
WithCache(key string, ttl time.Duration, dependencies ...string) RouteBuilder
WithMiddlewares(names ...string) RouteBuilder
WithoutMiddlewares(names ...string) RouteBuilder
WithTimeout(duration time.Duration) RouteBuilder
WithDoc(title, description, tag string, requestType, responseType interface{}) RouteBuilder
}
type RouteConfig ¶
type RouteDefinition ¶
type RouteDefinition struct {
Method string
Path string
Handler FastHTTPHandler
Config *RouteConfig
}
type RouteDocumentation ¶
type RouteInfo ¶
type RouteInfo struct {
Handler FastHTTPHandler
Config *RouteConfig
}
type RouteMediaType ¶
type RouteMediaType struct {
Schema *RouteSchema `json:"schema,omitempty"`
Example interface{} `json:"example,omitempty"`
}
type RouteOperation ¶
type RouteOperation struct {
Summary string `json:"summary,omitempty"`
Description string `json:"description,omitempty"`
Tags []string `json:"tags,omitempty"`
Parameters []RouteParameter `json:"parameters,omitempty"`
RequestBody *RouteRequestBody `json:"requestBody,omitempty"`
Responses map[string]*RouteResponse `json:"responses"`
Security []map[string][]string `json:"security,omitempty"`
}
type RouteParameter ¶
type RouteParameter struct {
Name string `json:"name"`
In string `json:"in"`
Required bool `json:"required,omitempty"`
Description string `json:"description,omitempty"`
Schema *RouteSchema `json:"schema,omitempty"`
Example interface{} `json:"example,omitempty"`
}
type RoutePathItem ¶
type RoutePathItem struct {
Get *RouteOperation `json:"get,omitempty"`
Post *RouteOperation `json:"post,omitempty"`
Put *RouteOperation `json:"put,omitempty"`
Delete *RouteOperation `json:"delete,omitempty"`
Patch *RouteOperation `json:"patch,omitempty"`
}
type RouteRequestBody ¶
type RouteRequestBody struct {
Description string `json:"description,omitempty"`
Content map[string]*RouteMediaType `json:"content"`
Required bool `json:"required,omitempty"`
}
type RouteResponse ¶
type RouteResponse struct {
Description string `json:"description"`
Content map[string]*RouteMediaType `json:"content,omitempty"`
}
type RouteSchema ¶
type RouteSchema struct {
Type string `json:"type,omitempty"`
Format string `json:"format,omitempty"`
Description string `json:"description,omitempty"`
Properties map[string]*RouteSchema `json:"properties,omitempty"`
Required []string `json:"required,omitempty"`
Items *RouteSchema `json:"items,omitempty"`
Example interface{} `json:"example,omitempty"`
Enum []interface{} `json:"enum,omitempty"`
Minimum *float64 `json:"minimum,omitempty"`
Maximum *float64 `json:"maximum,omitempty"`
MinLength *int `json:"minLength,omitempty"`
MaxLength *int `json:"maxLength,omitempty"`
}
type RouteSecurityScheme ¶
type ServerConfig ¶
type ServerConfig struct {
HTTP *HTTPConfig `yaml:"http" json:"http"`
TLS *TLSConfig `yaml:"tls" json:"tls"`
}
type ServiceAuthConfig ¶
type ServiceClientConfig ¶
type ServiceClientConfig struct {
Url string `yaml:"url" json:"url" validate:"required"`
Auth *ServiceAuthConfig `yaml:"auth" json:"auth"`
Events []string `yaml:"events" json:"events"`
}
type ServiceConfig ¶
type ServiceConfig struct {
Name string `yaml:"name" json:"name" validate:"required"`
Version string `yaml:"version" json:"version" validate:"required"`
Server *ServerConfig `yaml:"server" json:"server"`
Logger *LoggerConfig `yaml:"logger" json:"logger"`
Cache *CacheConfig `yaml:"cache" json:"cache"`
Database *DatabaseConfig `yaml:"database" json:"database"`
Actions *ActionsConfig `yaml:"actions" json:"actions"`
Cron *CronConfig `yaml:"cron" json:"cron"`
AuthProviders *AuthProvidersConfig `yaml:"auth_providers" json:"auth_providers"`
Middlewares *MiddlewaresConfig `yaml:"middlewares" json:"middlewares"`
Docs *DocsConfig `yaml:"docs" json:"docs"`
Metrics *MetricsConfig `yaml:"metrics" json:"metrics"`
Clients *ClientsConfig `yaml:"clients" json:"clients"`
Health *HealthConfig `yaml:"health" json:"health"`
}
type ServiceInfo ¶
type SpecComponents ¶
type SpecComponents struct {
Schemas map[string]*RouteSchema `json:"schemas,omitempty"`
SecuritySchemes map[string]*RouteSecurityScheme `json:"securitySchemes,omitempty"`
}
type SpecServer ¶
type TLSConfig ¶
type TLSConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
CertFile string `yaml:"cert_file,omitempty" json:"cert_file,omitempty"`
KeyFile string `yaml:"key_file,omitempty" json:"key_file,omitempty"`
AutoCert bool `yaml:"auto_cert" json:"auto_cert"`
Domains []string `yaml:"domains,omitempty" json:"domains,omitempty"`
Email string `yaml:"email,omitempty" json:"email,omitempty"`
CacheDir string `yaml:"cache_dir,omitempty" json:"cache_dir,omitempty"`
ACMEDirectory string `yaml:"acme_directory,omitempty" json:"acme_directory,omitempty"`
}
type TLSManager ¶
type TLSManager interface {
LifecycleManager
Serve(addr string) (net.Listener, error)
GetTLSConfig() *tls.Config
GetCertificateStatus() map[string]CertificateStatus
}
type UpdateDocumentsRequest ¶ added in v1.1.2
type VersionInfo ¶
type WebhooksConfig ¶
type WebhooksConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
Config interface{} `yaml:"config" json:"config"`
}
Click to show internal directories.
Click to hide internal directories.