Documentation ¶
Index ¶
- func EncodePointerReference(reference string) string
- func ForgivingTimeString(stringValue string) (forgivingTime string)
- type Array
- type ArrayParsable
- type ArrayParser
- type ArrayUsingFunc
- type Bool
- type BoolUsingFunc
- type ErrorReporter
- type Float64
- type Float64UsingFunc
- type Int
- type IntUsingFunc
- type MetaReporter
- type Normalizable
- type Normalizer
- type Object
- type ObjectParsable
- type ObjectParser
- type ObjectUsingFunc
- type Origin
- type OriginReporter
- type ParameterSource
- type PointerSource
- type Source
- type SourceReporter
- type String
- type StringArray
- type StringArrayEachFunc
- type StringArrayEachUsingFunc
- type StringArrayUsingFunc
- type StringUsingFunc
- type Time
- type TimeUsingFunc
- type Validatable
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodePointerReference ¶
func ForgivingTimeString ¶ added in v1.32.2
ForgivingTimeString is a helper function added specifically to handle https://tidepool.atlassian.net/browse/BACK-1161 It should be deprecated once Dexcom fixes their API.
Types ¶
type ArrayParsable ¶
type ArrayParsable interface {
Parse(parser ArrayParser)
}
type ArrayParser ¶
type ArrayParser interface { OriginReporter SourceReporter MetaReporter ErrorReporter Exists() bool Parse(arrayParsable ArrayParsable) error References() []int ReferenceExists(reference int) bool Bool(reference int) *bool Float64(reference int) *float64 Int(reference int) *int String(reference int) *string StringArray(reference int) *[]string Time(reference int, layout string) *time.Time Object(reference int) *map[string]interface{} Array(reference int) *[]interface{} Interface(reference int) *interface{} NotParsed() error WithOrigin(origin Origin) ArrayParser WithSource(source Source) ArrayParser WithMeta(meta interface{}) ArrayParser WithReferenceObjectParser(reference int) ObjectParser WithReferenceArrayParser(reference int) ArrayParser WithReferenceErrorReporter(reference int) ErrorReporter }
type ArrayUsingFunc ¶ added in v1.26.0
type ArrayUsingFunc func(value []interface{}, errorReporter ErrorReporter)
type BoolUsingFunc ¶ added in v1.26.0
type BoolUsingFunc func(value bool, errorReporter ErrorReporter)
type ErrorReporter ¶ added in v1.24.0
type Float64 ¶
type Float64 interface { Exists() Float64 NotExists() Float64 EqualTo(value float64) Float64 NotEqualTo(value float64) Float64 LessThan(limit float64) Float64 LessThanOrEqualTo(limit float64) Float64 GreaterThan(limit float64) Float64 GreaterThanOrEqualTo(limit float64) Float64 InRange(lowerLimit float64, upperLimit float64) Float64 OneOf(allowedValues ...float64) Float64 NotOneOf(disallowedValues ...float64) Float64 Using(usingFunc Float64UsingFunc) Float64 }
type Float64UsingFunc ¶ added in v1.26.0
type Float64UsingFunc func(value float64, errorReporter ErrorReporter)
type Int ¶
type Int interface { Exists() Int NotExists() Int EqualTo(value int) Int NotEqualTo(value int) Int LessThan(limit int) Int LessThanOrEqualTo(limit int) Int GreaterThan(limit int) Int GreaterThanOrEqualTo(limit int) Int InRange(lowerLimit int, upperLimit int) Int OneOf(allowedValues ...int) Int NotOneOf(disallowedValues ...int) Int Using(usingFunc IntUsingFunc) Int }
type IntUsingFunc ¶ added in v1.26.0
type IntUsingFunc func(value int, errorReporter ErrorReporter)
type MetaReporter ¶ added in v1.24.0
type MetaReporter interface { HasMeta() bool Meta() interface{} }
type Normalizable ¶
type Normalizable interface {
Normalize(normalizer Normalizer)
}
type Normalizer ¶
type Normalizer interface { OriginReporter SourceReporter MetaReporter ErrorReporter Normalize(normalizable Normalizable) error WithOrigin(origin Origin) Normalizer WithSource(source Source) Normalizer WithMeta(meta interface{}) Normalizer WithReference(reference string) Normalizer }
type ObjectParsable ¶
type ObjectParsable interface {
Parse(parser ObjectParser)
}
type ObjectParser ¶
type ObjectParser interface { OriginReporter SourceReporter MetaReporter ErrorReporter Exists() bool Parse(objectParsable ObjectParsable) error References() []string ReferenceExists(reference string) bool Bool(reference string) *bool Float64(reference string) *float64 Int(reference string) *int String(reference string) *string StringArray(reference string) *[]string Time(reference string, layout string) *time.Time ForgivingTime(reference string, layout string) *time.Time Object(reference string) *map[string]interface{} Array(reference string) *[]interface{} Interface(reference string) *interface{} NotParsed() error WithOrigin(origin Origin) ObjectParser WithSource(source Source) ObjectParser WithMeta(meta interface{}) ObjectParser WithReferenceObjectParser(reference string) ObjectParser WithReferenceArrayParser(reference string) ArrayParser WithReferenceErrorReporter(reference string) ErrorReporter }
type ObjectUsingFunc ¶ added in v1.26.0
type ObjectUsingFunc func(value map[string]interface{}, errorReporter ErrorReporter)
type OriginReporter ¶ added in v1.24.0
type OriginReporter interface {
Origin() Origin
}
type ParameterSource ¶
type ParameterSource struct {
// contains filtered or unexported fields
}
func NewParameterSource ¶
func NewParameterSource() *ParameterSource
func (*ParameterSource) Parameter ¶
func (p *ParameterSource) Parameter() string
func (*ParameterSource) Pointer ¶
func (p *ParameterSource) Pointer() string
func (*ParameterSource) WithReference ¶
func (p *ParameterSource) WithReference(reference string) Source
type PointerSource ¶
type PointerSource struct {
// contains filtered or unexported fields
}
func NewPointerSource ¶
func NewPointerSource() *PointerSource
func (*PointerSource) Parameter ¶
func (p *PointerSource) Parameter() string
func (*PointerSource) Pointer ¶
func (p *PointerSource) Pointer() string
func (*PointerSource) WithReference ¶
func (p *PointerSource) WithReference(reference string) Source
type SourceReporter ¶ added in v1.24.0
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 Matches(expression *regexp.Regexp) String NotMatches(expression *regexp.Regexp) String Using(usingFunc StringUsingFunc) String AsTime(layout string) Time }
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 Each(eachFunc StringArrayEachFunc) StringArray EachNotEmpty() StringArray EachOneOf(allowedValues ...string) StringArray EachNotOneOf(disallowedValues ...string) StringArray EachMatches(expression *regexp.Regexp) StringArray EachNotMatches(expression *regexp.Regexp) StringArray EachUsing(eachUsingFunc StringArrayEachUsingFunc) StringArray EachUnique() StringArray Using(usingFunc StringArrayUsingFunc) StringArray }
type StringArrayEachFunc ¶ added in v1.29.0
type StringArrayEachFunc func(stringValidator String)
type StringArrayEachUsingFunc ¶ added in v1.29.0
type StringArrayEachUsingFunc func(value string, errorReporter ErrorReporter)
type StringArrayUsingFunc ¶ added in v1.26.0
type StringArrayUsingFunc func(value []string, errorReporter ErrorReporter)
type StringUsingFunc ¶ added in v1.26.0
type StringUsingFunc func(value string, errorReporter ErrorReporter)
type TimeUsingFunc ¶ added in v1.26.0
type TimeUsingFunc func(value time.Time, errorReporter ErrorReporter)
type Validatable ¶
type Validatable interface {
Validate(validator Validator)
}
type Validator ¶
type Validator interface { OriginReporter SourceReporter MetaReporter ErrorReporter Validate(validatable Validatable) error Bool(reference string, value *bool) Bool Float64(reference string, value *float64) Float64 Int(reference string, value *int) Int String(reference string, value *string) String StringArray(reference string, value *[]string) StringArray Time(reference string, value *time.Time) Time Object(reference string, value *map[string]interface{}) Object Array(reference string, value *[]interface{}) Array WithOrigin(origin Origin) Validator WithSource(source Source) Validator WithMeta(meta interface{}) Validator WithReference(reference string) Validator }
Click to show internal directories.
Click to hide internal directories.