typepb

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Syntax_name = map[int32]string{
		0: "SYNTAX_PROTO2",
		1: "SYNTAX_PROTO3",
		2: "SYNTAX_EDITIONS",
	}
	Syntax_value = map[string]int32{
		"SYNTAX_PROTO2":   0,
		"SYNTAX_PROTO3":   1,
		"SYNTAX_EDITIONS": 2,
	}
)

Enum value maps for Syntax.

View Source
var (
	Field_Kind_name = map[int32]string{
		0:  "TYPE_UNKNOWN",
		1:  "TYPE_DOUBLE",
		2:  "TYPE_FLOAT",
		3:  "TYPE_INT64",
		4:  "TYPE_UINT64",
		5:  "TYPE_INT32",
		6:  "TYPE_FIXED64",
		7:  "TYPE_FIXED32",
		8:  "TYPE_BOOL",
		9:  "TYPE_STRING",
		10: "TYPE_GROUP",
		11: "TYPE_MESSAGE",
		12: "TYPE_BYTES",
		13: "TYPE_UINT32",
		14: "TYPE_ENUM",
		15: "TYPE_SFIXED32",
		16: "TYPE_SFIXED64",
		17: "TYPE_SINT32",
		18: "TYPE_SINT64",
	}
	Field_Kind_value = map[string]int32{
		"TYPE_UNKNOWN":  0,
		"TYPE_DOUBLE":   1,
		"TYPE_FLOAT":    2,
		"TYPE_INT64":    3,
		"TYPE_UINT64":   4,
		"TYPE_INT32":    5,
		"TYPE_FIXED64":  6,
		"TYPE_FIXED32":  7,
		"TYPE_BOOL":     8,
		"TYPE_STRING":   9,
		"TYPE_GROUP":    10,
		"TYPE_MESSAGE":  11,
		"TYPE_BYTES":    12,
		"TYPE_UINT32":   13,
		"TYPE_ENUM":     14,
		"TYPE_SFIXED32": 15,
		"TYPE_SFIXED64": 16,
		"TYPE_SINT32":   17,
		"TYPE_SINT64":   18,
	}
)

Enum value maps for Field_Kind.

View Source
var (
	Field_Cardinality_name = map[int32]string{
		0: "CARDINALITY_UNKNOWN",
		1: "CARDINALITY_OPTIONAL",
		2: "CARDINALITY_REQUIRED",
		3: "CARDINALITY_REPEATED",
	}
	Field_Cardinality_value = map[string]int32{
		"CARDINALITY_UNKNOWN":  0,
		"CARDINALITY_OPTIONAL": 1,
		"CARDINALITY_REQUIRED": 2,
		"CARDINALITY_REPEATED": 3,
	}
)

Enum value maps for Field_Cardinality.

Functions

This section is empty.

Types

type Enum

type Enum struct {

	// Enum type name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Enum value definitions.
	Enumvalue []*EnumValue `protobuf:"bytes,2,rep,name=enumvalue,proto3" json:"enumvalue,omitempty"`
	// Protocol buffer options.
	Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"`
	// The source context.
	SourceContext *sourcecontextpb.SourceContext `protobuf:"bytes,4,opt,name=source_context,json=sourceContext,proto3" json:"sourceContext,omitempty"`
	// The source syntax.
	Syntax Syntax `protobuf:"varint,5,opt,name=syntax,proto3" json:"syntax,omitempty"`
	// The source edition string, only valid when syntax is SYNTAX_EDITIONS.
	Edition string `protobuf:"bytes,6,opt,name=edition,proto3" json:"edition,omitempty"`
	// contains filtered or unexported fields
}

Enum type definition.

func (*Enum) CloneMessageVT

func (m *Enum) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Enum) CloneVT

func (m *Enum) CloneVT() *Enum

func (*Enum) EqualMessageVT

func (this *Enum) EqualMessageVT(thatMsg any) bool

func (*Enum) EqualVT

func (this *Enum) EqualVT(that *Enum) bool

func (*Enum) GetEdition

func (x *Enum) GetEdition() string

func (*Enum) GetEnumvalue

