validations

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultOwnershipFilePath = "testtrack/owners.yml"

DefaultOwnershipFilePath defines the default path to a YML file listing the possible split owners

Variables

This section is empty.

Functions

func AutoPrefixAndValidateSplit

func AutoPrefixAndValidateSplit(paramName string, value *string, currentAppName string, schema *serializers.Schema, noPrefix, force bool) error

AutoPrefixAndValidateSplit automatically prefixes a split with app name according to flags and optionally validates it for presence in the schema

func ExperimentSuffix

func ExperimentSuffix(paramName string, value *string) error

ExperimentSuffix validates that an experiment name param ends in _experiment

func FeatureGate

func FeatureGate(paramName string, value *string) error

FeatureGate validates that a feature_gate name param is valid with no opinion on app prefix

func FeatureGateSuffix

func FeatureGateSuffix(paramName string, value *string) error

FeatureGateSuffix validates that an experiment name param ends in _enabled

func NonPrefixedExperiment

func NonPrefixedExperiment(paramName string, value *string) error

NonPrefixedExperiment validates that an experiment name param is valid with no app prefix

func NonPrefixedFeatureGate

func NonPrefixedFeatureGate(paramName string, value *string) error

NonPrefixedFeatureGate validates that a feature_gate name param is valid

func NonPrefixedSplit

func NonPrefixedSplit(paramName string, value *string) error

NonPrefixedSplit validates that a split name param is valid with no app prefix

func OptionalAppVersion

func OptionalAppVersion(paramName string, value *string) error

OptionalAppVersion validates that app version, if non-null, matches required format

func OptionalSnakeCaseParam

func OptionalSnakeCaseParam(paramName string, value *string) error

OptionalSnakeCaseParam validates that a param is snake case alphanumeric with potential dots if present

func Presence

func Presence(paramName string, value *string) error

Presence validates that a param is present

func SnakeCaseParam

func SnakeCaseParam(paramName string, value *string) error

SnakeCaseParam validates that a param is snake case alphanumeric

func Split

func Split(paramName string, value *string) error

Split validates that a split name param is valid with no opinion on app prefix

func SplitExistsInSchema

func SplitExistsInSchema(paramName string, value *string, schema *serializers.Schema) error

SplitExistsInSchema validates that a split exists in the schema

func ValidateOwnerName added in v1.5.0

func ValidateOwnerName(owner string) error

ValidateOwnerName ensures that if a testtrack/owners.yml file is present, the owner matches the list of owners in that file.

func VariantExistsInSchema added in v0.9.5

func VariantExistsInSchema(paramName string, variant *string, split string, schema *serializers.Schema) error

VariantExistsInSchema validates that a variant exists for a split in the schema

Types

This section is empty.

Jump to

Keyboard shortcuts

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