context

package
v0.0.0-...-f17293a Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationContext

type ApplicationContext struct {
	Logger logger.ILogger
	Conf   *viper.Viper

	AppReady bool
	Opts     map[string]interface{}
}

func NewAppContext

func NewAppContext() *ApplicationContext

func (*ApplicationContext) Deadline

func (*ApplicationContext) Deadline() (deadline time.Time, ok bool)

func (*ApplicationContext) Done

func (*ApplicationContext) Done() <-chan struct{}

func (*ApplicationContext) Err

func (*ApplicationContext) Err() error

func (*ApplicationContext) IsRunInProductionMode

func (a *ApplicationContext) IsRunInProductionMode() bool

func (*ApplicationContext) Value

func (*ApplicationContext) Value(key interface{}) interface{}

type Context

type Context struct {
	Unique string

	App  *ApplicationContext
	Opts map[string]interface{}

	Session Session
	// contains filtered or unexported fields
}

func New

func New() *Context

func (*Context) Deadline

func (*Context) Deadline() (deadline time.Time, ok bool)

func (*Context) Done

func (*Context) Done() <-chan struct{}

func (*Context) Err

func (*Context) Err() error

func (*Context) Get

func (c *Context) Get(key string) (value interface{}, exists bool)

func (*Context) GetBool

func (c *Context) GetBool(key string) (b bool)

func (*Context) GetDuration

func (c *Context) GetDuration(key string) (d time.Duration)

func (*Context) GetFloat64

func (c *Context) GetFloat64(key string) (f64 float64)

func (*Context) GetInt

func (c *Context) GetInt(key string) (i int)

func (*Context) GetInt64

func (c *Context) GetInt64(key string) (i64 int64)

func (*Context) GetString

func (c *Context) GetString(key string) (s string)

func (*Context) GetStringMap

func (c *Context) GetStringMap(key string) (sm map[string]interface{})

func (*Context) GetStringMapString

func (c *Context) GetStringMapString(key string) (sms map[string]string)

func (*Context) GetStringMapStringSlice

func (c *Context) GetStringMapStringSlice(key string) (smss map[string][]string)

func (*Context) GetStringSlice

func (c *Context) GetStringSlice(key string) (ss []string)

func (*Context) GetTime

func (c *Context) GetTime(key string) (t time.Time)

func (*Context) Set

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

func (*Context) Value

func (*Context) Value(key interface{}) interface{}

type Session

type Session struct {
	AccessToken string
	RequestId   string
}

Jump to

Keyboard shortcuts

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