app_default

package
v0.0.0-...-8122643 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Revision = "unknown"
View Source
var Time = "unknown"
View Source
var Version = "development"

Functions

func Application

func Application() string

func ConfigFile

func ConfigFile(defaultConfigFile ...string) string

Types

type AppConfig

type AppConfig struct {
	Cache cache.Cache
}

func (*AppConfig) GetCache

func (a *AppConfig) GetCache() cache.Cache

type AppConfigI

type AppConfigI interface {
	GetCache() cache.Cache
}

type Context

type Context struct {
	logger.WithLoggerBase
	config.WithCfgBase
	// contains filtered or unexported fields
}

func New

func New(buildConfig *app_context.BuildConfig, appConfig ...AppConfigI) *Context

func (*Context) AppInstance

func (c *Context) AppInstance() string

func (*Context) Application

func (c *Context) Application() string

func (*Context) Cache

func (c *Context) Cache() cache.Cache

func (*Context) Close

func (c *Context) Close()

func (*Context) Config

func (c *Context) Config() interface{}

func (*Context) Db

func (c *Context) Db() db.DB

func (*Context) GetTestParameter

func (c *Context) GetTestParameter(key string) (interface{}, bool)

func (*Context) Hostname

func (c *Context) Hostname() string

func (*Context) Init

func (c *Context) Init(configFile string, configType ...string) error

func (*Context) InitDB

func (c *Context) InitDB(configPath string, gormDbConnector ...*db_gorm.DbConnector) error

func (*Context) InitWithArgs

func (c *Context) InitWithArgs(configFile string, args []string, configType ...string) error

func (*Context) SetTestParameter

func (c *Context) SetTestParameter(key string, value interface{})

func (*Context) TestParameters

func (c *Context) TestParameters() map[string]interface{}

func (*Context) Testing

func (c *Context) Testing() bool

func (*Context) Validator

func (c *Context) Validator() validator.Validator

type WithInitGormDb

type WithInitGormDb interface {
	InitDB(configPath string, gormDbConnector ...*db_gorm.DbConnector) error
}

Jump to

Keyboard shortcuts

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