Documentation ¶
Index ¶
- type MockDirective
- func (m *MockDirective) GetDebugVals() directive.DebugValues
- func (m *MockDirective) GetName() string
- func (m *MockDirective) GetValueOptions() directive.ValueOptions
- func (m *MockDirective) IsEquivalent(other directive.Directive) bool
- func (m *MockDirective) Superceeds(other directive.Directive) bool
- func (m *MockDirective) Validate() error
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."