msgs

package
v1.1.23 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 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:  "RavenQ",
		6:  "RavenA",
		7:  "LoginQ",
		8:  "LoginA",
		9:  "UpdateQ",
		10: "UpdateA",
	}
	MsgID_value = map[string]int32{
		"Unknown": 0,
		"JsonQ":   1,
		"JsonA":   2,
		"ProtoQ":  3,
		"ProtoA":  4,
		"RavenQ":  5,
		"RavenA":  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: "RavenUnmarshal",
		4: "SubmitFailed",
		5: "TokenNotMatch",
	}
	ErrID_value = map[string]int32{
		"Success":        0,
		"JsonUnmarshal":  1,
		"ProtoUnmarshal": 2,
		"RavenUnmarshal": 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
View Source
var File_msgraven_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_RavenUnmarshal ErrID = 3 // Raven反序列化失敗
	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 HRaven added in v1.1.1

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

標頭Raven

func (*HRaven) Descriptor deprecated added in v1.1.1

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

Deprecated: Use HRaven.ProtoReflect.Descriptor instead.

func (*HRaven) GetToken added in v1.1.1

func (x *HRaven) GetToken() string

func (*HRaven) ProtoMessage added in v1.1.1

func (*HRaven) ProtoMessage()

func (*HRaven) ProtoReflect added in v1.1.1

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

func (*HRaven) Reset added in v1.1.1

func (x *HRaven) Reset()

func (*HRaven) String added in v1.1.1

func (x *HRaven) 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 MRavenA added in v1.1.1

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

回應Raven

func (*MRavenA) Descriptor deprecated added in v1.1.1

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

Deprecated: Use MRavenA.ProtoReflect.Descriptor instead.

func (*MRavenA) GetCount added in v1.1.1

func (x *MRavenA) GetCount() int64

func (*MRavenA) ProtoMessage added in v1.1.1

func (*MRavenA) ProtoMessage()

func (*MRavenA) ProtoReflect added in v1.1.1

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

func (*MRavenA) Reset added in v1.1.1

func (x *MRavenA) Reset()

func (*MRavenA) String added in v1.1.1

func (x *MRavenA) String() string

type MRavenQ added in v1.1.1

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

要求Raven

func (*MRavenQ) Descriptor deprecated added in v1.1.1

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

Deprecated: Use MRavenQ.ProtoReflect.Descriptor instead.

func (*MRavenQ) GetTime added in v1.1.1

func (x *MRavenQ) GetTime() int64

func (*MRavenQ) ProtoMessage added in v1.1.1

func (*MRavenQ) ProtoMessage()

func (*MRavenQ) ProtoReflect added in v1.1.1

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

func (*MRavenQ) Reset added in v1.1.1

func (x *MRavenQ) Reset()

func (*MRavenQ) String added in v1.1.1

func (x *MRavenQ) 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_RavenQ  MsgID = 5  // 要求Raven
	MsgID_RavenA  MsgID = 6  // 回應Raven
	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