msgs

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MsgID_name = map[int32]string{
		0:  "Unknown",
		1:  "JsonQ",
		2:  "JsonA",
		3:  "ProtoQ",
		4:  "ProtoA",
		5:  "ProtoRavenQ",
		6:  "ProtoRavenA",
		7:  "LoginQ",
		8:  "LoginA",
		9:  "UpdateQ",
		10: "UpdateA",
	}
	MsgID_value = map[string]int32{
		"Unknown":     0,
		"JsonQ":       1,
		"JsonA":       2,
		"ProtoQ":      3,
		"ProtoA":      4,
		"ProtoRavenQ": 5,
		"ProtoRavenA": 6,
		"LoginQ":      7,
		"LoginA":      8,
		"UpdateQ":     9,
		"UpdateA":     10,
	}
)

Enum value maps for MsgID.

View Source
var (
	ErrID_name = map[int32]string{
		0: "Success",
		1: "JsonUnmarshal",
		2: "ProtoUnmarshal",
		3: "ProtoRavenUnmarshal",
		4: "SubmitFailed",
		5: "TokenNotMatch",
	}
	ErrID_value = map[string]int32{
		"Success":             0,
		"JsonUnmarshal":       1,
		"ProtoUnmarshal":      2,
		"ProtoRavenUnmarshal": 3,
		"SubmitFailed":        4,
		"TokenNotMatch":       5,
	}
)

Enum value maps for ErrID.

View Source
var File_msgid_proto protoreflect.FileDescriptor
View Source
var File_msgproto_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ErrID

type ErrID int32

錯誤編號

const (
	ErrID_Success             ErrID = 0 // 成功
	ErrID_JsonUnmarshal       ErrID = 1 // Json反序列化失敗
	ErrID_ProtoUnmarshal      ErrID = 2 // Proto反序列化失敗
	ErrID_ProtoRavenUnmarshal ErrID = 3 // ProtoRaven反序列化失敗
	ErrID_SubmitFailed        ErrID = 4 // 資料庫執行失敗
	ErrID_TokenNotMatch       ErrID = 5 // Token不匹配
)

func (ErrID) Descriptor

func (ErrID) Descriptor() protoreflect.EnumDescriptor

func (ErrID) Enum

func (x ErrID) Enum() *ErrID

func (ErrID) EnumDescriptor deprecated

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

Deprecated: Use ErrID.Descriptor instead.

func (ErrID) Number

func (x ErrID) Number() protoreflect.EnumNumber

func (ErrID) String

func (x ErrID) String() string

func (ErrID) Type

func (ErrID) Type() protoreflect.EnumType

type HProtoRaven added in v1.1.0

type HProtoRaven struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // token
	// contains filtered or unexported fields
}

標頭Proto-Raven

func (*HProtoRaven) Descriptor deprecated added in v1.1.0

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

Deprecated: Use HProtoRaven.ProtoReflect.Descriptor instead.

func (*HProtoRaven) GetToken added in v1.1.0

func (x *HProtoRaven) GetToken() string

func (*HProtoRaven) ProtoMessage added in v1.1.0

func (*HProtoRaven) ProtoMessage()

func (*HProtoRaven) ProtoReflect added in v1.1.0

func (x *HProtoRaven) ProtoReflect() protoreflect.Message

func (*HProtoRaven) Reset added in v1.1.0

func (x *HProtoRaven) Reset()

func (*HProtoRaven) String added in v1.1.0

func (x *HProtoRaven) String() string

type MJsonA

type MJsonA struct {
	From  *MJsonQ // 來源訊息
	ErrID int     // 錯誤編號
	Count int64   // 封包計數
}

MJsonA 回應Json

type MJsonQ

type MJsonQ struct {
	Time int64 // 傳送時間
}

MJsonQ 要求Json

type MLoginA

type MLoginA struct {
	From  *MLoginQ // 來源訊息
	ErrID int      // 錯誤編號
	Token string   // 新的token
}

MLoginA 回應登入

type MLoginQ

type MLoginQ struct {
	Account string // 帳號
	Time    int64  // 傳送時間
}

MLoginQ 要求登入

type MProtoA

type MProtoA struct {
	From  *MProtoQ `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`               // 來源訊息
	ErrID ErrID    `protobuf:"varint,2,opt,name=errID,proto3,enum=ErrID" json:"errID,omitempty"` // 錯誤編號
	Count int64    `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`            // 封包計數
	// contains filtered or unexported fields
}

回應Proto

func (*MProtoA) Descriptor deprecated

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

Deprecated: Use MProtoA.ProtoReflect.Descriptor instead.

func (*MProtoA) GetCount

func (x *MProtoA) GetCount() int64

func (*MProtoA) GetErrID

func (x *MProtoA) GetErrID() ErrID

func (*MProtoA) GetFrom

