settings

package
v0.0.0-...-0e469d2 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(input []byte, output interface{}, format SettingsFormat) error

func ReParse

func ReParse(input interface{}, output interface{}) error

func Stringify

func Stringify(input interface{}, format SettingsFormat) ([]byte, error)

Types

type KeyValueItem

type KeyValueItem struct {
	Key         string `json:"key,omitempty" yaml:"key,omitempty"`
	Value       string `json:"value"`
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
}

type KeyValueMap

type KeyValueMap map[string]KeyValueItem

func (KeyValueMap) Delete

func (io KeyValueMap) Delete(key string)

func (KeyValueMap) Get

func (io KeyValueMap) Get(key string) (string, bool)

func (KeyValueMap) Has

func (io KeyValueMap) Has(key string) bool

func (KeyValueMap) MethodsMap

func (io KeyValueMap) MethodsMap() map[string]interface{}

func (KeyValueMap) Set

func (io KeyValueMap) Set(key string, value string)

func (KeyValueMap) SortedSlice

func (io KeyValueMap) SortedSlice() []KeyValueItem

type MapIO

type MapIO map[string]string

func (MapIO) Delete

func (io MapIO) Delete(key string)

func (MapIO) Get

func (io MapIO) Get(key string) (string, bool)

func (MapIO) Has

func (io MapIO) Has(key string) bool

func (MapIO) MethodsMap

func (io MapIO) MethodsMap() map[string]interface{}

func (MapIO) Set

func (io MapIO) Set(key string, value string)

func (MapIO) String

func (io MapIO) String() string

type SettingsFormat

type SettingsFormat string
const (
	FormatJson SettingsFormat = "json"
	FormatYaml SettingsFormat = "yaml"
)

Jump to

Keyboard shortcuts

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