directive_mock

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDirective

type MockDirective struct {
	ValidateErr error
	ValueOpts   directive.ValueOptions
}

MockDirective is a mock directive.

func (*MockDirective) GetDebugVals

func (m *MockDirective) GetDebugVals() directive.DebugValues

GetDebugVals returns the directive arguments as key/value pairs. This should be something like param1="test", param2="test". This is not necessarily unique, and is primarily intended for display.

func (*MockDirective) GetName

func (m *MockDirective) GetName() string

GetName returns the directive name.

func (*MockDirective) GetValueOptions

func (m *MockDirective) GetValueOptions() directive.ValueOptions

func (*MockDirective) IsEquivalent

func (m *MockDirective) IsEquivalent(other directive.Directive) bool

IsEquivalent checks if the other directive is equivalent. If two directives are equivalent, and the new directive does not superceed the old, then the new directive will be merged (de-duplicated) into the old.

func (*MockDirective) Superceeds

func (m *MockDirective) Superceeds(other directive.Directive) bool

Superceeds checks if the directive overrides another. The other directive will be canceled if superceded.

func (*MockDirective) Validate

func (m *MockDirective) Validate() error

Validate validates the directive. This is a cursory validation to see if the values "look correct."

Jump to

Keyboard shortcuts

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