import "github.com/v2ray/v2ray-core/common/serial"
serial.go string.go typed_message.go typed_message.pb.go
var File_common_serial_typed_message_proto protoreflect.FileDescriptor
Concat concatenates all input into a single string.
GetInstance creates a new instance of the message with messageType.
GetMessageType returns the name of this proto Message.
ReadUint16 reads first two bytes from the reader, and then coverts them to an uint16 value.
ToString serialize an arbitrary value into string.
WriteUint16 writes an uint16 value into writer.
WriteUint64 writes an uint64 value into writer.
type TypedMessage struct { // The name of the message type, retrieved from protobuf API. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Serialized proto message. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
TypedMessage is a serialized proto message along with its type name.
func ToTypedMessage(message proto.Message) *TypedMessage
ToTypedMessage converts a proto Message into TypedMessage.
func (*TypedMessage) Descriptor() ([]byte, []int)
Deprecated: Use TypedMessage.ProtoReflect.Descriptor instead.
func (v *TypedMessage) GetInstance() (proto.Message, error)
GetInstance converts current TypedMessage into a proto Message.
func (x *TypedMessage) GetType() string
func (x *TypedMessage) GetValue() []byte
func (*TypedMessage) ProtoMessage()
func (x *TypedMessage) ProtoReflect() protoreflect.Message
func (x *TypedMessage) Reset()
func (x *TypedMessage) String() string
Package serial imports 10 packages (graph) and is imported by 24 packages. Updated 2020-10-16. Refresh now. Tools for package owners.