schema

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: MulanPSL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCodeOK = uint32(0)

	ErrCodeFail = uint32(1)
)
View Source
const (
	ProtoIDHeartbeatReq = uint32(1)
	ProtoIDHeartbeatRsp = uint32(2)
)
View Source
const (
	ProtoIDMin = 0 //Invalid ID
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Echo

type Echo struct {
	Echo string `json:"echo,omitempty"`
}

type HeaderReq

type HeaderReq struct {
	Ts  int64 `json:"ts,omitempty" protobuf:"1"` //timestamp millisecond
	Seq int32 `json:"seq,omitempty" protobuf:"2"`
}

request header

type HeaderRsp

type HeaderRsp struct {
	Ts         int64   `json:"ts,omitempty" protobuf:"1"` //timestamp millisecond
	Seq        int32   `json:"seq,omitempty" protobuf:"2"`
	ErrCode    uint32  `json:"err_code,omitempty" protobuf:"11"`
	ErrMessage string  `json:"err_message,omitempty" protobuf:"12"` //maybe more detail than ErrCode
	B1         bool    `json:"b_1,omitempty" protobuf:"21"`
	F1         float64 `json:"f_1,omitempty" protobuf:"22"`
	St         *SubST  `json:"st,omitempty" protobuf:"23"`

	//Multi doc string
	//IDArr
	ArrI  []int32           `json:"arr_i,omitempty" protobuf:"24"`
	ArrT  []*SubST          `json:"arr_t,omitempty" protobuf:"25"`
	MapSS map[string]string `json:"map_ss,omitempty" protobuf:"26"`
	Text  []byte            `json:"text,omitempty" protobuf:"27"`
}

response header

type HeartbeatReq

type HeartbeatReq struct {
	Header *HeaderReq `json:"header" protobuf:"1,notNull"`
	Echo   string     `json:"echo,omitempty" protobuf:"11"`
}

type HeartbeatRsp

type HeartbeatRsp struct {
	Header *HeaderRsp `json:"header" protobuf:"1,notNull"`
	Echo   string     `json:"echo,omitempty" protobuf:"11"`
}

type SubAReq

type SubAReq struct {
	Header *HeaderReq `json:"header" protobuf:"1,notNull"`
}

pgIgnore

type SubARsp

type SubARsp struct {
	Header *HeaderRsp `json:"header" protobuf:"1,notNull"`
}

hello~~ pgIgnore ~~world

type SubBReq

type SubBReq struct {
	List []string `json:"list,omitempty"`
}

type SubBRsp

type SubBRsp struct {
	Modified []string `json:"modified,omitempty"`
}

type SubST

type SubST struct {
	Sub string `json:"sub,omitempty" protobuf:"1"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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