jsonstruct

package module
v0.0.0-...-edd2fa4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2016 License: Apache-2.0 Imports: 4 Imported by: 5

README

Go Report Card Build Status

jsonstruct - A simple JSON helper library that implements getter and setter using JSON dot notation in Go

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrValueNotFound = errors.New("Value not found")
)

Functions

This section is empty.

Types

type JSONStruct

type JSONStruct map[string]interface{}

func New

func New() JSONStruct

func (JSONStruct) DeepCopy

func (s JSONStruct) DeepCopy() JSONStruct

func (JSONStruct) Duration

func (s JSONStruct) Duration(dotPath string) (time.Duration, error)

func (JSONStruct) DurationWithDefault

func (s JSONStruct) DurationWithDefault(dotPath string, defaultValue time.Duration) (time.Duration, error)

func (JSONStruct) FindElement

func (s JSONStruct) FindElement(dotPath string) (interface{}, bool)

func (JSONStruct) Int

func (s JSONStruct) Int(dotPath string) (int, bool)

func (JSONStruct) IntWithDefault

func (s JSONStruct) IntWithDefault(dotPath string, defaultValue int) int

func (JSONStruct) List

func (s JSONStruct) List(dotPath string) ([]interface{}, bool)

func (JSONStruct) SetDuration

func (s JSONStruct) SetDuration(dotPath string, value time.Duration) error

func (JSONStruct) SetInt

func (s JSONStruct) SetInt(dotPath string, value int) error

func (JSONStruct) SetList

func (s JSONStruct) SetList(dotPath string, value []interface{}) error

func (JSONStruct) SetString

func (s JSONStruct) SetString(dotPath, value string) error

func (JSONStruct) String

func (s JSONStruct) String(dotPath string) (string, bool)

func (JSONStruct) StringWithDefault

func (s JSONStruct) StringWithDefault(dotPath, defaultValue string) string

Jump to

Keyboard shortcuts

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