mconf

package
v0.0.0-...-670bf6b Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2017 License: Apache-2.0, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

mabetle config package. mcore.Config is a interface provide some basic functions:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseConfig

type BaseConfig struct {
	StringDefaultGetter
}

func (BaseConfig) GetBool

func (c BaseConfig) GetBool(key string) bool

GetBool

func (BaseConfig) GetInt

func (c BaseConfig) GetInt(key string) int

GetInt

type BoolGetter

type BoolGetter interface {
	GetBool(key string) bool
}

type Config

Combine them Any Config must impl this interface

func NewConfig

func NewConfig(loader KeyValueLoader) Config

NewConfig

type ContainChecker

type ContainChecker interface {
	IsContain(key string) bool
}

type IntGetter

type IntGetter interface {
	GetInt(key string) int
}

type KeyValueConfig

type KeyValueConfig struct {
	mcore.StringKeyValueMap // store key and value.
	KeyValueLoader          //load keys and values.
}

KeyValueConfig implements Config interface.

type KeyValueLoader

type KeyValueLoader interface {
	LoadKeyValue() mcore.StringKeyValueMap
}

KeyValueLoader

type KeyValuePutter

type KeyValuePutter interface {
	Put(key, value string)
}

type StringDefaultGetter

type StringDefaultGetter interface {
	GetStringWithDefault(key string, dv string) string
}

type StringGetter

type StringGetter interface {
	GetString(key string) string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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