Documentation
¶
Overview ¶
Package validate provides functions to validate the provided objects.
Index ¶
- func CheckShardingKeySubset(measure *databasev1.Measure) error
- func Group(group *commonv1.Group) error
- func GroupForNonProperty(group *commonv1.Group) error
- func IndexRule(indexRule *databasev1.IndexRule) error
- func IndexRuleBinding(indexRuleBinding *databasev1.IndexRuleBinding) error
- func Measure(measure *databasev1.Measure) error
- func Property(property *databasev1.Property) error
- func Stream(stream *databasev1.Stream) error
- func TopNAggregation(topNAggregation *databasev1.TopNAggregation) error
- func Trace(trace *databasev1.Trace) error
- func TraceUpdate(prevTrace, newTrace *databasev1.Trace) error
- func UniqueTagNames(tagFamilies []*databasev1.TagFamilySpec) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckShardingKeySubset ¶ added in v0.11.0
func CheckShardingKeySubset(measure *databasev1.Measure) error
CheckShardingKeySubset checks whether every ShardingKey tag exists in Entity tags and the shared tags appear in the same relative order.
func GroupForNonProperty ¶ added in v0.9.0
GroupForNonProperty validates the provided Group object for Stream or Measure. It checks for nil values, empty strings, and unspecified enum values.
func IndexRule ¶
func IndexRule(indexRule *databasev1.IndexRule) error
IndexRule validates the provided IndexRule object. It checks for nil values, empty strings, and unspecified enum values.
func IndexRuleBinding ¶
func IndexRuleBinding(indexRuleBinding *databasev1.IndexRuleBinding) error
IndexRuleBinding validates the provided IndexRuleBinding object. It checks for nil values, empty strings, and unspecified enum values.
func Measure ¶
func Measure(measure *databasev1.Measure) error
Measure validates the provided Measure object. It checks for nil values, empty strings, and unspecified enum values.
func Property ¶ added in v0.11.1
func Property(property *databasev1.Property) error
Property validates the provided Property schema object.
func Stream ¶
func Stream(stream *databasev1.Stream) error
Stream validates the provided Stream object. It checks for nil values, empty strings, and unspecified enum values.
func TopNAggregation ¶
func TopNAggregation(topNAggregation *databasev1.TopNAggregation) error
TopNAggregation validates the provided TopNAggregation object. It checks for nil values, empty strings, and unspecified enum values.
func Trace ¶ added in v0.9.0
func Trace(trace *databasev1.Trace) error
Trace validates the provided Trace object. It checks for nil values, empty strings, and unspecified enum values.
func TraceUpdate ¶ added in v0.10.0
func TraceUpdate(prevTrace, newTrace *databasev1.Trace) error
TraceUpdate validates the provided Trace update operation. It ensures that reserved tags cannot be deleted.
func UniqueTagNames ¶ added in v0.11.2
func UniqueTagNames(tagFamilies []*databasev1.TagFamilySpec) error
UniqueTagNames rejects a tag name that appears more than once across a resource's tag families.
A tag name identifies a tag across the whole resource, not merely within its own family: the query layer resolves a bare name against a flat map keyed by name alone -- logical.CommonSchema.CreateRef states the invariant outright, and BydbQL's transformer relies on it for every identifier it resolves. Two families sharing a name make those lookups depend on iteration order. A single resource-wide set also catches a name duplicated within one family.
This is deliberately separate from Measure and Stream, which the data nodes also run when loading an already-persisted schema. A schema registered before this check existed must keep loading rather than be dropped, so only the registry's create and update paths call this.
Types ¶
This section is empty.