ptype - ActiveState ActiveGo 1.8
...

Package ptype

import "google.golang.org/genproto/protobuf/ptype"
Overview
Index

Overview ▾

Package ptype is a generated protocol buffer package.

It is generated from these files:

src/google/protobuf/type.proto

It has these top-level messages:

Type
Field
Enum
EnumValue
Option

Index ▾

Variables
type Enum
    func (*Enum) Descriptor() ([]byte, []int)
    func (m *Enum) GetEnumvalue() []*EnumValue
    func (m *Enum) GetName() string
    func (m *Enum) GetOptions() []*Option
    func (m *Enum) GetSourceContext() *google_protobuf1.SourceContext
    func (m *Enum) GetSyntax() Syntax
    func (*Enum) ProtoMessage()
    func (m *Enum) Reset()
    func (m *Enum) String() string
type EnumValue
    func (*EnumValue) Descriptor() ([]byte, []int)
    func (m *EnumValue) GetName() string
    func (m *EnumValue) GetNumber() int32
    func (m *EnumValue) GetOptions() []*Option
    func (*EnumValue) ProtoMessage()
    func (m *EnumValue) Reset()
    func (m *EnumValue) String() string
type Field
    func (*Field) Descriptor() ([]byte, []int)
    func (m *Field) GetCardinality() Field_Cardinality
    func (m *Field) GetDefaultValue() string
    func (m *Field) GetJsonName() string
    func (m *Field) GetKind() Field_Kind
    func (m *Field) GetName() string
    func (m *Field) GetNumber() int32
    func (m *Field) GetOneofIndex() int32
    func (m *Field) GetOptions() []*Option
    func (m *Field) GetPacked() bool
    func (m *Field) GetTypeUrl() string
    func (*Field) ProtoMessage()
    func (m *Field) Reset()
    func (m *Field) String() string
type Field_Cardinality
    func (Field_Cardinality) EnumDescriptor() ([]byte, []int)
    func (x Field_Cardinality) String() string
type Field_Kind
    func (Field_Kind) EnumDescriptor() ([]byte, []int)
    func (x Field_Kind) String() string
type Option
    func (*Option) Descriptor() ([]byte, []int)
    func (m *Option) GetName() string
    func (m *Option) GetValue() *google_protobuf.Any
    func (*Option) ProtoMessage()
    func (m *Option) Reset()
    func (m *Option) String() string
type Syntax
    func (Syntax) EnumDescriptor() ([]byte, []int)
    func (x Syntax) String() string
type Type
    func (*Type) Descriptor() ([]byte, []int)
    func (m *Type) GetFields() []*Field
    func (m *Type) GetName() string
    func (m *Type) GetOneofs() []string
    func (m *Type) GetOptions() []*Option
    func (m *Type) GetSourceContext() *google_protobuf1.SourceContext
    func (m *Type) GetSyntax() Syntax
    func (*Type) ProtoMessage()
    func (m *Type) Reset()
    func (m *Type) String() string

Package files

type.pb.go

Variables

var Field_Cardinality_name = map[int32]string{
    0: "CARDINALITY_UNKNOWN",
    1: "CARDINALITY_OPTIONAL",
    2: "CARDINALITY_REQUIRED",
    3: "CARDINALITY_REPEATED",
}
var Field_Cardinality_value = map[string]int32{
    "CARDINALITY_UNKNOWN":  0,
    "CARDINALITY_OPTIONAL": 1,
    "CARDINALITY_REQUIRED": 2,
    "CARDINALITY_REPEATED": 3,
}
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",
}
var 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,
}
var Syntax_name = map[int32]string{
    0: "SYNTAX_PROTO2",
    1: "SYNTAX_PROTO3",
}
var Syntax_value = map[string]int32{
    "SYNTAX_PROTO2": 0,
    "SYNTAX_PROTO3": 1,
}

type Enum

Enum type definition.

type Enum struct {
    // Enum type name.
    Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
    // Enum value definitions.
    Enumvalue []*EnumValue `protobuf:"bytes,2,rep,name=enumvalue" json:"enumvalue,omitempty"`
    // Protocol buffer options.
    Options []*Option `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"`
    // The source context.
    SourceContext *google_protobuf1.SourceContext `protobuf:"bytes,4,opt,name=source_context,json=sourceContext" json:"source_context,omitempty"`
    // The source syntax.
    Syntax Syntax `protobuf:"varint,5,opt,name=syntax,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
}

func (*Enum) Descriptor

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

func (*Enum) GetEnumvalue

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

func (*Enum) GetName

func (m *Enum) GetName() string

func (*Enum) GetOptions

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

func (*Enum) GetSourceContext

func (m *Enum) GetSourceContext() *google_protobuf1.SourceContext

func (*Enum) GetSyntax

func (m *Enum) GetSyntax() Syntax

func (*Enum) ProtoMessage

func (*Enum) ProtoMessage()

func (*Enum) Reset

func (m *Enum) Reset()

func (*Enum) String

func (m *Enum) String() string

type EnumValue

Enum value definition.

type EnumValue struct {
    // Enum value name.
    Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
    // Enum value number.
    Number int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"`
    // Protocol buffer options.
    Options []*Option `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"`
}

