validation

package
v2.27.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GError

type GError gobol.Error

GError - a validation error type

type PropertyType

type PropertyType uint8

PropertyType - type

const (
	// TagKeyType - the tag identifier
	TagKeyType PropertyType = 1
	// TagValueType - the tag identifier
	TagValueType PropertyType = 2
	// MetricType - the metric identifier
	MetricType PropertyType = 3
)

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service - the validation structure

func New

func New(configuration *structs.ValidationConfiguration, metadataStorage *metadata.Storage, keyspaceTTLMap map[int]string) (*Service, error)

New - creates a new validation instance

func (*Service) GetDefaultTTLTag

func (v *Service) GetDefaultTTLTag() (*structs.TSDBTag, int)

GetDefaultTTLTag - returns the default TTL tag and its integer value

func (*Service) ParsePoint

func (v *Service) ParsePoint(function string, isNumber bool, data []byte) (*structs.TSDBpoint, gobol.Error)

ParsePoint - parses the json bytes to the object fields

func (*Service) ParsePointArray

func (v *Service) ParsePointArray(function string, isNumber bool, data []byte, outPoints *structs.TSDBpoints, outErrs *[]gobol.Error)

ParsePointArray - parses an array of points

func (*Service) ParsePoints

func (v *Service) ParsePoints(function string, isNumber bool, data []byte, outPoints *structs.TSDBpoints, outErrs *[]gobol.Error)

ParsePoints - parses an array of points

func (*Service) ParseTTL

func (v *Service) ParseTTL(value string) (int, string, gobol.Error)

ParseTTL - parses the TTL and returns its int value

func (*Service) ValidateKeyset

func (v *Service) ValidateKeyset(keyset string) gobol.Error

ValidateKeyset - validates the keyset

func (*Service) ValidateProperty

func (v *Service) ValidateProperty(value string, propertyType PropertyType) gobol.Error

ValidateProperty - validates the property value

func (*Service) ValidateTags

func (v *Service) ValidateTags(p *structs.TSDBpoint) gobol.Error

ValidateTags - validates the tags from the point

func (*Service) ValidateTimestamp

func (v *Service) ValidateTimestamp(timestamp int64) (int64, gobol.Error)

ValidateTimestamp - parses the timestamp

func (*Service) ValidateType

func (v *Service) ValidateType(p *structs.TSDBpoint, number bool) gobol.Error

ValidateType - validates the point type

Jump to

Keyboard shortcuts

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