app

package
v0.0.0-...-f5bbbf4 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

App is the main Key Manager application object

func New

func New(cfg *Config, logger log.Logger) *App

func (*App) Close

func (app *App) Close() error

func (*App) Errors

func (app *App) Errors() <-chan error

func (*App) RegisterService

func (app *App) RegisterService(srv interface{}) error

func (*App) RegisterServiceConfig

func (app *App) RegisterServiceConfig(cfg interface{}) error

RegisterServiceConfig register a config cfg MUST be a pointer to a struct

func (*App) Router

func (app *App) Router() *gorillamux.Router

func (*App) Service

func (app *App) Service(srv interface{}) error

Service loads a service into srv It expects a pointer and then sets its value

func (*App) ServiceConfig

func (app *App) ServiceConfig(cfg interface{}) error

ServiceConfig loads a service configuration into cfg It expects a pointer to a struct and then sets its value

func (*App) SetMiddleware

func (app *App) SetMiddleware(mid func(http.Handler) http.Handler) error

func (*App) Start

func (app *App) Start(ctx context.Context) error

func (*App) Stop

func (app *App) Stop(ctx context.Context) error

type Config

type Config struct {
	HTTP *server.Config
}

Jump to

Keyboard shortcuts

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