mock

package
v0.0.0-...-2911148 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_config_mock_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type MockConfig

type MockConfig struct {

	// Boolean specifying whether the filter should return OK for any
	// request it matches. Defaults to false (not OK).
	Allow bool `protobuf:"varint,1,opt,name=allow,proto3" json:"allow,omitempty"`
	// contains filtered or unexported fields
}

Mock filter config. The only thing which can be defined is whether it allows or rejects any request it matches.

func (*MockConfig) Descriptor deprecated

func (*MockConfig) Descriptor() ([]byte, []int)

Deprecated: Use MockConfig.ProtoReflect.Descriptor instead.

func (*MockConfig) GetAllow

func (x *MockConfig) GetAllow() bool

func (*MockConfig) ProtoMessage

func (*MockConfig) ProtoMessage()

func (*MockConfig) ProtoReflect

func (x *MockConfig) ProtoReflect() protoreflect.Message

func (*MockConfig) Reset

func (x *MockConfig) Reset()

func (*MockConfig) String

func (x *MockConfig) String() string

func (*MockConfig) Validate

func (m *MockConfig) Validate() error

Validate checks the field values on MockConfig with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*MockConfig) ValidateAll

func (m *MockConfig) ValidateAll() error

ValidateAll checks the field values on MockConfig with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MockConfigMultiError, or nil if none found.

type MockConfigMultiError

type MockConfigMultiError []error

MockConfigMultiError is an error wrapping multiple validation errors returned by MockConfig.ValidateAll() if the designated constraints aren't met.

func (MockConfigMultiError) AllErrors

func (m MockConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MockConfigMultiError) Error

func (m MockConfigMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type MockConfigValidationError

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

MockConfigValidationError is the validation error returned by MockConfig.Validate if the designated constraints aren't met.

func (MockConfigValidationError) Cause

func (e MockConfigValidationError) Cause() error

Cause function returns cause value.

func (MockConfigValidationError) Error

Error satisfies the builtin error interface

func (MockConfigValidationError) ErrorName

func (e MockConfigValidationError) ErrorName() string

ErrorName returns error name.

func (MockConfigValidationError) Field

Field function returns field value.

func (MockConfigValidationError) Key

Key function returns key value.

func (MockConfigValidationError) Reason

func (e MockConfigValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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