func (*EnumValue) Descriptor

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

func (*EnumValue) GetName

func (m *EnumValue) GetName() string

func (*EnumValue) GetNumber

func (m *EnumValue) GetNumber() int32

func (*EnumValue) GetOptions

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

func (*EnumValue) ProtoMessage

func (*EnumValue) ProtoMessage()

func (*EnumValue) Reset

func (m *EnumValue) Reset()

func (*EnumValue) String

func (m *EnumValue) String() string

type Field

A single field of a message type.

type Field struct {
    // The field type.
    Kind Field_Kind `protobuf:"varint,1,opt,name=kind,enum=google.protobuf.Field_Kind" json:"kind,omitempty"`
    // The field cardinality.
    Cardinality Field_Cardinality `protobuf:"varint,2,opt,name=cardinality,enum=google.protobuf.Field_Cardinality" json:"cardinality,omitempty"`
    // The field number.
    Number int32 `protobuf:"varint,3,opt,name=number" json:"number,omitempty"`
    // The field name.
    Name string `protobuf:"bytes,4,opt,name=name" 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" json:"type_url,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" json:"oneof_index,omitempty"`
    // Whether to use alternative packed wire representation.
    Packed bool `protobuf:"varint,8,opt,name=packed" json:"packed,omitempty"`
    // The protocol buffer options.
    Options []*Option `protobuf:"bytes,9,rep,name=options" json:"options,omitempty"`
    // The field JSON name.
    JsonName string `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,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" json:"default_value,omitempty"`
}

func (*Field) Descriptor

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

func (*Field) GetCardinality

func (m *Field) GetCardinality() Field_Cardinality

func (*Field) GetDefaultValue

func (m *Field) GetDefaultValue() string

func (*Field) GetJsonName

func (m *Field) GetJsonName() string

func (*Field) GetKind

func (m *Field) GetKind() Field_Kind

func (*Field) GetName

func (m *Field) GetName() string

func (*Field) GetNumber

func (m *Field) GetNumber() int32

func (*Field) GetOneofIndex

func (m *Field) GetOneofIndex() int32

func (*Field) GetOptions

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

func (*Field) GetPacked

func (m *Field) GetPacked() bool

func (*Field) GetTypeUrl

func (m *Field) GetTypeUrl() string

func (*Field) ProtoMessage

func (*Field) ProtoMessage()

func (*Field) Reset

func (m *Field) Reset()

func (*Field) String

func (m *Field) String() string

type Field_Cardinality

Whether a field is optional, required, or repeated.

type Field_Cardinality int32
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) EnumDescriptor

func (Field_Cardinality) EnumDescriptor() ([]byte, []int)

func (Field_Cardinality) String

func (x Field_Cardinality) String() string

type Field_Kind

Basic field types.

type Field_Kind int32
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) EnumDescriptor

func (Field_Kind) EnumDescriptor() ([]byte, []int)

func (Field_Kind) String

func (x Field_Kind) String() string

type Option

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

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" 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 *google_protobuf.Any `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
}

func (*Option) Descriptor

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

func (*Option) GetName

func (m *Option) GetName() string

func (*Option) GetValue

func (m *Option) GetValue() *google_protobuf.Any

func (*Option) ProtoMessage

func (*Option) ProtoMessage()

func (*Option) Reset

func (m *Option) Reset()

func (*Option) String

func (m *Option) String() string

type Syntax

The syntax in which a protocol buffer element is defined.

type Syntax int32
const (
    // Syntax `proto2`.
    Syntax_SYNTAX_PROTO2 Syntax = 0
    // Syntax `proto3`.
    Syntax_SYNTAX_PROTO3 Syntax = 1
)

func (Syntax) EnumDescriptor

func (Syntax) EnumDescriptor() ([]byte, []int)

func (Syntax) String

func (x Syntax) String() string

type Type

A protocol buffer message type.

type Type struct {
    // The fully qualified message name.
    Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
    // The list of fields.
    Fields []*Field `protobuf:"bytes,2,rep,name=fields" json:"fields,omitempty"`
    // The list of types appearing in `oneof` definitions in this type.
    Oneofs []string `protobuf:"bytes,3,rep,name=oneofs" json:"oneofs,omitempty"`
    // The protocol buffer options.
    Options []*Option `protobuf:"bytes,4,rep,name=options" json:"options,omitempty"`
    // The source context.
    SourceContext *google_protobuf1.SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext" json:"source_context,omitempty"`
    // The source syntax.
    Syntax Syntax `protobuf:"varint,6,opt,name=syntax,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
}

func (*Type) Descriptor

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

func (*Type) GetFields

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

func (*Type) GetName

func (m *Type) GetName() string

func (*Type) GetOneofs

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

func (*Type) GetOptions

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

func (*Type) GetSourceContext

func (m *Type) GetSourceContext() *google_protobuf1.SourceContext

func (*Type) GetSyntax

func (m *Type) GetSyntax() Syntax

func (*Type) ProtoMessage

func (*Type) ProtoMessage()

func (*Type) Reset

func (m *Type) Reset()

func (*Type) String

func (m *Type) String() string