func (x *Enum) GetEnumvalue() []*EnumValue

func (*Enum) GetName

func (x *Enum) GetName() string

func (*Enum) GetOptions

func (x *Enum) GetOptions() []*Option

func (*Enum) GetSourceContext

func (x *Enum) GetSourceContext() *sourcecontextpb.SourceContext

func (*Enum) GetSyntax

func (x *Enum) GetSyntax() Syntax

func (*Enum) MarshalProtoText added in v0.5.0

func (x *Enum) MarshalProtoText() string

func (*Enum) MarshalToSizedBufferVT

func (m *Enum) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Enum) MarshalToSizedBufferVTStrict

func (m *Enum) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)

func (*Enum) MarshalToVT

func (m *Enum) MarshalToVT(dAtA []byte) (int, error)

func (*Enum) MarshalToVTStrict

func (m *Enum) MarshalToVTStrict(dAtA []byte) (int, error)

func (*Enum) MarshalVT

func (m *Enum) MarshalVT() (dAtA []byte, err error)

func (*Enum) MarshalVTStrict

func (m *Enum) MarshalVTStrict() (dAtA []byte, err error)

func (*Enum) ProtoMessage

func (*Enum) ProtoMessage()

func (*Enum) Reset

func (x *Enum) Reset()

func (*Enum) SizeVT

func (m *Enum) SizeVT() (n int)

func (*Enum) String added in v0.5.0

func (x *Enum) String() string

func (*Enum) UnmarshalVT

func (m *Enum) UnmarshalVT(dAtA []byte) error

func (*Enum) UnmarshalVTUnsafe

func (m *Enum) UnmarshalVTUnsafe(dAtA []byte) error

type EnumValue

type EnumValue struct {

	// Enum value name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Enum value number.
	Number int32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"`
	// Protocol buffer options.
	Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

Enum value definition.

func (*EnumValue) CloneMessageVT

func (m *EnumValue) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*EnumValue) CloneVT

func (m *EnumValue) CloneVT() *EnumValue

func (*EnumValue) EqualMessageVT

func (this *EnumValue) EqualMessageVT(thatMsg any) bool

func (*EnumValue) EqualVT

func (this *EnumValue) EqualVT(that *EnumValue) bool

func (*EnumValue) GetName

func (x *EnumValue) GetName() string

func (*EnumValue) GetNumber

func (x *EnumValue) GetNumber() int32

func (*EnumValue) GetOptions

func (x *EnumValue) GetOptions() []*Option

func (*EnumValue) MarshalProtoText added in v0.5.0

func (x *EnumValue) MarshalProtoText() string

func (*EnumValue) MarshalToSizedBufferVT

func (m *EnumValue) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*EnumValue) MarshalToSizedBufferVTStrict

func (m *EnumValue) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)

func (*EnumValue) MarshalToVT

func (m *EnumValue) MarshalToVT(dAtA []byte) (int, error)

func (*EnumValue) MarshalToVTStrict

func (m *EnumValue) MarshalToVTStrict(dAtA []byte) (int, error)

func (*EnumValue) MarshalVT

func (m *EnumValue) MarshalVT() (dAtA []byte, err error)

func (*EnumValue) MarshalVTStrict

func (m *EnumValue) MarshalVTStrict() (dAtA []byte, err error)

func (*EnumValue) ProtoMessage

func (*EnumValue) ProtoMessage()

func (*EnumValue) Reset

func (x *EnumValue) Reset()

func (*EnumValue) SizeVT

func (m *EnumValue) SizeVT() (n int)

func (*EnumValue) String added in v0.5.0

func (x *EnumValue) String() string

func (*EnumValue) UnmarshalVT

func (m *EnumValue) UnmarshalVT(dAtA []byte) error

func (*EnumValue) UnmarshalVTUnsafe

func (m *EnumValue) UnmarshalVTUnsafe(dAtA []byte) error

type Field

