Documentation ¶
Index ¶
- type ArrayParser
- type Boolean
- type Context
- type Datum
- type Deduplicator
- type DeduplicatorDescriptor
- type Factory
- type Float
- type Inspector
- type Integer
- type Interface
- type InterfaceArray
- type Normalizer
- type Object
- type ObjectArray
- type ObjectParser
- type String
- type StringArray
- type Time
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayParser ¶
type ArrayParser interface { Logger() log.Logger SetMeta(meta interface{}) AppendError(reference interface{}, err *service.Error) Array() *[]interface{} ParseBoolean(index int) *bool ParseInteger(index int) *int ParseFloat(index int) *float64 ParseString(index int) *string ParseStringArray(index int) *[]string ParseObject(index int) *map[string]interface{} ParseObjectArray(index int) *[]map[string]interface{} ParseInterface(index int) *interface{} ParseInterfaceArray(index int) *[]interface{} ParseDatum(index int) *Datum ParseDatumArray(index int) *[]Datum ProcessNotParsed() NewChildObjectParser(index int) ObjectParser NewChildArrayParser(index int) ArrayParser }
type Datum ¶
type Datum interface { Init() Meta() interface{} Parse(parser ObjectParser) error Validate(validator Validator) error Normalize(normalizer Normalizer) error IdentityFields() ([]string, error) SetUserID(userID string) SetGroupID(groupID string) SetDatasetID(datasetID string) SetActive(active bool) SetCreatedTime(createdTime string) SetCreatedUserID(createdUserID string) SetModifiedTime(modifiedTime string) SetModifiedUserID(modifiedUserID string) SetDeletedTime(deletedTime string) SetDeletedUserID(deletedUserID string) DeduplicatorDescriptor() *DeduplicatorDescriptor SetDeduplicatorDescriptor(deduplicatorDescriptor *DeduplicatorDescriptor) }
type Deduplicator ¶ added in v1.4.0
type DeduplicatorDescriptor ¶ added in v1.4.0
type DeduplicatorDescriptor struct { Name string `bson:"name,omitempty"` Version string `bson:"version,omitempty"` Hash string `bson:"hash,omitempty"` }
func NewDeduplicatorDescriptor ¶ added in v1.5.0
func NewDeduplicatorDescriptor() *DeduplicatorDescriptor
func (*DeduplicatorDescriptor) IsRegisteredWithAnyDeduplicator ¶ added in v1.5.0
func (d *DeduplicatorDescriptor) IsRegisteredWithAnyDeduplicator() bool
func (*DeduplicatorDescriptor) IsRegisteredWithNamedDeduplicator ¶ added in v1.5.0
func (d *DeduplicatorDescriptor) IsRegisteredWithNamedDeduplicator(name string) bool
func (*DeduplicatorDescriptor) RegisterWithDeduplicator ¶ added in v1.8.0
func (d *DeduplicatorDescriptor) RegisterWithDeduplicator(deduplicator Deduplicator) error
type Float ¶
type Float interface { Exists() Float NotExists() Float EqualTo(value float64) Float NotEqualTo(value float64) Float LessThan(limit float64) Float LessThanOrEqualTo(limit float64) Float GreaterThan(limit float64) Float GreaterThanOrEqualTo(limit float64) Float InRange(lowerLimit float64, upperLimit float64) Float OneOf(allowedValues []float64) Float NotOneOf(disallowedValues []float64) Float }
type Integer ¶
type Integer interface { Exists() Integer NotExists() Integer EqualTo(value int) Integer NotEqualTo(value int) Integer LessThan(limit int) Integer LessThanOrEqualTo(limit int) Integer GreaterThan(limit int) Integer GreaterThanOrEqualTo(limit int) Integer InRange(lowerLimit int, upperLimit int) Integer OneOf(allowedValues []int) Integer NotOneOf(disallowedValues []int) Integer }
type InterfaceArray ¶
type InterfaceArray interface { Exists() InterfaceArray NotExists() InterfaceArray Empty() InterfaceArray NotEmpty() InterfaceArray LengthEqualTo(limit int) InterfaceArray LengthNotEqualTo(limit int) InterfaceArray LengthLessThan(limit int) InterfaceArray LengthLessThanOrEqualTo(limit int) InterfaceArray LengthGreaterThan(limit int) InterfaceArray LengthGreaterThanOrEqualTo(limit int) InterfaceArray LengthInRange(lowerLimit int, upperLimit int) InterfaceArray }
type Normalizer ¶
type ObjectArray ¶
type ObjectArray interface { Exists() ObjectArray NotExists() ObjectArray Empty() ObjectArray NotEmpty() ObjectArray LengthEqualTo(limit int) ObjectArray LengthNotEqualTo(limit int) ObjectArray LengthLessThan(limit int) ObjectArray LengthLessThanOrEqualTo(limit int) ObjectArray LengthGreaterThan(limit int) ObjectArray LengthGreaterThanOrEqualTo(limit int) ObjectArray LengthInRange(lowerLimit int, upperLimit int) ObjectArray }
type ObjectParser ¶
type ObjectParser interface { Logger() log.Logger SetMeta(meta interface{}) AppendError(reference interface{}, err *service.Error) Object() *map[string]interface{} ParseBoolean(key string) *bool ParseInteger(key string) *int ParseFloat(key string) *float64 ParseString(key string) *string ParseStringArray(key string) *[]string ParseObject(key string) *map[string]interface{} ParseObjectArray(key string) *[]map[string]interface{} ParseInterface(key string) *interface{} ParseInterfaceArray(key string) *[]interface{} ParseDatum(key string) *Datum ParseDatumArray(key string) *[]Datum ProcessNotParsed() NewChildObjectParser(key string) ObjectParser NewChildArrayParser(key string) ArrayParser }
type String ¶
type String interface { Exists() String NotExists() String Empty() String NotEmpty() String EqualTo(value string) String NotEqualTo(value string) String LengthEqualTo(limit int) String LengthNotEqualTo(limit int) String LengthLessThan(limit int) String LengthLessThanOrEqualTo(limit int) String LengthGreaterThan(limit int) String LengthGreaterThanOrEqualTo(limit int) String LengthInRange(lowerLimit int, upperLimit int) String OneOf(allowedValues []string) String NotOneOf(disallowedValues []string) String }
type StringArray ¶
type StringArray interface { Exists() StringArray NotExists() StringArray Empty() StringArray NotEmpty() StringArray LengthEqualTo(limit int) StringArray LengthNotEqualTo(limit int) StringArray LengthLessThan(limit int) StringArray LengthLessThanOrEqualTo(limit int) StringArray LengthGreaterThan(limit int) StringArray LengthGreaterThanOrEqualTo(limit int) StringArray LengthInRange(lowerLimit int, upperLimit int) StringArray EachOneOf(allowedValues []string) StringArray EachNotOneOf(disallowedValues []string) StringArray }
type Validator ¶
type Validator interface { Logger() log.Logger SetMeta(meta interface{}) AppendError(reference interface{}, err *service.Error) ValidateBoolean(reference interface{}, value *bool) Boolean ValidateInteger(reference interface{}, value *int) Integer ValidateFloat(reference interface{}, value *float64) Float ValidateString(reference interface{}, value *string) String ValidateStringArray(reference interface{}, value *[]string) StringArray ValidateObject(reference interface{}, value *map[string]interface{}) Object ValidateObjectArray(reference interface{}, value *[]map[string]interface{}) ObjectArray ValidateInterface(reference interface{}, value *interface{}) Interface ValidateInterfaceArray(reference interface{}, value *[]interface{}) InterfaceArray ValidateStringAsTime(reference interface{}, stringValue *string, timeLayout string) Time NewChildValidator(reference interface{}) Validator }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.