protodescpb

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package protodescpb is meant to provide an easy mechanism to switch between github.com/golang/protobuf and google.golang.org/protobuf in the future.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.

func Float32

func Float32(v float32) *float32

Float32 is a helper routine that allocates a new float32 value to store v and returns a pointer to it.

func Float64

func Float64(v float64) *float64

Float64 is a helper routine that allocates a new float64 value to store v and returns a pointer to it.

func Int

func Int(v int) *int32

Int is a helper routine that allocates a new int32 value to store v and returns a pointer to it, but unlike Int32 its argument value is an int.

func Int32

func Int32(v int32) *int32

Int32 is a helper routine that allocates a new int32 value to store v and returns a pointer to it.

func Int64

func Int64(v int64) *int64

Int64 is a helper routine that allocates a new int64 value to store v and returns a pointer to it.

func String

func String(v string) *string

String is a helper routine that allocates a new string value to store v and returns a pointer to it.

func Uint32

func Uint32(v uint32) *uint32

Uint32 is a helper routine that allocates a new uint32 value to store v and returns a pointer to it.

func Uint64

func Uint64(v uint64) *uint64

Uint64 is a helper routine that allocates a new uint64 value to store v and returns a pointer to it.

Types

type BaseFileDescriptorSet

type BaseFileDescriptorSet interface {
	Marshaler

	// GetFile gets all the FileDescriptors.
	GetFile() []FileDescriptor
}

BaseFileDescriptorSet is an interface to wrap FileDescriptorSet implementations.

Fields should not be modified.

type FileDescriptor

type FileDescriptor interface {
	GetDependency() []string
	GetEnumType() []*descriptor.EnumDescriptorProto
	GetExtension() []*descriptor.FieldDescriptorProto
	GetMessageType() []*descriptor.DescriptorProto
	GetName() string
	GetOptions() *descriptor.FileOptions
	GetPackage() string
	GetPublicDependency() []int32
	GetService() []*descriptor.ServiceDescriptorProto
	GetSourceCodeInfo() *descriptor.SourceCodeInfo
	GetSyntax() string
	GetWeakDependency() []int32
}

FileDescriptor is an interface to wrap FileDescriptorProto implementations.

Fields should not be modified.

type FileDescriptorSet

type FileDescriptorSet interface {
	BaseFileDescriptorSet

	// Equal calls proto.Equal on the backing FileDescriptorSets.
	Equal(FileDescriptorSet) bool
}

FileDescriptorSet is an interface to wrap FileDescriptorSet implementations.

Fields should not be modified.

func NewFileDescriptorSet

func NewFileDescriptorSet(backing *descriptor.FileDescriptorSet) (FileDescriptorSet, error)

NewFileDescriptorSet returns a new FileDescriptorSet for the golang/protobuf v1 FileDescriptorSet.

Validates that the input fileDescriptorSet is not empty, that the File field is not empty, and every FileDescriptorProto has a non-empty name.

type Marshaler

type Marshaler interface {
	// MarshalWire marshals the backing type to wire format.
	MarshalWire() ([]byte, error)
	// MarshalJSON marshals the backing type to JSON format.
	MarshalJSON() ([]byte, error)
	// MarshalJSONIndent marshals the backing type to JSON format with indents.
	MarshalJSONIndent() ([]byte, error)
	// MarshalText marshals the backing type to text format.
	MarshalText() ([]byte, error)
}

Marshaler says that a Protobuf type can be marshalled.

Jump to

Keyboard shortcuts

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