data

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: MIT Imports: 2 Imported by: 1

README ΒΆ

Go PkgGoDev GoDoc Go Report Card Version Badge Open in Gitpod

Installation

Add the primary library to your project

  go get -u github.com/whitaker-io/data

Machine is a library for building data stream workers


Foundry is a tool used to generate new projects quickly


Components is a repository of different vertex implementations



🀝 Contributing

Contributions, issues and feature requests are welcome.
Feel free to check issues page if you want to contribute.
Check the contributing guide.

Author

πŸ‘€ Jonathan Whitaker

Show your support

Please ⭐️ this repository if this project helped you!


License

Machine is provided under the MIT License.

The MIT License (MIT)

Copyright (c) 2020 Jonathan Whitaker

Documentation ΒΆ

Index ΒΆ

Constants ΒΆ

This section is empty.

Variables ΒΆ

This section is empty.

Functions ΒΆ

This section is empty.

Types ΒΆ

type Data ΒΆ

type Data map[string]interface{}

Data wrapper on map[string]interface{} to provide values for keys

func (Data) Bool ΒΆ

func (d Data) Bool(key string) (bool, error)

Bool provides bool if available or else returns an error

func (Data) BoolOr ΒΆ

func (d Data) BoolOr(key string, defaultVal bool) bool

BoolOr provides bool from key or defaultVal

func (Data) Float32 ΒΆ

func (d Data) Float32(key string) (float32, error)

Float32 provides float32 if available or else returns an error

func (Data) Float32Or ΒΆ

func (d Data) Float32Or(key string, defaultVal float32) float32

Float32Or provides float32 from key or defaultVal

func (Data) Float64 ΒΆ

func (d Data) Float64(key string) (float64, error)

Float64 provides float64 if available or else returns an error

func (Data) Float64Or ΒΆ

func (d Data) Float64Or(key string, defaultVal float64) float64

Float64Or provides float64 from key or defaultVal

func (Data) Int ΒΆ

func (d Data) Int(key string) (int, error)

Int provides int if available or else returns an error

func (Data) Int64 ΒΆ

func (d Data) Int64(key string) (int64, error)

Int64 provides int64 if available or else returns an error

func (Data) Int64Or ΒΆ

func (d Data) Int64Or(key string, defaultVal int64) int64

Int64Or provides int64 from key or defaultVal

func (Data) IntOr ΒΆ

func (d Data) IntOr(key string, defaultVal int) int

IntOr provides int from key or defaultVal

func (Data) Interface ΒΆ

func (d Data) Interface(key string) (interface{}, error)

Interface provides interface{} if available or else returns an error

func (Data) InterfaceOr ΒΆ

func (d Data) InterfaceOr(key string, defaultVal interface{}) interface{}

InterfaceOr provides interface{} from key or defaultVal

func (Data) MapStringInterface ΒΆ

func (d Data) MapStringInterface(key string) (map[string]interface{}, error)

MapStringInterface provides map[string]interface{} if available or else returns an error

func (Data) MapStringInterfaceOr ΒΆ

func (d Data) MapStringInterfaceOr(key string, defaultVal map[string]interface{}) map[string]interface{}

MapStringInterfaceOr provides map[string]interface{} from key or defaultVal

func (Data) MapStringString ΒΆ

func (d Data) MapStringString(key string) (map[string]string, error)

MapStringString provides map[string]string if available or else returns an error

func (Data) MapStringStringOr ΒΆ

func (d Data) MapStringStringOr(key string, defaultVal map[string]string) map[string]string

MapStringStringOr provides map[string]string from key or defaultVal

func (Data) MustBool ΒΆ

func (d Data) MustBool(key string) bool

MustBool provides bool from key or panics

func (Data) MustFloat32 ΒΆ

func (d Data) MustFloat32(key string) float32

MustFloat32 provides float32 from key or panics

func (Data) MustFloat64 ΒΆ

func (d Data) MustFloat64(key string) float64

MustFloat64 provides float64 from key or panics

func (Data) MustInt ΒΆ

func (d Data) MustInt(key string) int

MustInt provides int from key or panics

func (Data) MustInt64 ΒΆ

func (d Data) MustInt64(key string) int64

MustInt64 provides int64 from key or panics

func (Data) MustInterface ΒΆ

func (d Data) MustInterface(key string) interface{}

MustInterface provides interface{} from key or panics

func (Data) MustMapStringInterface ΒΆ

func (d Data) MustMapStringInterface(key string) map[string]interface{}

MustMapStringInterface provides map[string]interface{} from key or panics

func (Data) MustMapStringString ΒΆ

func (d Data) MustMapStringString(key string) map[string]string

MustMapStringString provides map[string]string from key or panics

func (Data) MustSliceInterface ΒΆ

func (d Data) MustSliceInterface(key string) []interface{}

MustSliceInterface provides []interface{} from key or panics

func (Data) MustSliceString ΒΆ

func (d Data) MustSliceString(key string) []string

MustSliceString provides []string from key or panics

func (Data) MustString ΒΆ

func (d Data) MustString(key string) string

MustString provides string from key or panics

func (Data) MustUint ΒΆ

func (d Data) MustUint(key string) uint

MustUint provides uint from key or panics

func (Data) MustUint64 ΒΆ

func (d Data) MustUint64(key string) uint64

MustUint64 provides uint64 from key or panics

func (Data) Set ΒΆ

func (d Data) Set(key string, val interface{}) error

Set is a method used to set a value at a given path, but will not create the path if missing

func (Data) SetCreate ΒΆ

func (d Data) SetCreate(key string, val interface{}) error

SetCreate is a method used to set a value at a given path, and will create the path if missing, but will not overwrite

func (Data) SetOverwrite ΒΆ

func (d Data) SetOverwrite(key string, val interface{})

SetOverwrite is a method used to set a value at a given path, and will create the path if missing and will overwrite values if they are not correct

func (Data) SliceInterface ΒΆ

func (d Data) SliceInterface(key string) ([]interface{}, error)

SliceInterface provides []interface{} if available or else returns an error

func (Data) SliceInterfaceOr ΒΆ

func (d Data) SliceInterfaceOr(key string, defaultVal []interface{}) []interface{}

SliceInterfaceOr provides []interface{} from key or defaultVal

func (Data) SliceString ΒΆ

func (d Data) SliceString(key string) ([]string, error)

SliceString provides []string if available or else returns an error

func (Data) SliceStringOr ΒΆ

func (d Data) SliceStringOr(key string, defaultVal []string) []string

SliceStringOr provides []string from key or defaultVal

func (Data) String ΒΆ

func (d Data) String(key string) (string, error)

String provides string if available or else returns an error

func (Data) StringOr ΒΆ

func (d Data) StringOr(key, defaultVal string) string

StringOr provides string from key or defaultVal

func (Data) Uint ΒΆ

func (d Data) Uint(key string) (uint, error)

Uint provides uint if available or else returns an error

func (Data) Uint64 ΒΆ

func (d Data) Uint64(key string) (uint64, error)

Uint64 provides uint64 if available or else returns an error

func (Data) Uint64Or ΒΆ

func (d Data) Uint64Or(key string, defaultVal uint64) uint64

Uint64Or provides uint64 from key or defaultVal

func (Data) UintOr ΒΆ

func (d Data) UintOr(key string, defaultVal uint) uint

UintOr provides uint from key or defaultVal

Jump to

Keyboard shortcuts

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