app_context

package
v0.0.0-...-7edcfce Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Testing *testing.T
View Source
var TimeLocationOs *time.Location
View Source
var Timezone = "UTC"

Functions

func Abort

func Abort(msg string, err ...error)

func AbortError

func AbortError(ctx Context, msg string, err ...error)

func AbortFatal

func AbortFatal(ctx Context, msg string, err ...error)

func ErrorLn

func ErrorLn(msg string)

func Panic

func Panic(msg string, err error)

func SetTimeZone

func SetTimeZone(timezone ...string) error

Types

type BuildConfig

type BuildConfig struct {
	Version  string
	Time     string
	Revision string
}

type Context

type Context interface {
	logger.WithLogger
	config.WithCfg
	db.WithDB

	Cache() cache.Cache
	Validator() validator.Validator

	Testing() bool
	TestParameters() map[string]interface{}
	SetTestParameter(key string, value interface{})
	GetTestParameter(key string) (interface{}, bool)

	AppInstance() string
	Application() string
	Hostname() string

	Close()
}

type WithApp

type WithApp interface {
	App() Context
}

type WithAppBase

type WithAppBase struct {
	// contains filtered or unexported fields
}

func (*WithAppBase) App

func (w *WithAppBase) App() Context

func (*WithAppBase) Init

func (w *WithAppBase) Init(app Context)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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