type Field struct {

	// The field type.
	Kind Field_Kind `protobuf:"varint,1,opt,name=kind,proto3" json:"kind,omitempty"`
	// The field cardinality.
	Cardinality Field_Cardinality `protobuf:"varint,2,opt,name=cardinality,proto3" json:"cardinality,omitempty"`
	// The field number.
	Number int32 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"`
	// The field name.
	Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	// The field type URL, without the scheme, for message or enumeration
	// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
	TypeUrl string `protobuf:"bytes,6,opt,name=type_url,json=typeUrl,proto3" json:"typeUrl,omitempty"`
	// The index of the field type in `Type.oneofs`, for message or enumeration
	// types. The first type has index 1; zero means the type is not in the list.
	OneofIndex int32 `protobuf:"varint,7,opt,name=oneof_index,json=oneofIndex,proto3" json:"oneofIndex,omitempty"`
	// Whether to use alternative packed wire representation.
	Packed bool `protobuf:"varint,8,opt,name=packed,proto3" json:"packed,omitempty"`
	// The protocol buffer options.
	Options []*Option `protobuf:"bytes,9,rep,name=options,proto3" json:"options,omitempty"`
	// The field JSON name.
	JsonName string `protobuf:"bytes,10,opt,name=json_name,json=jsonName,proto3" json:"jsonName,omitempty"`
	// The string value of the default value of this field. Proto2 syntax only.
	DefaultValue string `protobuf:"bytes,11,opt,name=default_value,json=defaultValue,proto3" json:"defaultValue,omitempty"`
	// contains filtered or unexported fields
}

A single field of a message type.

func (*Field) CloneMessageVT

func (m *Field) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Field) CloneVT

func (m *Field) CloneVT() *Field

func (*Field) EqualMessageVT

func (this *Field) EqualMessageVT(thatMsg any) bool

func (*Field) EqualVT

func (this *Field) EqualVT(that *Field) bool

func (*Field) GetCardinality

func (x *Field) GetCardinality() Field_Cardinality

func (*Field) GetDefaultValue

func (x *Field) GetDefaultValue() string

func (*Field) GetJsonName

func (x *Field) GetJsonName() string

func (*Field) GetKind

func (x *Field) GetKind() Field_Kind

func (*Field) GetName

func (x *Field) GetName() string

func (*Field) GetNumber

func (x *Field) GetNumber() int32

func (*Field) GetOneofIndex

func (x *Field) GetOneofIndex() int32

func (*Field) GetOptions

func (x *Field) GetOptions() []*Option

func (*Field) GetPacked

func (x *Field) GetPacked() bool

func (*Field) GetTypeUrl

func (x *Field) GetTypeUrl() string

func (*Field) MarshalProtoText added in v0.5.0

func (x *Field) MarshalProtoText() string

func (*Field) MarshalToSizedBufferVT

func (m *Field) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Field) MarshalToSizedBufferVTStrict

func (m *Field) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)

func (*Field) MarshalToVT

func (m *Field) MarshalToVT(dAtA []byte) (int, error)

func (*Field) MarshalToVTStrict

func (m *Field) MarshalToVTStrict(dAtA []byte) (int, error)

func (*Field) MarshalVT

func (m *Field) MarshalVT() (dAtA []byte, err error)

func (*Field) MarshalVTStrict

func (m *Field) MarshalVTStrict() (dAtA []byte, err error)

func (*Field) ProtoMessage

func (*Field) ProtoMessage()

func (*Field) Reset

func (x *Field) Reset()

func (*Field) SizeVT

func (m *Field) SizeVT() (n int)

func (*Field) String added in v0.5.0

func (x *Field) String() string

func (*Field) UnmarshalVT

func (m *Field) UnmarshalVT(dAtA []byte) error

func (*Field) UnmarshalVTUnsafe

func (m *Field) UnmarshalVTUnsafe(dAtA []byte) error

type Field_Cardinality

type Field_Cardinality int32

Whether a field is optional, required, or repeated.

const (
	// For fields with unknown cardinality.
	Field_CARDINALITY_UNKNOWN Field_Cardinality = 0
	// For optional fields.
	Field_CARDINALITY_OPTIONAL Field_Cardinality = 1
	// For required fields. Proto2 syntax only.
	Field_CARDINALITY_REQUIRED Field_Cardinality = 2
	// For repeated fields.
	Field_CARDINALITY_REPEATED Field_Cardinality = 3
)

