pbj

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package pbj is a generated protocol buffer package.

It is generated from these files:

pbj.proto

It has these top-level messages:

PBJOptions

Index

Constants

View Source
const Default_PBJOptions_CacheSize bool = true
View Source
const Default_PBJOptions_LongNames bool = true
View Source
const Default_PBJOptions_PackedStruct bool = false
View Source
const Default_PBJOptions_SkipMessage bool = false

Variables

View Source
var E_PbjEnumOption = &proto.ExtensionDesc{
	ExtendedType:  (*google_protobuf.EnumOptions)(nil),
	ExtensionType: (*PBJOptions)(nil),
	Field:         1020,
	Name:          "pbj_enum_option",
	Tag:           "bytes,1020,opt,name=pbj_enum_option,json=pbjEnumOption",
	Filename:      "pbj.proto",
}
View Source
var E_PbjFieldOption = &proto.ExtensionDesc{
	ExtendedType:  (*google_protobuf.FieldOptions)(nil),
	ExtensionType: (*PBJOptions)(nil),
	Field:         1020,
	Name:          "pbj_field_option",
	Tag:           "bytes,1020,opt,name=pbj_field_option,json=pbjFieldOption",
	Filename:      "pbj.proto",
}
View Source
var E_PbjFileOption = &proto.ExtensionDesc{
	ExtendedType:  (*google_protobuf.FileOptions)(nil),
	ExtensionType: (*PBJOptions)(nil),
	Field:         1020,
	Name:          "pbj_file_option",
	Tag:           "bytes,1020,opt,name=pbj_file_option,json=pbjFileOption",
	Filename:      "pbj.proto",
}
View Source
var E_PbjMessageOption = &proto.ExtensionDesc{
	ExtendedType:  (*google_protobuf.MessageOptions)(nil),
	ExtensionType: (*PBJOptions)(nil),
	Field:         1020,
	Name:          "pbj_message_option",
	Tag:           "bytes,1020,opt,name=pbj_message_option,json=pbjMessageOption",
	Filename:      "pbj.proto",
}
View Source
var FieldType_name = map[int32]string{
	0: "FT_DEFAULT",
	1: "FT_CALLBACK",
	4: "FT_POINTER",
	2: "FT_STATIC",
	3: "FT_IGNORE",
}
View Source
var FieldType_value = map[string]int32{
	"FT_DEFAULT":  0,
	"FT_CALLBACK": 1,
	"FT_POINTER":  4,
	"FT_STATIC":   2,
	"FT_IGNORE":   3,
}

Functions

This section is empty.

Types

type FieldType

type FieldType int32
const (
	FieldType_FT_DEFAULT  FieldType = 0
	FieldType_FT_CALLBACK FieldType = 1
	FieldType_FT_POINTER  FieldType = 4
	FieldType_FT_STATIC   FieldType = 2
	FieldType_FT_IGNORE   FieldType = 3
)
const Default_PBJOptions_Type FieldType = FieldType_FT_DEFAULT

func (FieldType) Enum

func (x FieldType) Enum() *FieldType

func (FieldType) EnumDescriptor

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

func (FieldType) String

func (x FieldType) String() string

func (*FieldType) UnmarshalJSON

func (x *FieldType) UnmarshalJSON(data []byte) error

type PBJOptions

type PBJOptions struct {
	// Allocated size for 'bytes' and 'string' fields.
	MaxSize *int32 `protobuf:"varint,1,opt,name=max_size,json=maxSize" json:"max_size,omitempty"`
	// Allocated number of entries in arrays ('repeated' fields)
	MaxCount *int32 `protobuf:"varint,2,opt,name=max_count,json=maxCount" json:"max_count,omitempty"`
	// Force type of field (callback or static allocation)
	Type *FieldType `protobuf:"varint,3,opt,name=type,enum=FieldType,def=0" json:"type,omitempty"`
	// Use long names for enums, i.e. EnumName_EnumValue.
	LongNames *bool `protobuf:"varint,4,opt,name=long_names,json=longNames,def=1" json:"long_names,omitempty"`
	// Add 'packed' attribute to generated structs.
	// Note: this cannot be used on CPUs that break on unaligned
	// accesses to variables.
	PackedStruct *bool `protobuf:"varint,5,opt,name=packed_struct,json=packedStruct,def=0" json:"packed_struct,omitempty"`
	// Skip this message
	SkipMessage      *bool  `protobuf:"varint,6,opt,name=skip_message,json=skipMessage,def=0" json:"skip_message,omitempty"`
	CacheSize        *bool  `protobuf:"varint,7,opt,name=cache_size,json=cacheSize,def=1" json:"cache_size,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

This is the inner options message, which basically defines options for a field. When it is used in message or file scope, it applies to all fields.

func (*PBJOptions) Descriptor

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

func (*PBJOptions) GetCacheSize

func (m *PBJOptions) GetCacheSize() bool

func (*PBJOptions) GetLongNames

func (m *PBJOptions) GetLongNames() bool

func (*PBJOptions) GetMaxCount

func (m *PBJOptions) GetMaxCount() int32

func (*PBJOptions) GetMaxSize

func (m *PBJOptions) GetMaxSize() int32

func (*PBJOptions) GetPackedStruct

func (m *PBJOptions) GetPackedStruct() bool

func (*PBJOptions) GetSkipMessage

func (m *PBJOptions) GetSkipMessage() bool

func (*PBJOptions) GetType

func (m *PBJOptions) GetType() FieldType

func (*PBJOptions) ProtoMessage

func (*PBJOptions) ProtoMessage()

func (*PBJOptions) Reset

func (m *PBJOptions) Reset()

func (*PBJOptions) String

func (m *PBJOptions) String() string

Jump to

Keyboard shortcuts

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