cue

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// optional string val = 123456;
	E_Val = &file_cue_proto_extTypes[0]
	// optional solo.io.cue.FieldOptions opt = 1069;
	E_Opt = &file_cue_proto_extTypes[1]
)

Extension fields to descriptor.FieldOptions.

Functions

This section is empty.

Types

type FieldOptions

type FieldOptions struct {
	Required bool `protobuf:"varint,1,opt,name=required,proto3" json:"required,omitempty"`
	// Enable this option to treat this field as an unstructured object in the OpenAPI schema.
	// This is currently required to disable infinite recursion when expanding references with CUE on recursive types.
	DisableOpenapiValidation bool `` /* 136-byte string literal not displayed */
	// pass field name strait through as-is as an override and do not run toLowerCamel on it. Useful for field names with a number in them like "k8s"
	JsonFieldNameOverride string `` /* 128-byte string literal not displayed */
	// Enable this option to treat this field as any value in the OpenAPI schema.
	// This can be set to disable infinite recursion when expanding references with CUE on recursive types.
	// In addition, should be set when using `google.protobuf.Value`, which can accept any JSON value type:
	// object, array, string, number, boolean, or null.
	DisableOpenapiTypeValidation bool `` /* 150-byte string literal not displayed */
	// contains filtered or unexported fields
}

FieldOptions expose custom configuration at the field level. The parser (https://github.com/solo-io/cue/blob/02116a5aef4f463250d4088a38b1d08bbefdd7a8/encoding/protobuf/parse.go#L782) processes these field options.

func (*FieldOptions) Descriptor deprecated

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

Deprecated: Use FieldOptions.ProtoReflect.Descriptor instead.

func (*FieldOptions) GetDisableOpenapiTypeValidation added in v0.4.5

func (x *FieldOptions) GetDisableOpenapiTypeValidation() bool

func (*FieldOptions) GetDisableOpenapiValidation

func (x *FieldOptions) GetDisableOpenapiValidation() bool

func (*FieldOptions) GetJsonFieldNameOverride added in v0.4.4

func (x *FieldOptions) GetJsonFieldNameOverride() string

func (*FieldOptions) GetRequired

func (x *FieldOptions) GetRequired() bool

func (*FieldOptions) ProtoMessage

func (*FieldOptions) ProtoMessage()

func (*FieldOptions) ProtoReflect

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

func (*FieldOptions) Reset

func (x *FieldOptions) Reset()

func (*FieldOptions) String

func (x *FieldOptions) String() string

Jump to

Keyboard shortcuts

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