validation

package
v1.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigValidationError

type ConfigValidationError struct {
	ServiceUnitFieldErrors []InvalidServiceUnitFieldValueError
	AdapterFieldErrors     []InvalidAdapterFieldValueError
	MappingErrors          []InvalidAdapterMappingError
	StepFieldErrors        []InvalidStepFieldValueError
}

An object to hold all the errors of different types

func ValidateFields

func ValidateFields(serviceUnitConfig *model.ServiceUnitConfig) ConfigValidationError

validate fields for a single service config

func ValidateServiceUnitConfigFields

func ValidateServiceUnitConfigFields(serviceUnitConfig *model.ServiceUnitConfig) ConfigValidationError

func ValidateServiceUnitConfigs

func ValidateServiceUnitConfigs(serviceUnitConfigs []*model.ServiceUnitConfig) ConfigValidationError

Validate multiple service unit configs serviceUnitConfigs: an array of service unit configs returns validation error

func (ConfigValidationError) Exist

func (cve ConfigValidationError) Exist() bool

func (*ConfigValidationError) Extend

func (cve *ConfigValidationError) Extend(other ConfigValidationError)

func (ConfigValidationError) Print

func (cve ConfigValidationError) Print()

type InvalidAdapterFieldValueError

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

func NewInvalidAdapterFieldValueError

func NewInvalidAdapterFieldValueError(key string, adapterId string, message string) InvalidAdapterFieldValueError

func ValidateConsumerFields

func ValidateConsumerFields(bac *model.ConsumerConfig, serviceName string) []InvalidAdapterFieldValueError

func ValidateInternalAdapterConfigFields

func ValidateInternalAdapterConfigFields(iac model.StressorConfig) []InvalidAdapterFieldValueError

func ValidateRepositoryFields

func ValidateRepositoryFields(sac *model.RepositoryConfig, serviceName string) []InvalidAdapterFieldValueError

func ValidateServerFields

func ValidateServerFields(sac *model.ServerConfig, serviceName string) []InvalidAdapterFieldValueError

func (*InvalidAdapterFieldValueError) Error

type InvalidAdapterMappingError

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

func NewInvalidSecondaryAdapterError

func NewInvalidSecondaryAdapterError(id string) InvalidAdapterMappingError

func (*InvalidAdapterMappingError) Error

type InvalidServiceUnitFieldValueError

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

func NewInvalidServiceUnitFieldValueError

func NewInvalidServiceUnitFieldValueError(key string, serviceUnitConfig model.ServiceUnitConfig, message string) InvalidServiceUnitFieldValueError

func (*InvalidServiceUnitFieldValueError) Error

type InvalidStepFieldValueError

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

func NewInvalidStepFieldValueError

func NewInvalidStepFieldValueError(id string) InvalidStepFieldValueError

func ValidateStepFields

func ValidateStepFields(task model.TaskSpec, adapterConfig *model.PrimaryAdapterSpec, serviceName string) []InvalidStepFieldValueError

func (*InvalidStepFieldValueError) Error

Jump to

Keyboard shortcuts

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