config

package
v0.0.0-...-bf621fb Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Common

type Common struct {
	Hostname string `hcl:"hostname" yaml:"hostname" json:"hostname"`
	Config   string `hcl:"-" yaml:"-" json:"-"`
}

type Config

type Config struct {
	Inputs []ConfigRaw `hcl:"input" yaml:"input" json:"input"`
	Common Common      `hcl:"common" yaml:"common" json:"common"`
}

func LoadConfig

func LoadConfig(path string) (*Config, error)

type ConfigRaw

type ConfigRaw map[string]interface{}

func (ConfigRaw) Decode

func (r ConfigRaw) Decode(conf interface{}) error

func (ConfigRaw) GetString

func (r ConfigRaw) GetString(name string) (string, error)

func (ConfigRaw) GetStringWithDefault

func (r ConfigRaw) GetStringWithDefault(name, def string) string

type Size

type Size int64

func (*Size) UnmarshalText

func (u *Size) UnmarshalText(text []byte) error

func (*Size) Value

func (u *Size) Value() int64

Jump to

Keyboard shortcuts

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