pb

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var STATUS_name = map[int32]string{
	0: "SUCCESS",
	1: "UNKNOWN_ERROR",
}
View Source
var STATUS_value = map[string]int32{
	"SUCCESS":       0,
	"UNKNOWN_ERROR": 1,
}

Functions

This section is empty.

Types

type ErrorEx

type ErrorEx struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

id = 3

func (*ErrorEx) Descriptor

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

func (*ErrorEx) ProtoMessage

func (*ErrorEx) ProtoMessage()

func (*ErrorEx) Reset

func (m *ErrorEx) Reset()

func (*ErrorEx) String

func (m *ErrorEx) String() string

func (*ErrorEx) XXX_DiscardUnknown

func (m *ErrorEx) XXX_DiscardUnknown()

func (*ErrorEx) XXX_Marshal

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

func (*ErrorEx) XXX_Merge

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

func (*ErrorEx) XXX_Size

func (m *ErrorEx) XXX_Size() int

func (*ErrorEx) XXX_Unmarshal

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

type Ping

type Ping struct {
	Times                int64    `protobuf:"varint,1,opt,name=Times,proto3" json:"Times,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

id 小于20的为保留协议 业务协议不能占用 id = 1

func (*Ping) Descriptor

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

func (*Ping) GetTimes

func (m *Ping) GetTimes() int64

func (*Ping) ProtoMessage

func (*Ping) ProtoMessage()

func (*Ping) Reset

func (m *Ping) Reset()

func (*Ping) String

func (m *Ping) String() string

func (*Ping) XXX_DiscardUnknown

func (m *Ping) XXX_DiscardUnknown()

func (*Ping) XXX_Marshal

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

func (*Ping) XXX_Merge

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

func (*Ping) XXX_Size

func (m *Ping) XXX_Size() int

func (*Ping) XXX_Unmarshal

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

type Pong

type Pong struct {
	Times                int64    `protobuf:"varint,1,opt,name=Times,proto3" json:"Times,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

id = 2

func (*Pong) Descriptor

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

func (*Pong) GetTimes

func (m *Pong) GetTimes() int64

func (*Pong) ProtoMessage

func (*Pong) ProtoMessage()

func (*Pong) Reset

func (m *Pong) Reset()

func (*Pong) String

func (m *Pong) String() string

func (*Pong) XXX_DiscardUnknown

func (m *Pong) XXX_DiscardUnknown()

func (*Pong) XXX_Marshal

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

func (*Pong) XXX_Merge

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

func (*Pong) XXX_Size

func (m *Pong) XXX_Size() int

func (*Pong) XXX_Unmarshal

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

type STATUS

type STATUS int32

错误码

const (
	//0~99, 通用错误码
	STATUS_SUCCESS       STATUS = 0
	STATUS_UNKNOWN_ERROR STATUS = 1
)

func (STATUS) EnumDescriptor

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

func (STATUS) String

func (x STATUS) String() string

Jump to

Keyboard shortcuts

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