protobuf

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthExample        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowExample          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupExample = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type Example_Request

type Example_Request struct {
	Id    int64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name  string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Price float64 `protobuf:"fixed64,3,opt,name=price,proto3" json:"price,omitempty"`
}

This Example struct is equivalent to a go-struct ./examples/protocols/json/Example

func (*Example_Request) Descriptor

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

func (*Example_Request) GetId

func (m *Example_Request) GetId() int64

func (*Example_Request) GetName

func (m *Example_Request) GetName() string

func (*Example_Request) GetPrice

func (m *Example_Request) GetPrice() float64

func (*Example_Request) Marshal

func (m *Example_Request) Marshal() (dAtA []byte, err error)

func (*Example_Request) MarshalTo

func (m *Example_Request) MarshalTo(dAtA []byte) (int, error)

func (*Example_Request) MarshalToSizedBuffer

func (m *Example_Request) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Example_Request) ProtoMessage

func (*Example_Request) ProtoMessage()

func (*Example_Request) Reset

func (m *Example_Request) Reset()

func (*Example_Request) Size

func (m *Example_Request) Size() (n int)

func (*Example_Request) String

func (m *Example_Request) String() string

func (*Example_Request) Unmarshal

func (m *Example_Request) Unmarshal(dAtA []byte) error

func (*Example_Request) XXX_DiscardUnknown

func (m *Example_Request) XXX_DiscardUnknown()

func (*Example_Request) XXX_Marshal

func (m *Example_Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Example_Request) XXX_Merge

func (m *Example_Request) XXX_Merge(src proto.Message)

func (*Example_Request) XXX_Size

func (m *Example_Request) XXX_Size() int

func (*Example_Request) XXX_Unmarshal

func (m *Example_Request) XXX_Unmarshal(b []byte) error

type Example_Response

type Example_Response struct {
	Status bool   `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	Desc   string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
}

func (*Example_Response) Descriptor

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

func (*Example_Response) GetDesc

func (m *Example_Response) GetDesc() string

func (*Example_Response) GetStatus

func (m *Example_Response) GetStatus() bool

func (*Example_Response) Marshal

func (m *Example_Response) Marshal() (dAtA []byte, err error)

func (*Example_Response) MarshalTo

func (m *Example_Response) MarshalTo(dAtA []byte) (int, error)

func (*Example_Response) MarshalToSizedBuffer

func (m *Example_Response) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Example_Response) ProtoMessage

func (*Example_Response) ProtoMessage()

func (*Example_Response) Reset

func (m *Example_Response) Reset()

func (*Example_Response) Size

func (m *Example_Response) Size() (n int)

func (*Example_Response) String

func (m *Example_Response) String() string

func (*Example_Response) Unmarshal

func (m *Example_Response) Unmarshal(dAtA []byte) error

func (*Example_Response) XXX_DiscardUnknown

func (m *Example_Response) XXX_DiscardUnknown()

func (*Example_Response) XXX_Marshal

func (m *Example_Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Example_Response) XXX_Merge

func (m *Example_Response) XXX_Merge(src proto.Message)

func (*Example_Response) XXX_Size

func (m *Example_Response) XXX_Size() int

func (*Example_Response) XXX_Unmarshal

func (m *Example_Response) XXX_Unmarshal(b []byte) error

type Reply

type Reply struct {
	SomeStuff string `protobuf:"bytes,1,opt,name=some_stuff,json=someStuff,proto3" json:"some_stuff,omitempty"`
}

func (*Reply) Descriptor

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

func (*Reply) GetSomeStuff

func (m *Reply) GetSomeStuff() string

func (*Reply) Marshal

func (m *Reply) Marshal() (dAtA []byte, err error)

func (*Reply) MarshalTo

func (m *Reply) MarshalTo(dAtA []byte) (int, error)

func (*Reply) MarshalToSizedBuffer

func (m *Reply) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

func (*Reply) Reset

func (m *Reply) Reset()

func (*Reply) Size

func (m *Reply) Size() (n int)

func (*Reply) String

func (m *Reply) String() string

func (*Reply) Unmarshal

func (m *Reply) Unmarshal(dAtA []byte) error

func (*Reply) XXX_DiscardUnknown

func (m *Reply) XXX_DiscardUnknown()

func (*Reply) XXX_Marshal

func (m *Reply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Reply) XXX_Merge

func (m *Reply) XXX_Merge(src proto.Message)

func (*Reply) XXX_Size

func (m *Reply) XXX_Size() int

func (*Reply) XXX_Unmarshal

func (m *Reply) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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