func (Field_Cardinality) Enum

func (Field_Cardinality) MarshalProtoText added in v0.5.0

func (x Field_Cardinality) MarshalProtoText() string

func (Field_Cardinality) String

func (x Field_Cardinality) String() string

type Field_Kind

type Field_Kind int32

Basic field types.

const (
	// Field type unknown.
	Field_TYPE_UNKNOWN Field_Kind = 0
	// Field type double.
	Field_TYPE_DOUBLE Field_Kind = 1
	// Field type float.
	Field_TYPE_FLOAT Field_Kind = 2
	// Field type int64.
	Field_TYPE_INT64 Field_Kind = 3
	// Field type uint64.
	Field_TYPE_UINT64 Field_Kind = 4
	// Field type int32.
	Field_TYPE_INT32 Field_Kind = 5
	// Field type fixed64.
	Field_TYPE_FIXED64 Field_Kind = 6
	// Field type fixed32.
	Field_TYPE_FIXED32 Field_Kind = 7
	// Field type bool.
	Field_TYPE_BOOL Field_Kind = 8
	// Field type string.
	Field_TYPE_STRING Field_Kind = 9
	// Field type group. Proto2 syntax only, and deprecated.
	Field_TYPE_GROUP Field_Kind = 10
	// Field type message.
	Field_TYPE_MESSAGE Field_Kind = 11
	// Field type bytes.
	Field_TYPE_BYTES Field_Kind = 12
	// Field type uint32.
	Field_TYPE_UINT32 Field_Kind = 13
	// Field type enum.
	Field_TYPE_ENUM Field_Kind = 14
	// Field type sfixed32.
	Field_TYPE_SFIXED32 Field_Kind = 15
	// Field type sfixed64.
	Field_TYPE_SFIXED64 Field_Kind = 16
	// Field type sint32.
	Field_TYPE_SINT32 Field_Kind = 17
	// Field type sint64.
	Field_TYPE_SINT64 Field_Kind = 18
)

func (Field_Kind) Enum

func (x Field_Kind) Enum() *Field_Kind

func (Field_Kind) MarshalProtoText added in v0.5.0

func (x Field_Kind) MarshalProtoText() string

func (Field_Kind) String

func (x Field_Kind) String() string

type Option

