validate

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package validate contains various validation functions

Index

Constants

View Source
const (
	GRPCCollectorAddress      = "grpc-collector.batch.sh:9000"
	GRPCDefaultTimeoutSeconds = 5
)

Variables

View Source
var (
	ErrMissingConnOpts           = errors.New("connection config cannot be nil")
	ErrMissingConnCfg            = errors.New("connection object in connection config cannot be nil")
	ErrMissingConnArgs           = errors.New("connection config args cannot be nil")
	ErrMissingClientKey          = errors.New("TLS key cannot be empty if TLS certificate is provided")
	ErrMissingClientCert         = errors.New("TLS certificate cannot be empty if TLS key is provided")
	ErrMissingDSN                = errors.New("DSN cannot be empty")
	ErrInvalidConnTimeout        = errors.New("connection timeout must be greater than zero")
	ErrMissingAddress            = errors.New("address cannot be empty")
	ErrMissingAWSSecretAccessKey = errors.New("AWS Secret Access Key cannot be empty")
	ErrMissingAWSRegion          = errors.New("AWS Region cannot be empty")
	ErrMissingAWSAccessKeyID     = errors.New("AWS Access Key ID cannot be empty")

	ErrMissingMsg      = errors.New("msg cannot be nil")
	ErrMissingMsgValue = errors.New("msg.Value cannot be nil")

	ErrEmptyWriteOpts = errors.New("write options cannot be nil")

	ErrEmptyTunnelOpts = errors.New("tunnel options cannot be nil")

	ErrEmptyRelayOpts = errors.New("relay options cannot be nil")

	ErrEmptyBackendGroup = errors.New("backend group options cannot be nil")
	ErrEmptyBackendArgs  = errors.New("backend arg options cannot be nil")
)
View Source
var (
	ErrMissingAuth  = errors.New("auth cannot be nil")
	ErrInvalidToken = errors.New("invalid token")

	ErrConnectionNotFound       = errors.New("connection not found")
	ErrMissingConnectionOptions = errors.New("connection options cannot be nil")
	ErrMissingConnName          = errors.New("you must provide a connection name")
	ErrMissingConnectionType    = errors.New("you must provide at least one connection of: kafka")

	ErrMissingReadOptions = errors.New("missing Read options")

	ErrMissingRelayOptions    = errors.New("relay options cannot be nil")
	ErrMissingCollectionToken = errors.New("collection token cannot be empty")
	ErrMissingConnectionId    = errors.New("connection id cannot be empty")
	ErrRelayNotFound          = errors.New("relay not found")
	ErrRelayNotActive         = errors.New("relay not active")
	ErrRelayAlreadyActive     = errors.New("relay already active")
)
View Source
var (
	ErrMissingCLIOptions = errors.New("cli options cannot be nil")
)

Functions

func ConnectionOptionsForServer

func ConnectionOptionsForServer(connOptions *opts.ConnectionOptions) error

ConnectionOptionsForServer ensures all required parameters are passed when creating/testing/updating a connection

func ProtobufOptionsForCLI

func ProtobufOptionsForCLI(dirs []string, rootMessage, fdsFile string) error

func ReadOptionsForCLI

func ReadOptionsForCLI(readOpts *opts.ReadOptions) error

func RelayOptionsForCLI

func RelayOptionsForCLI(relayOpts *opts.RelayOptions) error

func RelayOptionsForServer

func RelayOptionsForServer(relayOptions *opts.RelayOptions) error

func TunnelOptionsForServer added in v1.4.0

func TunnelOptionsForServer(tunnelOptions *opts.TunnelOptions) error

func WriteOptionsForCLI added in v1.10.2

func WriteOptionsForCLI(writeOpts *opts.WriteOptions) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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