Documentation ¶
Index ¶
- Variables
- type Application
- func (a *Application) BuiltAt() time.Time
- func (a *Application) DebugLevel() DebugLevel
- func (a *Application) DevelEnv() bool
- func (a *Application) ID() string
- func (a *Application) IsStopping() bool
- func (a *Application) LookupEnv(env string) (string, bool)
- func (a *Application) Name() string
- func (a *Application) OnError(err error) error
- func (a *Application) SetDebugLevel(dl DebugLevel) DebugLevel
- func (a *Application) StartedAt() time.Time
- func (a *Application) Stop()
- func (a *Application) StopChannel() <-chan struct{}
- func (a *Application) Usage() string
- func (a *Application) Version() string
- type DebugLevel
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrStop = errors.New("stop application")
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func New ¶
func New(name, version, builtAt, usage string) *Application
func (*Application) BuiltAt ¶
func (a *Application) BuiltAt() time.Time
func (*Application) DebugLevel ¶
func (a *Application) DebugLevel() DebugLevel
func (*Application) DevelEnv ¶
func (a *Application) DevelEnv() bool
func (*Application) ID ¶
func (a *Application) ID() string
func (*Application) IsStopping ¶
func (a *Application) IsStopping() bool
func (*Application) Name ¶
func (a *Application) Name() string
func (*Application) OnError ¶
func (a *Application) OnError(err error) error
func (*Application) SetDebugLevel ¶
func (a *Application) SetDebugLevel(dl DebugLevel) DebugLevel
func (*Application) StartedAt ¶
func (a *Application) StartedAt() time.Time
func (*Application) Stop ¶
func (a *Application) Stop()
func (*Application) StopChannel ¶
func (a *Application) StopChannel() <-chan struct{}
func (*Application) Usage ¶
func (a *Application) Usage() string
func (*Application) Version ¶
func (a *Application) Version() string
type DebugLevel ¶
type DebugLevel int
const ( DebugOff DebugLevel = iota + 1 DebugLight DebugHeavy )
Click to show internal directories.
Click to hide internal directories.