func (x *MProtoA) GetFrom() *MProtoQ

func (*MProtoA) ProtoMessage

func (*MProtoA) ProtoMessage()

func (*MProtoA) ProtoReflect

func (x *MProtoA) ProtoReflect() protoreflect.Message

func (*MProtoA) Reset

func (x *MProtoA) Reset()

func (*MProtoA) String

func (x *MProtoA) String() string

type MProtoQ

type MProtoQ struct {
	Time int64 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"` // 傳送時間
	// contains filtered or unexported fields
}

要求Proto

func (*MProtoQ) Descriptor deprecated

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

Deprecated: Use MProtoQ.ProtoReflect.Descriptor instead.

func (*MProtoQ) GetTime

func (x *MProtoQ) GetTime() int64

func (*MProtoQ) ProtoMessage

func (*MProtoQ) ProtoMessage()

func (*MProtoQ) ProtoReflect

func (x *MProtoQ) ProtoReflect() protoreflect.Message

func (*MProtoQ) Reset

func (x *MProtoQ) Reset()

func (*MProtoQ) String

func (x *MProtoQ) String() string

type MProtoRavenA added in v1.1.0

type MProtoRavenA struct {
	Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` // 封包計數
	// contains filtered or unexported fields
}

回應Proto-Raven

func (*MProtoRavenA) Descriptor deprecated added in v1.1.0

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

Deprecated: Use MProtoRavenA.ProtoReflect.Descriptor instead.

func (*MProtoRavenA) GetCount added in v1.1.0

func (x *MProtoRavenA) GetCount() int64

func (*MProtoRavenA) ProtoMessage added in v1.1.0

func (*MProtoRavenA) ProtoMessage()

func (*MProtoRavenA) ProtoReflect added in v1.1.0

func (x *MProtoRavenA) ProtoReflect() protoreflect.Message

func (*MProtoRavenA) Reset added in v1.1.0

func (x *MProtoRavenA) Reset()

func (*MProtoRavenA) String added in v1.1.0

func (x *MProtoRavenA) String() string

type MProtoRavenQ added in v1.1.0

type MProtoRavenQ struct {
	Time int64 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"` // 傳送時間
	// contains filtered or unexported fields
}

要求Proto-Raven

func (*MProtoRavenQ) Descriptor deprecated added in v1.1.0

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

Deprecated: Use MProtoRavenQ.ProtoReflect.Descriptor instead.

func (*MProtoRavenQ) GetTime added in v1.1.0

func (x *MProtoRavenQ) GetTime() int64

func (*MProtoRavenQ) ProtoMessage added in v1.1.0

func (*MProtoRavenQ) ProtoMessage()

func (*MProtoRavenQ) ProtoReflect added in v1.1.0

func (x *MProtoRavenQ) ProtoReflect() protoreflect.Message

func (*MProtoRavenQ) Reset added in v1.1.0

func (x *MProtoRavenQ) Reset()

func (*MProtoRavenQ) String added in v1.1.0

func (x *MProtoRavenQ) String() string

type MUpdateA

type MUpdateA struct {
	From  *MUpdateQ // 來源訊息
	ErrID int       // 錯誤編號
	Token string    // 新的token
}

MUpdateA 回應更新

type MUpdateQ

type MUpdateQ struct {
	Account string // 帳號
	Token   string // token
	Time    int64  // 傳送時間
}

MUpdateQ 要求更新

type MsgID

type MsgID int32

訊息編號

const (
	MsgID_Unknown     MsgID = 0  // 不明/錯誤訊息編號, 此編號不可使用
	MsgID_JsonQ       MsgID = 1  // 要求Json
	MsgID_JsonA       MsgID = 2  // 回應Json
	MsgID_ProtoQ      MsgID = 3  // 要求Proto
	MsgID_ProtoA      MsgID = 4  // 回應Proto
	MsgID_ProtoRavenQ MsgID = 5  // 要求ProtoRaven
	MsgID_ProtoRavenA MsgID = 6  // 回應ProtoRaven
	MsgID_LoginQ      MsgID = 7  // 要求登入(使用Json處理器)
	MsgID_LoginA      MsgID = 8  // 回應登入(使用Json處理器)
	MsgID_UpdateQ     MsgID = 9  // 要求更新(使用Json處理器)
	MsgID_UpdateA     MsgID = 10 // 回應更新(使用Json處理器)
)

func (MsgID) Descriptor

func (MsgID) Descriptor() protoreflect.EnumDescriptor

func (MsgID) Enum

func (x MsgID) Enum() *MsgID

func (MsgID) EnumDescriptor deprecated

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

Deprecated: Use MsgID.Descriptor instead.

func (MsgID) Number

func (x MsgID) Number() protoreflect.EnumNumber

func (MsgID) String

func (x MsgID) String() string

func (MsgID) Type

func (MsgID) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

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