proto

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2018 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Aliases

func Aliases() map[string]string

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 ClearExtension

func ClearExtension(m Message, ext interface{})

func Equal

func Equal(m1, m2 Message) bool

func FileDescriptor

func FileDescriptor(file string) []byte

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 GetBoolExtension

func GetBoolExtension(m Message, extension interface{}, ifnotset bool) bool

func GetExtension

func GetExtension(m Message, ext interface{}) (extval interface{}, err error)

func HasExtension

func HasExtension(m Message, ext interface{}) bool

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 Marshal

func Marshal(m Message) ([]byte, error)

func Merge

func Merge(dst, src Message)

func MessageName

func MessageName(m Message) string

func MessageType

func MessageType(name string) reflect.Type

func RegisteredExtensions

func RegisteredExtensions(m Message, desiredType interface{}) (interface{}, error)

func Reset

func Reset(m Message)

func SetExtension

func SetExtension(m Message, ext interface{}, v interface{}) error

func SetProtoer

func SetProtoer(up UntypedProtoer)

func Size

func Size(m Message) int

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.

func Unmarshal

func Unmarshal(b []byte, m Message) error

Types

type Aliaser

type Aliaser interface {
	Aliases() map[string]string
}

type Message

type Message interface {
	Reset()
	String() string
	ProtoMessage()
}

func Clone

func Clone(m Message) Message

type Protoer

type Protoer interface {
	Marshal(m Message) ([]byte, error)
	Unmarshal(b []byte, m Message) error

	Clone(m Message) Message
	Equal(m1, m2 Message) bool
	Merge(dst, src Message)
	Reset(m Message)
	Size(m Message) int

	HasExtension(m Message, ext interface{}) bool
	ClearExtension(m Message, ext interface{})
	GetExtension(m Message, ext interface{}) (interface{}, error)
	SetExtension(m Message, ext interface{}, v interface{}) error
	RegisteredExtensions(m Message, desiredType interface{}) (interface{}, error)

	FileDescriptor(file string) []byte
	MessageName(m Message) string
	MessageType(name string) reflect.Type
}

func ToProtoer

func ToProtoer(up UntypedProtoer) Protoer

type UntypedProtoer

type UntypedProtoer interface {
	Marshal(m interface{}) ([]byte, error)
	Unmarshal(b []byte, m interface{}) error

	Clone(m interface{}) interface{}
	Equal(m1, m2 interface{}) bool
	Merge(dst, src interface{})
	Reset(m interface{})
	Size(m interface{}) int

	HasExtension(m interface{}, ext interface{}) bool
	ClearExtension(m interface{}, ext interface{})
	GetExtension(m interface{}, ext interface{}) (interface{}, error)
	SetExtension(m interface{}, ext interface{}, v interface{}) error
	RegisteredExtensions(m interface{}, desiredType interface{}) (interface{}, error)

	FileDescriptor(file string) []byte
	MessageName(m interface{}) string
	MessageType(name string) reflect.Type
}

Directories

Path Synopsis
test
Package test is a generated protocol buffer package.
Package test is a generated protocol buffer package.
test/pkg
Package pkg is a generated protocol buffer package.
Package pkg is a generated protocol buffer package.
test
Package test is a generated protocol buffer package.
Package test is a generated protocol buffer package.
test/pkg
Package pkg is a generated protocol buffer package.
Package pkg is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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