type Option struct {

	// The option's name. For protobuf built-in options (options defined in
	// descriptor.proto), this is the short name. For example, `"map_entry"`.
	// For custom options, it should be the fully-qualified name. For example,
	// `"google.api.http"`.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The option's value packed in an Any message. If the value is a primitive,
	// the corresponding wrapper type defined in google/protobuf/wrappers.proto
	// should be used. If the value is an enum, it should be stored as an int32
	// value using the google.protobuf.Int32Value type.
	Value *anypb.Any `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

A protocol buffer option, which can be attached to a message, field, enumeration, etc.

func (*Option) CloneMessageVT

func (m *Option) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Option) CloneVT

func (m *Option) CloneVT() *Option

func (*Option) EqualMessageVT

func (this *Option) EqualMessageVT(thatMsg any) bool

func (*Option) EqualVT

func (this *Option) EqualVT(that *Option) bool

func (*Option) GetName

func (x *Option) GetName() string

func (*Option) GetValue

func (x *Option) GetValue() *anypb.Any

func (*Option) MarshalProtoText added in v0.5.0

func (x *Option) MarshalProtoText() string

func (*Option) MarshalToSizedBufferVT

func (m *Option) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Option) MarshalToSizedBufferVTStrict

func (m *Option) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)

func (*Option) MarshalToVT

func (m *Option) MarshalToVT(dAtA []byte) (int, error)

func (*Option) MarshalToVTStrict

func (m *Option) MarshalToVTStrict(dAtA []byte) (int, error)

func (*Option) MarshalVT

func (m *Option) MarshalVT() (dAtA []byte, err error)

func (*Option) MarshalVTStrict

func (m *Option) MarshalVTStrict() (dAtA []byte, err error)

func (*Option) ProtoMessage

func (*Option) ProtoMessage()

func (*Option) Reset

func (x *Option) Reset()

func (*Option) SizeVT

func (m *Option) SizeVT() (n int)

func (*Option) String added in v0.5.0

func (x *Option) String() string

func (*Option) UnmarshalVT

func (m *Option) UnmarshalVT(dAtA []byte) error

func (*Option) UnmarshalVTUnsafe

func (m *Option) UnmarshalVTUnsafe(dAtA []byte) error

type Syntax

type Syntax int32

The syntax in which a protocol buffer element is defined.

const (
	// Syntax `proto2`.
	Syntax_SYNTAX_PROTO2 Syntax = 0
	// Syntax `proto3`.
	Syntax_SYNTAX_PROTO3 Syntax = 1
	// Syntax `editions`.
	Syntax_SYNTAX_EDITIONS Syntax = 2
)

func (Syntax) Enum

func (x Syntax) Enum() *Syntax

func (Syntax) MarshalProtoText added in v0.5.0

func (x Syntax) MarshalProtoText() string

func (Syntax) String

func (x Syntax) String() string

type Type

type Type struct {

	// The fully qualified message name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The list of fields.
	Fields []*Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"`
	// The list of types appearing in `oneof` definitions in this type.
	Oneofs []string `protobuf:"bytes,3,rep,name=oneofs,proto3" json:"oneofs,omitempty"`
	// The protocol buffer options.
	Options []*Option `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"`
	// The source context.
	SourceContext *sourcecontextpb.SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext,proto3" json:"sourceContext,omitempty"`
	// The source syntax.
	Syntax Syntax `protobuf:"varint,6,opt,name=syntax,proto3" json:"syntax,omitempty"`
	// The source edition string, only valid when syntax is SYNTAX_EDITIONS.
	Edition string `protobuf:"bytes,7,opt,name=edition,proto3" json:"edition,omitempty"`
	// contains filtered or unexported fields
}

A protocol buffer message type.

func (*Type) CloneMessageVT

func (m *Type) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*Type) CloneVT

func (m *Type) CloneVT() *Type

func (*Type) EqualMessageVT

func (this *Type) EqualMessageVT(thatMsg any) bool

func (*Type) EqualVT

func (this *Type) EqualVT(that *Type) bool

func (*Type) GetEdition

func (x *Type) GetEdition() string

func (*Type) GetFields

func (x *Type) GetFields() []*Field

func (*Type) GetName

func (x *Type) GetName() string

func (*Type) GetOneofs

func (x *Type) GetOneofs() []string

func (*Type) GetOptions

func (x *Type) GetOptions() []*Option

func (*Type) GetSourceContext

func (x *Type) GetSourceContext() *sourcecontextpb.SourceContext

func (*Type) GetSyntax

func (x *Type) GetSyntax() Syntax

func (*Type) MarshalProtoText added in v0.5.0

func (x *Type) MarshalProtoText() string

func (*Type) MarshalToSizedBufferVT

func (m *Type) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Type) MarshalToSizedBufferVTStrict

func (m *Type) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error)

func (*Type) MarshalToVT

func (m *Type) MarshalToVT(dAtA []byte) (int, error)

func (*Type) MarshalToVTStrict

func (m *Type) MarshalToVTStrict(dAtA []byte) (int, error)

func (*Type) MarshalVT

func (m *Type) MarshalVT() (dAtA []byte, err error)

func (*Type) MarshalVTStrict

func (m *Type) MarshalVTStrict() (dAtA []byte, err error)

func (*Type) ProtoMessage

func (*Type) ProtoMessage()

func (*Type) Reset

func (x *Type) Reset()

func (*Type) SizeVT

func (m *Type) SizeVT() (n int)

func (*Type) String added in v0.5.0

func (x *Type) String() string

func (*Type) UnmarshalVT

func (m *Type) UnmarshalVT(dAtA []byte) error

func (*Type) UnmarshalVTUnsafe

func (m *Type) UnmarshalVTUnsafe(dAtA []byte) error

Jump to

Keyboard shortcuts

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