parser

package
v1.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToMapOrSlice

func ConvertToMapOrSlice(input interface{}) (interface{}, error)

func DenormalizePropertyName

func DenormalizePropertyName(name string) string

func NormalizeKeys

func NormalizeKeys(arg interface{})

func NormalizePropertyName

func NormalizePropertyName(prName string) string

func ParseArguments

func ParseArguments(args []string) (res map[string]interface{}, err error)

func ParseFilter

func ParseFilter(input interface{}, filter string) (interface{}, error)

func ParseFilterObject

func ParseFilterObject(obj string) (map[string]Filter, error)

func ParseObject

func ParseObject(obj string, normalizeKeys bool) (map[string]interface{}, error)

func ParseQuery

func ParseQuery(input interface{}, query string) (interface{}, error)

ParseQuery accepts a map[string]interface{} or an []interface and returns an object with only keys parsed from the given query string left.

Types

type Filter

type Filter struct {
	Cond  string
	Value string
}

func (*Filter) Match

func (f *Filter) Match(value interface{}) (bool, error)

Jump to

Keyboard shortcuts

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