scaffold

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultKey = "default"
)

Variables

This section is empty.

Functions

func GracefulStart added in v0.1.1

func GracefulStart(port int, timeout time.Duration, engine GracefulEngine, logger GracefulLogger)

Types

type Application

type Application struct {
	// contains filtered or unexported fields
}

func (*Application) Cache

func (app *Application) Cache(key string) cache.Manager

func (*Application) Config

func (app *Application) Config() config.Manager

func (*Application) DB

func (app *Application) DB(key string) db.Manager

func (*Application) DefaultCache

func (app *Application) DefaultCache() cache.Manager

func (*Application) DefaultDB

func (app *Application) DefaultDB() db.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) HasCache

func (app *Application) HasCache() bool

func (*Application) HasDB

func (app *Application) HasDB() bool

func (*Application) HasScheduler

func (app *Application) HasScheduler() bool

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) Port added in v0.1.1

func (app *Application) Port() int

func (*Application) REST

func (app *Application) REST(context string) rest.Manager

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) SOAP

func (app *Application) SOAP(context string) soap.Manager

func (*Application) Scheduler

func (app *Application) Scheduler(key string) scheduler.Manager

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) WithCaches

func (app *Application) WithCaches() 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) WithRestClients

func (app *Application) WithRestClients() IApplication

func (*Application) WithSchedulers

func (app *Application) WithSchedulers() IApplication

func (*Application) WithSoapClients

func (app *Application) WithSoapClients() IApplication

type GracefulEngine added in v0.1.1

type GracefulEngine interface {
	Start(port string) error
	Shutdown(ctx context.Context) error
}

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
}

func NewApp

func NewApp(opts ...Option) IApplication

type IFeatureFlag

type IFeatureFlag interface {
	WithFeatureFlag() IApplication

	FeatureFlag() fflag.Manager
}

type IMonitoring

type IMonitoring interface {
	Log() logger.Manager
	Telemetry() telemetry.Manager
	Metrics() telemetry.MetricsManager
	MiddlewareTelemetry() interface{}
	// contains filtered or unexported methods
}

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 IScheduler interface {
	WithSchedulers() IApplication
	HasScheduler() bool
	Scheduler(key string) scheduler.Manager
	DefaultScheduler() scheduler.Manager
}

type IStorage

type IStorage interface {
	WithDatabases() IApplication
	DB(key string) db.Manager
	HasDB() bool
	DefaultDB() db.Manager

	WithCaches() IApplication
	Cache(ke string) cache.Manager
	HasCache() bool
	DefaultCache() cache.Manager
}

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithName

func WithName(v string) Option

func WithPortConfigPath added in v0.1.1

func WithPortConfigPath(path string) Option

func WithScope

func WithScope(v string) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL