app

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ModeDemo = "demo"
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
	Ctx      context.Context
}

func (*App) IsInDemoMode

func (app *App) IsInDemoMode() 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
}

type DevPanelUserEntity

type DevPanelUserEntity interface {
	orm.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