app

package
v0.8.56 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ModeDemo = "demo"
View Source
const ModeDev = "dev"
View Source
const ModeLocal = "local"
View Source
const ModeProd = "prod"
View Source
const ModeTest = "test"

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Mode          string
	Name          string
	Secret        string
	Flags         *Flags
	Scripts       []string
	DevPanel      *DevPanel
	GlobalContext context.Context
	CancelContext context.CancelFunc
}

func (*App) IsInDemoMode

func (app *App) IsInDemoMode() bool

func (*App) IsInDevMode added in v0.8.51

func (app *App) IsInDevMode() bool

func (*App) IsInLocalMode

func (app *App) IsInLocalMode() bool

func (*App) IsInMode

func (app *App) IsInMode(mode string) bool

func (*App) IsInProdMode

func (app *App) IsInProdMode() bool

func (*App) IsInTestMode

func (app *App) IsInTestMode() bool

type DevPanel

type DevPanel struct {
	UserEntity DevPanelUserEntity
	Router     func(ginEngine *gin.Engine)
	PoolStream *string
	PoolSearch *string
}

type DevPanelUserEntity

type DevPanelUserEntity interface {
	beeorm.Entity
	GetUsername() string
	GetPassword() string
}

type Flags

type Flags struct {
	Registry *FlagsRegistry
}

func (*Flags) Bool

func (f *Flags) Bool(name string) bool

func (*Flags) String

func (f *Flags) String(name string) string

type FlagsRegistry

type FlagsRegistry struct {
	Flags map[string]interface{}
}

func (*FlagsRegistry) Bool

func (r *FlagsRegistry) Bool(name string, value bool, usage string)

func (*FlagsRegistry) String

func (r *FlagsRegistry) String(name string, value string, usage string)

Jump to

Keyboard shortcuts

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