gopb

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 5 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// optional go.Options enum = 7001;
	E_Enum = &file_patch_go_proto_extTypes[3]
)

Extension fields to descriptorpb.EnumOptions.

View Source
var (
	// optional go.Options field = 7001;
	E_Field = &file_patch_go_proto_extTypes[1]
)

Extension fields to descriptorpb.FieldOptions.

View Source
var (
	// optional go.LintOptions lint = 7001;
	E_Lint = &file_patch_go_proto_extTypes[5]
)

Extension fields to descriptorpb.FileOptions.

View Source
var (
	// optional go.Options message = 7001;
	E_Message = &file_patch_go_proto_extTypes[0]
)

Extension fields to descriptorpb.MessageOptions.

View Source
var (
	// optional go.Options oneof = 7001;
	E_Oneof = &file_patch_go_proto_extTypes[2]
)

Extension fields to descriptorpb.OneofOptions.

View Source
var (
	// optional go.Options value = 7001;
	E_Value = &file_patch_go_proto_extTypes[4]
)

Extension fields to descriptorpb.EnumValueOptions.

View Source
var File_patch_go_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type LintOptions added in v0.3.0

type LintOptions struct {

	// Set all to true if all generated Go symbols should be linted.
	// This option affects generated structs, struct fields, enum types, and value constants.
	All *bool `protobuf:"varint,1,opt,name=all" json:"all,omitempty"`
	// Set messages to true if message names should be linted.
	// This does not affect message fields.
	Messages *bool `protobuf:"varint,2,opt,name=messages" json:"messages,omitempty"`
	// Set messages to true if message field names should be linted.
	// This does not affect message fields.
	Fields *bool `protobuf:"varint,3,opt,name=fields" json:"fields,omitempty"`
	// Set enums to true if generated enum names should be linted.
	// This does not affect enum values.
	Enums *bool `protobuf:"varint,4,opt,name=enums" json:"enums,omitempty"`
	// Set values to true if generated enum value constants should be linted.
	Values *bool `protobuf:"varint,5,opt,name=values" json:"values,omitempty"`
	// Set extensions to true if generated extension names should be linted.
	Extensions *bool `protobuf:"varint,6,opt,name=extensions" json:"extensions,omitempty"`
	// The initialisms option lets you specify strings that should not be generated as mixed-case,
	// Examples: ID, URL, HTTP, etc.
	Initialisms []string `protobuf:"bytes,10,rep,name=initialisms" json:"initialisms,omitempty"`
	// contains filtered or unexported fields
}

LintOptions represent options for linting a generated Go file.

func (*LintOptions) Descriptor deprecated added in v0.3.0

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

Deprecated: Use LintOptions.ProtoReflect.Descriptor instead.

func (*LintOptions) GetAll added in v0.3.0

func (x *LintOptions) GetAll() bool

func (*LintOptions) GetEnums added in v0.3.0

func (x *LintOptions) GetEnums() bool

func (*LintOptions) GetExtensions added in v0.3.0

func (x *LintOptions) GetExtensions() bool

func (*LintOptions) GetFields added in v0.3.0

func (x *LintOptions) GetFields() bool

func (*LintOptions) GetInitialisms added in v0.3.0

func (x *LintOptions) GetInitialisms() []string

func (*LintOptions) GetMessages added in v0.3.0

func (x *LintOptions) GetMessages() bool

func (*LintOptions) GetValues added in v0.3.0

func (x *LintOptions) GetValues() bool

func (*LintOptions) InitialismsMap added in v0.3.0

func (o *LintOptions) InitialismsMap() map[string]bool

InitialismsMap returns a map[string]bool of o.Initialisms.

func (*LintOptions) ProtoMessage added in v0.3.0

func (*LintOptions) ProtoMessage()

func (*LintOptions) ProtoReflect added in v0.3.0

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

func (*LintOptions) Reset added in v0.3.0

func (x *LintOptions) Reset()

func (*LintOptions) String added in v0.3.0

func (x *LintOptions) String() string

type Options

type Options struct {

	// The name option renames the generated Go identifier and related identifiers.
	// For a message, this renames the generated Go struct and nested messages or enums, if any.
	// For a message field, this renames the generated Go struct field and getter method.
	// For a oneof field, this renames the generated Go struct field, getter method, interface type, and wrapper types.
	// For an enum, this renames the generated Go type.
	// For an enum value, this renames the generated Go const.
	Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The embed option indicates the field should be embedded in the generated Go struct.
	// Only message types can be embedded. Oneof fields cannot be embedded.
	// See https://golang.org/ref/spec#Struct_types.
	Embed *bool `protobuf:"varint,2,opt,name=embed" json:"embed,omitempty"`
	// The type option changes the generated field type.
	// All generated code assumes that this type is castable to the protocol buffer field type.
	Type *string `protobuf:"bytes,3,opt,name=type" json:"type,omitempty"`
	// The getter option renames the generated getter method (default: Get<Field>)
	// so a custom getter can be implemented in its place.
	Getter *string `protobuf:"bytes,10,opt,name=getter" json:"getter,omitempty"` // TODO: implement this
	// The tags option specifies additional struct tags which are appended a generated Go struct field.
	// This option may be specified on a message field or a oneof field.
	// The value should omit the enclosing backticks.
	Tags *string `protobuf:"bytes,20,opt,name=tags" json:"tags,omitempty"`
	// The stringer option renames a generated String() method (if any)
	// so a custom String() method can be implemented in its place.
	Stringer *string `protobuf:"bytes,30,opt,name=stringer" json:"stringer,omitempty"` // TODO: implement for messages
	// The stringer_name option is a deprecated alias for stringer.
	// It will be removed in a future version of this package.
	StringerName *string `protobuf:"bytes,31,opt,name=stringer_name,json=stringerName" json:"stringer_name,omitempty"`
	// contains filtered or unexported fields
}

Options represent Go-specific options for Protobuf messages, fields, oneofs, enums, or enum values.

func (*Options) Descriptor deprecated

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

Deprecated: Use Options.ProtoReflect.Descriptor instead.

func (*Options) GetEmbed added in v0.4.0

func (x *Options) GetEmbed() bool

func (*Options) GetGetter added in v0.2.0

func (x *Options) GetGetter() string

func (*Options) GetName

func (x *Options) GetName() string

func (*Options) GetStringer added in v0.2.0

func (x *Options) GetStringer() string

func (*Options) GetStringerName

func (x *Options) GetStringerName() string

func (*Options) GetTags

func (x *Options) GetTags() string

func (*Options) GetType added in v0.5.0

func (x *Options) GetType() string

func (*Options) ProtoMessage

func (*Options) ProtoMessage()

func (*Options) ProtoReflect

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

func (*Options) Reset

func (x *Options) Reset()

func (*Options) String

func (x *Options) String() string

Jump to

Keyboard shortcuts

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