app

package
v0.0.0-...-ae73b0a Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvProd = "prod"
	EnvTest = "test"
	EnvDev  = "dev"
)
View Source
const (
	BaseConfigFile         = "app.toml"
	DefaultHttpPort        = 9500
	DefaultAppName         = "community-metadata"
	DefaultInterval        = 60
	DefaultSyncChannelSize = 100
)

Variables

View Source
var (
	//App name
	Name string
	//Debug mode
	Debug bool
	//Current host name
	Hostname string
	//App port listen to
	HttpPort = DefaultHttpPort
	//Env name
	EnvName = EnvDev
	//App git info
	GitInfo AppInfo
)
View Source
var (
	Config *config.Config
)
View Source
var Logger *zap.Logger

logger instance

Functions

func Bootstrap

func Bootstrap(configDir string)

func LocTime

func LocTime() time.Time

LocTime get local time

Types

type AppInfo

type AppInfo struct {
	Tag       string `json:"tag" description:"get tag name"`
	Version   string `json:"version" description:"git repo version."`
	ReleaseAt string `json:"releaseAt" description:"latest commit date"`
}

Jump to

Keyboard shortcuts

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