config

package
v0.0.0-...-85ede20 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2015 License: MPL-2.0 Imports: 5 Imported by: 3

Documentation

Overview

Package config provides for parse config file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

func NewConfig

func NewConfig() *Config

func (*Config) Clear

func (this *Config) Clear()

func (*Config) GlobalContent

func (this *Config) GlobalContent() map[string]string

func (*Config) GlobalGet

func (this *Config) GlobalGet(key string) string

func (*Config) GlobalGetDeadline

func (this *Config) GlobalGetDeadline(key string) time.Time

func (*Config) GlobalGetDuration

func (this *Config) GlobalGetDuration(key string) time.Duration

func (*Config) GlobalGetInt

func (this *Config) GlobalGetInt(key string) int

func (*Config) GlobalGetInt64

func (this *Config) GlobalGetInt64(key string) int64

func (*Config) GlobalGetSlice

func (this *Config) GlobalGetSlice(key string, separator string) []string

func (*Config) GlobalGetSliceInt

func (this *Config) GlobalGetSliceInt(key string, separator string) []int

func (*Config) GlobalHas

func (this *Config) GlobalHas(key string) bool

func (*Config) GlobalSet

func (this *Config) GlobalSet(key string, value string)

func (*Config) HasSection

func (this *Config) HasSection(section string) bool

func (*Config) Load

func (this *Config) Load(configFile string) *Config

Load reads config file and returns an initialized Config.

func (*Config) LoadString

func (this *Config) LoadString(s string) error

func (*Config) Save

func (this *Config) Save(configFile string) error

Save writes config content to a config file.

func (*Config) SectionContent

func (this *Config) SectionContent(section string) map[string]string

func (*Config) SectionContents

func (this *Config) SectionContents() map[string]map[string]string

func (*Config) SectionGet

func (this *Config) SectionGet(section string, key string) string

func (*Config) SectionGetDuration

func (this *Config) SectionGetDuration(section string, key string) time.Duration

func (*Config) SectionGetInt

func (this *Config) SectionGetInt(section string, key string) int

func (*Config) SectionGetSlice

func (this *Config) SectionGetSlice(section string, key string, separator string) []string

func (*Config) SectionHas

func (this *Config) SectionHas(section string, key string) bool

func (*Config) SectionSet

func (this *Config) SectionSet(section string, key string, value string)

func (*Config) Sections

func (this *Config) Sections() []string

func (*Config) String

func (this *Config) String() string

func (*Config) StringWithMeta

func (this *Config) StringWithMeta() string

Jump to

Keyboard shortcuts

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