utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFactoryNotFound = errors.New("factory not found")
)

Functions

func GetLocalIP

func GetLocalIP() (ipv4 string, err error)

Types

type Container

type Container struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Container

var (
	MasterContainer *Container
)

func NewContainer

func NewContainer() *Container

Container instantiation

func (*Container) Ensure

func (p *Container) Ensure(instance interface{}) error

ensure

func (*Container) GetPrototype

func (p *Container) GetPrototype(name string) (interface{}, error)

get prototype object

func (*Container) GetSingleton

func (p *Container) GetSingleton(name string) interface{}

get singleton object

func (*Container) SetPrototype

func (p *Container) SetPrototype(name string, factory factory)

get prototype object

func (*Container) SetSingleton

func (p *Container) SetSingleton(name string, singleton interface{})

registered singleton object

func (*Container) String

func (p *Container) String() string

type IniParser

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

func (*IniParser) GetFloat32

func (current *IniParser) GetFloat32(section string, key string) float32

func (*IniParser) GetFloat64

func (current *IniParser) GetFloat64(section string, key string) float64

func (*IniParser) GetInt32

func (current *IniParser) GetInt32(section string, key string) int32

func (*IniParser) GetInt64

func (current *IniParser) GetInt64(section string, key string) int64

func (*IniParser) GetString

func (current *IniParser) GetString(section string, key string) string

func (*IniParser) GetUint32

func (current *IniParser) GetUint32(section string, key string) uint32

func (*IniParser) GetUint64

func (current *IniParser) GetUint64(section string, key string) uint64

func (*IniParser) Load

func (current *IniParser) Load(configFileName string) error

type IniParserError

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

func (*IniParserError) Error

func (e *IniParserError) Error() string

Jump to

Keyboard shortcuts

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