domains

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDomain

func ParseDomain(dom Domain, model *models.Model) *models.Condition

ParseDomain gets Domain and parses it into a RecordSet query Condition. Returns an empty condition if the domain is []

Types

type Domain

type Domain []interface{}

A Domain is a list of search criteria (DomainTerm) in the form of a tuplet (field_name, operator, value). Domain criteria (DomainTerm) can be combined using logical operators in prefix form (DomainPrefixOperator)

func ParseString

func ParseString(str string) *Domain

ParseString returns a Domain that corresponds to the supposedly well formatted domain given as a string

func (*Domain) Scan

func (d *Domain) Scan(src interface{}) error

Scan JSON decodes the value of the database into a Domain

func (Domain) String

func (d Domain) String() string

String method for Domain type. Returns a valid domain for client.

func (Domain) Value

func (d Domain) Value() (driver.Value, error)

Value JSON encode our Domain for storing in the database.

type DomainPrefixOperator

type DomainPrefixOperator string

A DomainPrefixOperator is used to combine DomainTerms

const (
	PREFIX_AND DomainPrefixOperator = "&"
	PREFIX_OR  DomainPrefixOperator = "|"
	PREFIX_NOT DomainPrefixOperator = "!"
)

Domain prefix operators

type DomainTerm

type DomainTerm []interface{}

A DomainTerm is a search criterion in the form of a tuplet (field_name, operator, value).

Jump to

Keyboard shortcuts

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