optionv1

package
v1.36.11-2025071818194... Latest Latest
Warning

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

Go to latest
Published: unknown License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

View Source
const Value_BoolValue_case case_Value_Type = 1
View Source
const Value_BytesValue_case case_Value_Type = 5
View Source
const Value_DoubleValue_case case_Value_Type = 3
View Source
const Value_Int64Value_case case_Value_Type = 2
View Source
const Value_ListValue_case case_Value_Type = 6
View Source
const Value_StringValue_case case_Value_Type = 4
View Source
const Value_Type_not_set_case case_Value_Type = 0

Variables

View Source
var File_buf_plugin_option_v1_option_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ListValue

type ListValue struct {

	// The values comprising the list value.
	//
	// All Values must be of the same type.
	Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

ListValue is a list of Values.

This is needed so that it can be part of a oneof in Value.

func (*ListValue) GetValues

func (x *ListValue) GetValues() []*Value

func (*ListValue) ProtoMessage

func (*ListValue) ProtoMessage()

func (*ListValue) ProtoReflect

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

func (*ListValue) Reset

func (x *ListValue) Reset()

func (*ListValue) SetValues

func (x *ListValue) SetValues(v []*Value)

func (*ListValue) String

func (x *ListValue) String() string

type ListValue_builder

type ListValue_builder struct {

	// The values comprising the list value.
	//
	// All Values must be of the same type.
	Values []*Value
	// contains filtered or unexported fields
}

func (ListValue_builder) Build

func (b0 ListValue_builder) Build() *ListValue

type Option

type Option struct {

	// The option key.
	//
	// This identifies the option.
	//
	// Required.
	//
	// This must have at least three characters.
	// This must start and end with a lowercase letter from a-z, and only consist
	// of lowercase letters from a-z and underscores.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// The option value.
	//
	// Required.
	//
	// It is not possible to set a key with a not-present value. Do not add an Option with
	// a given key to denote that the key is not set.
	Value *Value `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

An option for a plugin.

Options are key/values that can control the behavior of a plugin.

For example, if you had a check Rule that checked that the suffix of all Services was "API", you may want an option with key "service_suffix" that can override the suffix "API" to another suffix such as "Service". This would result in the behavior of check changing, as well as result in the Purpose string potentially changing to specify that the expected suffix is "Service" instead of "API".

func (*Option) ClearValue

func (x *Option) ClearValue()

func (*Option) GetKey

func (x *Option) GetKey() string

func (*Option) GetValue

func (x *Option) GetValue() *Value

func (*Option) HasValue

func (x *Option) HasValue() bool

func (*Option) ProtoMessage

func (*Option) ProtoMessage()

func (*Option) ProtoReflect

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

func (*Option) Reset

func (x *Option) Reset()

func (*Option) SetKey

func (x *Option) SetKey(v string)

func (*Option) SetValue

func (x *Option) SetValue(v *Value)

func (*Option) String

func (x *Option) String() string

type Option_builder

type Option_builder struct {

	// The option key.
	//
	// This identifies the option.
	//
	// Required.
	//
	// This must have at least three characters.
	// This must start and end with a lowercase letter from a-z, and only consist
	// of lowercase letters from a-z and underscores.
	Key string
	// The option value.
	//
	// Required.
	//
	// It is not possible to set a key with a not-present value. Do not add an Option with
	// a given key to denote that the key is not set.
	Value *Value
	// contains filtered or unexported fields
}

func (Option_builder) Build

func (b0 Option_builder) Build() *Option

type Value

type Value struct {

	// The type of value.
	//
	// At least one value must be set.
	//
	// Types that are valid to be assigned to Type:
	//
	//	*Value_BoolValue
	//	*Value_Int64Value
	//	*Value_DoubleValue
	//	*Value_StringValue
	//	*Value_BytesValue
	//	*Value_ListValue
	Type isValue_Type `protobuf_oneof:"type"`
	// contains filtered or unexported fields
}

Value is an option value.

This is similar to google.protobuf.Value but with better typing.

func (*Value) ClearBoolValue

func (x *Value) ClearBoolValue()

func (*Value) ClearBytesValue

func (x *Value) ClearBytesValue()

func (*Value) ClearDoubleValue

func (x *Value) ClearDoubleValue()

func (*Value) ClearInt64Value

func (x *Value) ClearInt64Value()

func (*Value) ClearListValue

func (x *Value) ClearListValue()

func (*Value) ClearStringValue

func (x *Value) ClearStringValue()

func (*Value) ClearType

func (x *Value) ClearType()

func (*Value) GetBoolValue

func (x *Value) GetBoolValue() bool

func (*Value) GetBytesValue

func (x *Value) GetBytesValue() []byte

func (*Value) GetDoubleValue

func (x *Value) GetDoubleValue() float64

func (*Value) GetInt64Value

func (x *Value) GetInt64Value() int64

func (*Value) GetListValue

func (x *Value) GetListValue() *ListValue

func (*Value) GetStringValue

func (x *Value) GetStringValue() string

func (*Value) GetType

func (x *Value) GetType() isValue_Type

func (*Value) HasBoolValue

func (x *Value) HasBoolValue() bool

func (*Value) HasBytesValue

func (x *Value) HasBytesValue() bool

func (*Value) HasDoubleValue

func (x *Value) HasDoubleValue() bool

func (*Value) HasInt64Value

func (x *Value) HasInt64Value() bool

func (*Value) HasListValue

func (x *Value) HasListValue() bool

func (*Value) HasStringValue

func (x *Value) HasStringValue() bool

func (*Value) HasType

func (x *Value) HasType() bool

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) ProtoReflect

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

func (*Value) Reset

func (x *Value) Reset()

func (*Value) SetBoolValue

func (x *Value) SetBoolValue(v bool)

func (*Value) SetBytesValue

func (x *Value) SetBytesValue(v []byte)

func (*Value) SetDoubleValue

func (x *Value) SetDoubleValue(v float64)

func (*Value) SetInt64Value

func (x *Value) SetInt64Value(v int64)

func (*Value) SetListValue

func (x *Value) SetListValue(v *ListValue)

func (*Value) SetStringValue

func (x *Value) SetStringValue(v string)

func (*Value) String

func (x *Value) String() string

func (*Value) WhichType

func (x *Value) WhichType() case_Value_Type

type Value_BoolValue

type Value_BoolValue struct {
	// A bool value.
	BoolValue bool `protobuf:"varint,1,opt,name=bool_value,json=boolValue,proto3,oneof"`
}

type Value_BytesValue

type Value_BytesValue struct {
	// A bytes value.
	BytesValue []byte `protobuf:"bytes,5,opt,name=bytes_value,json=bytesValue,proto3,oneof"`
}

type Value_DoubleValue

type Value_DoubleValue struct {
	// A double value.
	DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"`
}

type Value_Int64Value

type Value_Int64Value struct {
	// An int64 value.
	Int64Value int64 `protobuf:"varint,2,opt,name=int64_value,json=int64Value,proto3,oneof"`
}

type Value_ListValue

type Value_ListValue struct {
	// A list of Values.
	ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,proto3,oneof"`
}

type Value_StringValue

type Value_StringValue struct {
	// A string value.
	StringValue string `protobuf:"bytes,4,opt,name=string_value,json=stringValue,proto3,oneof"`
}

type Value_builder

type Value_builder struct {

	// Fields of oneof Type:
	// A bool value.
	BoolValue *bool
	// An int64 value.
	Int64Value *int64
	// A double value.
	DoubleValue *float64
	// A string value.
	StringValue *string
	// A bytes value.
	BytesValue []byte
	// A list of Values.
	ListValue *ListValue
	// contains filtered or unexported fields
}

func (Value_builder) Build

func (b0 Value_builder) Build() *Value

Source Files

  • option.pb.go

Jump to

Keyboard shortcuts

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