contracts

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvProduction  = "production"
	EnvDevelopment = "development"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	CanBoot
	CanInit
	CanStart
	CanStop
	Container
	Env() string
	Name() string
	Provide(items ...Provider)
	Command(items ...*cli.Command)
	Run(args []string)
}

type CanBoot

type CanBoot interface {
	BootService()
}

type CanInit

type CanInit interface {
	InitService()
}

type CanStart

type CanStart interface {
	StartService()
}

type CanStop

type CanStop interface {
	StopService()
}

type Config

type Config interface {
	New(provider string) ConfigSet
	Parse(arguments []string)
	Visit(fn func(f ConfigFlag))
}

type ConfigFlag

type ConfigFlag interface {
	Name() string
	Usage() string
	Value() string
	Default() string
	Provider() string
}

type ConfigSet

type ConfigSet interface {
	BoolVar(p *bool, name string, value bool, usage string)
	IntVar(p *int, name string, value int, usage string)
	Int64Var(p *int64, name string, value int64, usage string)
	UintVar(p *uint, name string, value uint, usage string)
	Uint64Var(p *uint64, name string, value uint64, usage string)
	StringVar(p *string, name string, value string, usage string)
	Float64Var(p *float64, name string, value float64, usage string)
	DurationVar(p *time.Duration, name string, value time.Duration, usage string)
}

type Container

type Container interface {
	Instances() []interface{}
	Singleton(resolver interface{})
	Transient(resolver interface{})
	Make(receiver interface{}) []interface{}
}

type Dispatcher

type Dispatcher interface {
	Listen(l interface{})
	Fire(ctx context.Context, e interface{})
}

type Provider

type Provider interface {
	Config(c ConfigSet)
	Boot(a Application)
	Register(a Application)
}

Jump to

Keyboard shortcuts

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