configUtils

package
v0.0.0-...-e2c1db5 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2015 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeegoConfigContainer

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

func CreateNewBeegoConfigContainer

func CreateNewBeegoConfigContainer() *BeegoConfigContainer

func (*BeegoConfigContainer) Bool

func (this *BeegoConfigContainer) Bool(key string) (bool, error)

func (*BeegoConfigContainer) DIY

func (this *BeegoConfigContainer) DIY(key string) (interface{}, error)

func (*BeegoConfigContainer) DefaultBool

func (this *BeegoConfigContainer) DefaultBool(key string, defaultval bool) bool

func (*BeegoConfigContainer) DefaultFloat

func (this *BeegoConfigContainer) DefaultFloat(key string, defaultval float64) float64

func (*BeegoConfigContainer) DefaultInt

func (this *BeegoConfigContainer) DefaultInt(key string, defaultval int) int

func (*BeegoConfigContainer) DefaultInt64

func (this *BeegoConfigContainer) DefaultInt64(key string, defaultval int64) int64

func (*BeegoConfigContainer) DefaultString

func (this *BeegoConfigContainer) DefaultString(key string, defaultval string) string

func (*BeegoConfigContainer) DefaultStrings

func (this *BeegoConfigContainer) DefaultStrings(key string, defaultval []string) []string

func (*BeegoConfigContainer) Float

func (this *BeegoConfigContainer) Float(key string) (float64, error)

func (*BeegoConfigContainer) GetSection

func (this *BeegoConfigContainer) GetSection(section string) (map[string]string, error)

func (*BeegoConfigContainer) Int

func (this *BeegoConfigContainer) Int(key string) (int, error)

func (*BeegoConfigContainer) Int64

func (this *BeegoConfigContainer) Int64(key string) (int64, error)

func (*BeegoConfigContainer) MustBool

func (this *BeegoConfigContainer) MustBool(key string) bool

func (*BeegoConfigContainer) MustInt

func (this *BeegoConfigContainer) MustInt(key string) int

func (*BeegoConfigContainer) MustInt64

func (this *BeegoConfigContainer) MustInt64(key string) int64

func (*BeegoConfigContainer) MustString

func (this *BeegoConfigContainer) MustString(key string) string

func (*BeegoConfigContainer) MustStrings

func (this *BeegoConfigContainer) MustStrings(key string) []string

func (*BeegoConfigContainer) SaveConfigFile

func (this *BeegoConfigContainer) SaveConfigFile(filename string) error

func (*BeegoConfigContainer) Set

func (this *BeegoConfigContainer) Set(key, val string) error

func (*BeegoConfigContainer) String

func (this *BeegoConfigContainer) String(key string) string

func (*BeegoConfigContainer) Strings

func (this *BeegoConfigContainer) Strings(key string) []string

type IConfigContainer

type IConfigContainer interface {
	Set(key, val string) error   // support section::key type in given key when using ini type.
	String(key string) string    // support section::key type in key string when using ini and json type; Int,Int64,Bool,Float,DIY are same.
	Strings(key string) []string //get string slice
	Int(key string) (int, error)
	Int64(key string) (int64, error)
	Bool(key string) (bool, error)
	Float(key string) (float64, error)
	DefaultString(key string, defaultval string) string      // support section::key type in key string when using ini and json type; Int,Int64,Bool,Float,DIY are same.
	DefaultStrings(key string, defaultval []string) []string //get string slice
	DefaultInt(key string, defaultval int) int
	DefaultInt64(key string, defaultval int64) int64
	DefaultBool(key string, defaultval bool) bool
	DefaultFloat(key string, defaultval float64) float64
	MustString(key string) string    // support section::key type in key string when using ini and json type; Int,Int64,Bool,Float,DIY are same.
	MustStrings(key string) []string //get string slice
	MustInt(key string) int
	MustInt64(key string) int64
	MustBool(key string) bool
	//MustFloat(key string) float64 // How to compare floating points?
	DIY(key string) (interface{}, error)
	GetSection(section string) (map[string]string, error)
	SaveConfigFile(filename string) error
}

Just a duplicate currently of beego.config.ConfigContainer

Jump to

Keyboard shortcuts

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