Documentation
¶
Index ¶
- type AndFilter
- type Criteria
- func (c *Criteria) All(o ...interface{}) (*Criteria, error)
- func (c *Criteria) AllSlice(l interface{}) (*Criteria, error)
- func (c *Criteria) And(key string) (*Criteria, error)
- func (c *Criteria) AnyOf(o ...interface{}) (*Criteria, error)
- func (c *Criteria) AnyOfSlice(l interface{}) (*Criteria, error)
- func (c *Criteria) Apply(ctx common.PredicateContext) (bool, error)
- func (c *Criteria) Contains(o interface{}) (*Criteria, error)
- func (c *Criteria) Empty(empty bool) *Criteria
- func (c *Criteria) Eq(o interface{}) (*Criteria, error)
- func (c *Criteria) Exists(shouldExist bool) (*Criteria, error)
- func (c *Criteria) Gt(o interface{}) (*Criteria, error)
- func (c *Criteria) Gte(o interface{}) (*Criteria, error)
- func (c *Criteria) In(o ...interface{}) (*Criteria, error)
- func (c *Criteria) InSlice(l interface{}) (*Criteria, error)
- func (c *Criteria) Is(o interface{}) (*Criteria, error)
- func (c *Criteria) Lt(o interface{}) (*Criteria, error)
- func (c *Criteria) Lte(o interface{}) (*Criteria, error)
- func (c *Criteria) Matches(p common.Predicate) *Criteria
- func (c *Criteria) Ne(o interface{}) (*Criteria, error)
- func (c *Criteria) Nin(o ...interface{}) (*Criteria, error)
- func (c *Criteria) NinSlice(l interface{}) (*Criteria, error)
- func (c *Criteria) NoneOf(o ...interface{}) (*Criteria, error)
- func (c *Criteria) NoneOfSlice(l interface{}) (*Criteria, error)
- func (c *Criteria) NotEmpty() *Criteria
- func (c *Criteria) Regex(pattern *regexp.Regexp) (*Criteria, error)
- func (c *Criteria) Size(size int) (*Criteria, error)
- func (c *Criteria) String() string
- func (c *Criteria) SubSetOf(o ...interface{}) (*Criteria, error)
- func (c *Criteria) SubSetOfSlice(l interface{}) (*Criteria, error)
- func (c *Criteria) Type(typeString string) (*Criteria, error)
- type DocumentContext
- type Filter
- type JsonContext
- func (jc *JsonContext) Configuration() *common.Configuration
- func (jc *JsonContext) Json() interface{}
- func (jc *JsonContext) JsonString() (string, error)
- func (jc *JsonContext) Limit(maxResults int) (ReadContext, error)
- func (jc *JsonContext) Read(pathString string) (interface{}, error)
- func (jc *JsonContext) ReadJsonpath(path *Jsonpath) (interface{}, error)
- func (jc *JsonContext) ReadWithFilters(pathString string, filters ...common.Predicate) (interface{}, error)
- func (jc *JsonContext) WithListeners(listeners ...common.EvaluationListener) (ReadContext, error)
- type Jsonpath
- type LimitingEvaluationListener
- type OrFilter
- type ParseContext
- type ParseContextImpl
- type ReadContext
- type SingleFilter
- type WriteContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AndFilter ¶
type AndFilter struct {
// contains filtered or unexported fields
}
type Criteria ¶
type Criteria struct {
// contains filtered or unexported fields
}
func WhereString ¶
func (*Criteria) AnyOfSlice ¶
func (*Criteria) NoneOfSlice ¶
func (*Criteria) SubSetOfSlice ¶
type DocumentContext ¶
type DocumentContext interface {
ReadContext
WriteContext
}
func ParseObject ¶
func ParseObject(json interface{}) (DocumentContext, error)
func ParseString ¶
func ParseString(json string) (DocumentContext, error)
type Filter ¶
type Filter interface {
common.Predicate
Or(other common.Predicate) Filter
And(other common.Predicate) Filter
}
func CreateSingleFilter ¶
type JsonContext ¶
type JsonContext struct {
// contains filtered or unexported fields
}
func CreateJsonContextByAny ¶
func CreateJsonContextByAny(obj interface{}, configuration *common.Configuration) (*JsonContext, error)
func (*JsonContext) Configuration ¶
func (jc *JsonContext) Configuration() *common.Configuration
func (*JsonContext) Json ¶
func (jc *JsonContext) Json() interface{}
func (*JsonContext) JsonString ¶
func (jc *JsonContext) JsonString() (string, error)
func (*JsonContext) Limit ¶
func (jc *JsonContext) Limit(maxResults int) (ReadContext, error)
func (*JsonContext) Read ¶
func (jc *JsonContext) Read(pathString string) (interface{}, error)
func (*JsonContext) ReadJsonpath ¶
func (jc *JsonContext) ReadJsonpath(path *Jsonpath) (interface{}, error)
func (*JsonContext) ReadWithFilters ¶
func (jc *JsonContext) ReadWithFilters(pathString string, filters ...common.Predicate) (interface{}, error)
func (*JsonContext) WithListeners ¶
func (jc *JsonContext) WithListeners(listeners ...common.EvaluationListener) (ReadContext, error)
type Jsonpath ¶
type Jsonpath struct {
// contains filtered or unexported fields
}
type LimitingEvaluationListener ¶
type LimitingEvaluationListener struct {
// contains filtered or unexported fields
}
func (*LimitingEvaluationListener) ResultFound ¶
func (l *LimitingEvaluationListener) ResultFound(found common.FoundResult) common.EvaluationContinuation
type ParseContext ¶
type ParseContext interface {
ParseString(json string) (DocumentContext, error)
ParseAny(json interface{}) (DocumentContext, error)
}
type ParseContextImpl ¶
type ParseContextImpl struct {
// contains filtered or unexported fields
}
func CreateParseContextImplByConfiguration ¶
func CreateParseContextImplByConfiguration(configuration *common.Configuration) *ParseContextImpl
func (*ParseContextImpl) ParseAny ¶
func (pCtx *ParseContextImpl) ParseAny(json interface{}) (DocumentContext, error)
func (*ParseContextImpl) ParseString ¶
func (pCtx *ParseContextImpl) ParseString(json string) (DocumentContext, error)
type ReadContext ¶
type ReadContext interface {
Configuration() *common.Configuration
Json() interface{}
JsonString() (string, error)
ReadWithFilters(path string, filters ...common.Predicate) (interface{}, error)
Read(path string) (interface{}, error)
ReadJsonpath(path *Jsonpath) (interface{}, error)
Limit(maxResults int) (ReadContext, error)
WithListeners(listeners ...common.EvaluationListener) (ReadContext, error)
}
type SingleFilter ¶
type SingleFilter struct {
// contains filtered or unexported fields
}
func (*SingleFilter) Apply ¶
func (filter *SingleFilter) Apply(ctx common.PredicateContext) (bool, error)
func (*SingleFilter) String ¶
func (filter *SingleFilter) String() string
type WriteContext ¶
type WriteContext interface {
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.