rulecmdutil

package
v0.51.2-beta1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ValidityRule      = "validity"
	CompatibilityRule = "compatibility"
)
View Source
const (
	ConfigFULL                = "full"
	ConfigSYNTAX_ONLY         = "syntax-only"
	ConfigFULL_TRANSITIVE     = "full-transitive"
	ConfigBACKWARD            = "backward"
	ConfigBACKWARD_TRANSITIVE = "backward-transitive"
	ConfigFORWARD             = "forward"
	ConfigFORWARD_TRANSITIVE  = "forward-transitive"
	ConfigNONE                = "none"
)

Variables

Functions

func GetConfigMap

func GetConfigMap() map[string]string

GetConfigMap returns the mappings for rule configurations

func GetMappedConfigValue

func GetMappedConfigValue(config string) string

GetConfigMap gets the mapped configuration value

func GetMappedRuleType

func GetMappedRuleType(ruleType string) *registryinstanceclient.RuleType

GetMappedRuleType gets the mapped rule type value

func GetRuleTypeMap

func GetRuleTypeMap() map[string]registryinstanceclient.RuleType

GetRuleTypeMap returns the mappings for rule types

func NewFlagSet

func NewFlagSet(cmd *cobra.Command, f *factory.Factory) *flagSet

NewFlagSet returns a new flag set with common Service Registry rule flags

Types

type RuleErrHandler

type RuleErrHandler struct {
	Localizer localize.Localizer
}

func (*RuleErrHandler) ArtifactNotFoundError

func (r *RuleErrHandler) ArtifactNotFoundError(artifactID string) error

func (*RuleErrHandler) ConflictError

func (r *RuleErrHandler) ConflictError(ruleType string) error

func (*RuleErrHandler) RuleNotEnabled

func (r *RuleErrHandler) RuleNotEnabled(ruleType string) error

type Validator

type Validator struct {
	Localizer localize.Localizer
}

Validator is a struct to validate inputs for service registry rule operations

func (*Validator) IsValidRuleConfig

func (v *Validator) IsValidRuleConfig(ruleType string, config string) (bool, []string)

func (*Validator) ValidateRuleType

func (v *Validator) ValidateRuleType(ruleType string) error

ValidateRuleType checks if value v is a valid value for --offset

Jump to

Keyboard shortcuts

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