Back to godoc.org
github.com/scaleft/hconf

Package hconf

v0.0.0-...-cece6fc
Latest Go to latest

The latest major version is .

Published: Jun 14, 2018 | License: MPL-2.0 | Module: github.com/scaleft/hconf

Index

type Bool

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

func (*Bool) Duplicate

func (s *Bool) Duplicate() Bool

func (*Bool) IsSet

func (s *Bool) IsSet() bool

func (*Bool) SetSource

func (s *Bool) SetSource(p token.Pos)

func (*Bool) SetValue

func (s *Bool) SetValue(v bool)

func (*Bool) Source

func (s *Bool) Source() token.Pos

func (*Bool) Value

func (s *Bool) Value() bool

func (*Bool) ValueBool

func (s *Bool) ValueBool() bool

type Config

type Config struct {
}

type HC

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

func New

func New(c *Config) (*HC, error)

func (*HC) Decode

func (hc *HC) Decode(out interface{}, filename string, data []byte) error

func (*HC) DecodeFile

func (hc *HC) DecodeFile(out interface{}, filename string) error

Decode HC into an object

func (*HC) EditAndSave

func (hc *HC) EditAndSave(filename string, section string, key string, value interface{}) error

EditAndSave open's existing file, edits section/key value, saves back as a formatted HCL. (kitchen sink method)

func (*HC) Get

func (hc *HC) Get(input interface{}, section string, key string) (interface{}, token.Pos, error)

Get a specific value from a section/key pair

func (*HC) Set

func (hc *HC) Set(input interface{}, section string, key string, value interface{}) error

Set a specific value from a section/key pair

type Int64

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

func (*Int64) IsSet

func (s *Int64) IsSet() bool

func (*Int64) SetSource

func (s *Int64) SetSource(p token.Pos)

func (*Int64) SetValue

func (s *Int64) SetValue(v int64)

func (*Int64) Source

func (s *Int64) Source() token.Pos

func (*Int64) Value

func (s *Int64) Value() int64

func (*Int64) ValueInt64

func (s *Int64) ValueInt64() int64

type String

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

func (*String) Duplicate

func (s *String) Duplicate() String

func (*String) IsSet

func (s *String) IsSet() bool

func (*String) SetSource

func (s *String) SetSource(p token.Pos)

func (*String) SetValue

func (s *String) SetValue(v string)

func (*String) Source

func (s *String) Source() token.Pos

func (*String) Value

func (s *String) Value() string

func (*String) ValueString

func (s *String) ValueString() string

type StringSlice

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

func (*StringSlice) Duplicate

func (s *StringSlice) Duplicate() StringSlice

func (*StringSlice) IsSet

func (s *StringSlice) IsSet() bool

func (*StringSlice) SetSource

func (s *StringSlice) SetSource(p token.Pos)

func (*StringSlice) SetValue

func (s *StringSlice) SetValue(v []string)

func (*StringSlice) Source

func (s *StringSlice) Source() token.Pos

func (*StringSlice) Value

func (s *StringSlice) Value() []string

func (*StringSlice) ValueStringSlice

func (s *StringSlice) ValueStringSlice() []string

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier