Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VariantDefMap ¶
VariantDefMap contains the key:val pairs that define a Variant.
It is the "Def" part of a VariantDef proto.
func MergeTestVariantMaps ¶
func MergeTestVariantMaps(maps ...VariantDefMap) VariantDefMap
MergeTestVariantMaps gets the test variant def from merging the input maps.
If multiple maps define the same key, the last one wins.
func (VariantDefMap) ID ¶
func (d VariantDefMap) ID() string
ID returns a hex SHA256 hash of newline-joined "<key>:<val>" strings from the variant as an ID.
func (VariantDefMap) Proto ¶
func (d VariantDefMap) Proto() *pb.VariantDef
Proto converts the VariantDefMap to a pb.VariantDef proto.
func (VariantDefMap) SortedKeys ¶
func (d VariantDefMap) SortedKeys() []string
SortedKeys returns the keys in the variant def as a sorted slice.
func (VariantDefMap) Validate ¶
func (d VariantDefMap) Validate() error
Validate validates the receiver VariantDefMap by checking characters and length of the keys and values.
Click to show internal directories.
Click to hide internal directories.