matchers

package
v1.0.0-beta7 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package matchers //

Package matchers //

Package matchers //

Package matchers //

Package matchers //

Package matchers //

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExactMatcher

type ExactMatcher struct {
	Condition entities.Condition
}

ExactMatcher matches against the "exact" match type

func (ExactMatcher) Match

func (m ExactMatcher) Match(user entities.UserContext) (bool, error)

Match returns true if the user's attribute match the condition's string value

type ExistsMatcher

type ExistsMatcher struct {
	Condition entities.Condition
}

ExistsMatcher matches against the "exists" match type

func (ExistsMatcher) Match

func (m ExistsMatcher) Match(user entities.UserContext) (bool, error)

Match returns true if the user's attribute is in the condition

type GtMatcher

type GtMatcher struct {
	Condition entities.Condition
}

GtMatcher matches against the "gt" match type

func (GtMatcher) Match

func (m GtMatcher) Match(user entities.UserContext) (bool, error)

Match returns true if the user's attribute is greater than the condition's string value

type LtMatcher

type LtMatcher struct {
	Condition entities.Condition
}

LtMatcher matches against the "lt" match type

func (LtMatcher) Match

func (m LtMatcher) Match(user entities.UserContext) (bool, error)

Match returns true if the user's attribute is less than the condition's string value

type Matcher

type Matcher interface {
	Match(entities.UserContext) (bool, error)
}

Matcher matches the condition against the user's attributes

type SubstringMatcher

type SubstringMatcher struct {
	Condition entities.Condition
}

SubstringMatcher matches against the "substring" match type

func (SubstringMatcher) Match

func (m SubstringMatcher) Match(user entities.UserContext) (bool, error)

Match returns true if the user's attribute is a substring of the condition's string value

Directories

Path Synopsis
Package utils //
Package utils //

Jump to

Keyboard shortcuts

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