Documentation ¶
Index ¶
- Constants
- func GracefulStop(port int, timeout time.Duration, engine GracefulEngine, logger GracefulLogger)
- func GracefulStopWithContext(ctx context.Context, port int, timeout time.Duration, engine GracefulEngine, ...)
- type Application
- func (app *Application) AuditLog() audit.Manager
- func (app *Application) ClientAuth() auth.ClientManager
- func (app *Application) Config() config.Manager
- func (app *Application) Context() context.Context
- func (app *Application) DB(key string) db.Manager
- func (app *Application) DefaultDB() db.Manager
- func (app *Application) DefaultDBR() db.Manager
- func (app *Application) DefaultInMemory() inmemory.Manager
- func (app *Application) DefaultScheduler() scheduler.Manager
- func (app *Application) Env() string
- func (app *Application) FeatureFlag() fflag.Manager
- func (app *Application) GRPC(context string) rpc.ClientManager
- func (app *Application) HasDB(key string) bool
- func (app *Application) HasDBS() bool
- func (app *Application) HasDefaultDB() bool
- func (app *Application) HasInMemory() bool
- func (app *Application) HasScheduler() bool
- func (app *Application) InMemory(key string) inmemory.Manager
- func (app *Application) Log() logger.Manager
- func (app *Application) MaskedFields() []string
- func (app *Application) MaskedHeaders() []string
- func (app *Application) Metrics() telemetry.MetricsManager
- func (app *Application) MiddlewareTelemetry() interface{}
- func (app *Application) Name() string
- func (app *Application) PortGrpc() int
- func (app *Application) PortRest() int
- func (app *Application) REST(context string) rest.Manager
- func (app *Application) Run(run func(a *Application))
- func (app *Application) RunAsDaemon(run func(a *Application))
- func (app *Application) RunGrpcServer(run func(app *Application, rpcServer *grpc.Server))
- func (app *Application) RunRestApiUseEcho(run func(a *Application, e *echo.Echo))
- func (app *Application) RunUseEcho(run func(a *Application, e *echo.Echo))
- func (app *Application) SOAP(context string) soap.Manager
- func (app *Application) Scheduler(key string) scheduler.Manager
- func (app *Application) Scope() string
- func (app *Application) Telemetry() telemetry.Manager
- func (app *Application) Version() string
- func (app *Application) WithAuditLog() IApplication
- func (app *Application) WithClientAuthorization() IApplication
- func (app *Application) WithContext(ctx context.Context) IApplication
- func (app *Application) WithDatabases() IApplication
- func (app *Application) WithFeatureFlag() IApplication
- func (app *Application) WithGrpcClients() IApplication
- func (app *Application) WithInMemories() IApplication
- func (app *Application) WithRestClients() IApplication
- func (app *Application) WithSchedulers() IApplication
- func (app *Application) WithSoapClients() IApplication
- func (app *Application) WithValue(key any, value any) IApplication
- type ConfigKey
- type EnvKey
- type GracefulEngine
- type GracefulLogger
- type IApplication
- type IAudit
- type IAuth
- type IContext
- type IFeatureFlag
- type IMonitoring
- type IRemotes
- type IRun
- type IScheduler
- type IStorage
- type Key
- type Option
- func WithCustomRequestIdGenerator(v func() string) Option
- func WithGracefulTimeout(v time.Duration) Option
- func WithName(v string) Option
- func WithParseRequestId(v bool) Option
- func WithPortGrpcConfigPath(path string) Option
- func WithPortRestConfigPath(path string) Option
- func WithScope(v string) Option
- func WithStartContext(v context.Context) Option
- func WithVersion(v string) Option
Constants ¶
View Source
const ( AppSection ConfigKey = "app" AppName = AppSection + ".name" AppVersion = AppSection + ".version" AppEnv = AppSection + ".env" AppPortRest = AppSection + ".port.rest" AppPortGrpc = AppSection + ".port.grpc" AppGracefulTimeout = AppSection + ".graceful_timeout" AppLogLevel = AppSection + ".log.level" AppLogTimezone = AppSection + ".log.tz" AppLogUseCustomTimezone = AppSection + ".log.use_custom_timezone" AppHealth = AppSection + ".healthcheck.health" AppMetric = AppSection + ".healthcheck.metrics" AppDependencies = AppSection + ".healthcheck.dependencies" )
View Source
const (
DefaultKey = "default"
)
Variables ¶
This section is empty.
Functions ¶
func GracefulStop ¶ added in v0.3.0
func GracefulStop(port int, timeout time.Duration, engine GracefulEngine, logger GracefulLogger)
func GracefulStopWithContext ¶ added in v0.3.0
func GracefulStopWithContext(ctx context.Context, port int, timeout time.Duration, engine GracefulEngine, logger GracefulLogger)
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func (*Application) AuditLog ¶ added in v0.3.0
func (app *Application) AuditLog() audit.Manager
func (*Application) ClientAuth ¶ added in v0.3.0
func (app *Application) ClientAuth() auth.ClientManager
func (*Application) Config ¶
func (app *Application) Config() config.Manager
func (*Application) Context ¶ added in v0.3.0
func (app *Application) Context() context.Context
func (*Application) DefaultDB ¶
func (app *Application) DefaultDB() db.Manager
func (*Application) DefaultDBR ¶ added in v0.3.0
func (app *Application) DefaultDBR() db.Manager
func (*Application) DefaultInMemory ¶ added in v0.3.0
func (app *Application) DefaultInMemory() inmemory.Manager
func (*Application) DefaultScheduler ¶
func (app *Application) DefaultScheduler() scheduler.Manager
func (*Application) Env ¶
func (app *Application) Env() string
func (*Application) FeatureFlag ¶
func (app *Application) FeatureFlag() fflag.Manager
func (*Application) GRPC ¶
func (app *Application) GRPC(context string) rpc.ClientManager
func (*Application) HasDB ¶
func (app *Application) HasDB(key string) bool
func (*Application) HasDBS ¶ added in v0.3.0
func (app *Application) HasDBS() bool
func (*Application) HasDefaultDB ¶ added in v0.3.3
func (app *Application) HasDefaultDB() bool
func (*Application) HasInMemory ¶ added in v0.3.0
func (app *Application) HasInMemory() bool
func (*Application) HasScheduler ¶
func (app *Application) HasScheduler() bool
func (*Application) InMemory ¶ added in v0.3.0
func (app *Application) InMemory(key string) inmemory.Manager
func (*Application) Log ¶
func (app *Application) Log() logger.Manager
func (*Application) MaskedFields ¶
func (app *Application) MaskedFields() []string
func (*Application) MaskedHeaders ¶
func (app *Application) MaskedHeaders() []string
func (*Application) Metrics ¶
func (app *Application) Metrics() telemetry.MetricsManager
func (*Application) MiddlewareTelemetry ¶
func (app *Application) MiddlewareTelemetry() interface{}
func (*Application) Name ¶
func (app *Application) Name() string
func (*Application) PortGrpc ¶ added in v0.3.0
func (app *Application) PortGrpc() int
func (*Application) PortRest ¶ added in v0.3.0
func (app *Application) PortRest() int
func (*Application) Run ¶
func (app *Application) Run(run func(a *Application))
func (*Application) RunAsDaemon ¶
func (app *Application) RunAsDaemon(run func(a *Application))
func (*Application) RunGrpcServer ¶
func (app *Application) RunGrpcServer(run func(app *Application, rpcServer *grpc.Server))
func (*Application) RunRestApiUseEcho ¶
func (app *Application) RunRestApiUseEcho(run func(a *Application, e *echo.Echo))
func (*Application) RunUseEcho ¶ added in v0.1.1
func (app *Application) RunUseEcho(run func(a *Application, e *echo.Echo))
func (*Application) Scope ¶
func (app *Application) Scope() string
func (*Application) Telemetry ¶
func (app *Application) Telemetry() telemetry.Manager
func (*Application) Version ¶
func (app *Application) Version() string
func (*Application) WithAuditLog ¶ added in v0.3.0
func (app *Application) WithAuditLog() IApplication
func (*Application) WithClientAuthorization ¶ added in v0.3.0
func (app *Application) WithClientAuthorization() IApplication
func (*Application) WithContext ¶ added in v0.3.0
func (app *Application) WithContext(ctx context.Context) IApplication
func (*Application) WithDatabases ¶
func (app *Application) WithDatabases() IApplication
func (*Application) WithFeatureFlag ¶
func (app *Application) WithFeatureFlag() IApplication
func (*Application) WithGrpcClients ¶
func (app *Application) WithGrpcClients() IApplication
func (*Application) WithInMemories ¶ added in v0.3.0
func (app *Application) WithInMemories() IApplication
func (*Application) WithRestClients ¶
func (app *Application) WithRestClients() IApplication
func (*Application) WithSchedulers ¶
func (app *Application) WithSchedulers() IApplication
func (*Application) WithSoapClients ¶
func (app *Application) WithSoapClients() IApplication
func (*Application) WithValue ¶ added in v0.3.0
func (app *Application) WithValue(key any, value any) IApplication
type GracefulEngine ¶ added in v0.1.1
type GracefulLogger ¶ added in v0.1.1
type GracefulLogger interface { Info(i ...interface{}) Fatal(i ...interface{}) }
type IApplication ¶
type IApplication interface { Name() string Version() string Env() string Config() config.Manager IMonitoring IRemotes IRun IStorage IScheduler IFeatureFlag IContext IAuth IAudit }
func NewApp ¶
func NewApp(opts ...Option) IApplication
type IAudit ¶ added in v0.3.0
type IAudit interface { WithAuditLog() IApplication AuditLog() audit.Manager }
type IAuth ¶ added in v0.3.0
type IAuth interface { WithClientAuthorization() IApplication ClientAuth() auth.ClientManager }
type IContext ¶ added in v0.3.0
type IContext interface { WithValue(key any, value any) IApplication WithContext(ctx context.Context) IApplication Context() context.Context }
type IFeatureFlag ¶
type IFeatureFlag interface { WithFeatureFlag() IApplication FeatureFlag() fflag.Manager }
type IMonitoring ¶
type IRemotes ¶
type IRemotes interface { WithRestClients() IApplication WithSoapClients() IApplication WithGrpcClients() IApplication REST(context string) rest.Manager SOAP(context string) soap.Manager GRPC(context string) rpc.ClientManager }
type IRun ¶
type IRun interface { Run(run func(a *Application)) RunAsDaemon(run func(a *Application)) RunUseEcho(run func(app *Application, e *echo.Echo)) RunRestApiUseEcho(run func(app *Application, e *echo.Echo)) RunGrpcServer(run func(app *Application, rpcServer *grpc.Server)) }
type IScheduler ¶
type IStorage ¶
type IStorage interface { WithDatabases() IApplication DB(key string) db.Manager HasDBS() bool HasDB(key string) bool HasDefaultDB() bool DefaultDB() db.Manager DefaultDBR() db.Manager WithInMemories() IApplication InMemory(key string) inmemory.Manager HasInMemory() bool DefaultInMemory() inmemory.Manager }
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithCustomRequestIdGenerator ¶ added in v0.3.0
func WithGracefulTimeout ¶ added in v0.3.0
func WithParseRequestId ¶ added in v0.3.0
func WithPortGrpcConfigPath ¶ added in v0.3.1
func WithPortRestConfigPath ¶ added in v0.3.1
func WithStartContext ¶ added in v0.3.0
func WithVersion ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.