Documentation
¶
Index ¶
- Constants
- Variables
- type ListValue
- type ListValue_builder
- type Option
- func (x *Option) ClearValue()
- func (x *Option) GetKey() string
- func (x *Option) GetValue() *Value
- func (x *Option) HasValue() bool
- func (*Option) ProtoMessage()
- func (x *Option) ProtoReflect() protoreflect.Message
- func (x *Option) Reset()
- func (x *Option) SetKey(v string)
- func (x *Option) SetValue(v *Value)
- func (x *Option) String() string
- type Option_builder
- type Value
- func (x *Value) ClearBoolValue()
- func (x *Value) ClearBytesValue()
- func (x *Value) ClearDoubleValue()
- func (x *Value) ClearInt64Value()
- func (x *Value) ClearListValue()
- func (x *Value) ClearStringValue()
- func (x *Value) ClearType()
- func (x *Value) GetBoolValue() bool
- func (x *Value) GetBytesValue() []byte
- func (x *Value) GetDoubleValue() float64
- func (x *Value) GetInt64Value() int64
- func (x *Value) GetListValue() *ListValue
- func (x *Value) GetStringValue() string
- func (x *Value) GetType() isValue_Type
- func (x *Value) HasBoolValue() bool
- func (x *Value) HasBytesValue() bool
- func (x *Value) HasDoubleValue() bool
- func (x *Value) HasInt64Value() bool
- func (x *Value) HasListValue() bool
- func (x *Value) HasStringValue() bool
- func (x *Value) HasType() bool
- func (*Value) ProtoMessage()
- func (x *Value) ProtoReflect() protoreflect.Message
- func (x *Value) Reset()
- func (x *Value) SetBoolValue(v bool)
- func (x *Value) SetBytesValue(v []byte)
- func (x *Value) SetDoubleValue(v float64)
- func (x *Value) SetInt64Value(v int64)
- func (x *Value) SetListValue(v *ListValue)
- func (x *Value) SetStringValue(v string)
- func (x *Value) String() string
- func (x *Value) WhichType() case_Value_Type
- type Value_BoolValue
- type Value_BytesValue
- type Value_DoubleValue
- type Value_Int64Value
- type Value_ListValue
- type Value_StringValue
- type Value_builder
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) ProtoReflect ¶
func (x *ListValue) ProtoReflect() protoreflect.Message
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) ProtoReflect ¶
func (x *Option) ProtoReflect() protoreflect.Message
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) ProtoReflect ¶
func (x *Value) ProtoReflect() protoreflect.Message
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
Click to show internal directories.
Click to hide internal directories.