msgs

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_protomsg_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type JsonMsg

type JsonMsg struct {
	MessageID int32  `json:"messageID"` // 訊息編號
	Message   []byte `json:"message"`   // 訊息資料
}

JsonMsg json訊息資料

type JsonTest

type JsonTest struct {
	Data string // 測試字串
}

JsonTest json訊息測試用資料

type ProtoMsg

type ProtoMsg struct {
	MessageID int32      `protobuf:"varint,1,opt,name=messageID,proto3" json:"messageID,omitempty"` // 訊息編號, 設置為int32以跟proto的列舉類型統一
	Message   *anypb.Any `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`      // 訊息資料
	// contains filtered or unexported fields
}

Proto訊息資料

func (*ProtoMsg) Descriptor deprecated

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

Deprecated: Use ProtoMsg.ProtoReflect.Descriptor instead.

func (*ProtoMsg) GetMessage

func (x *ProtoMsg) GetMessage() *anypb.Any

func (*ProtoMsg) GetMessageID

func (x *ProtoMsg) GetMessageID() int32

func (*ProtoMsg) ProtoMessage

func (*ProtoMsg) ProtoMessage()

func (*ProtoMsg) ProtoReflect

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

func (*ProtoMsg) Reset

func (x *ProtoMsg) Reset()

func (*ProtoMsg) String

func (x *ProtoMsg) String() string

type ProtoTest

type ProtoTest struct {
	Data string `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"` // 測試字串
	// contains filtered or unexported fields
}

Proto訊息測試資料

func (*ProtoTest) Descriptor deprecated

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

Deprecated: Use ProtoTest.ProtoReflect.Descriptor instead.

func (*ProtoTest) GetData

func (x *ProtoTest) GetData() string

func (*ProtoTest) ProtoMessage

func (*ProtoTest) ProtoMessage()

func (*ProtoTest) ProtoReflect

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

func (*ProtoTest) Reset

func (x *ProtoTest) Reset()

func (*ProtoTest) String

func (x *ProtoTest) String() string

Jump to

Keyboard shortcuts

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