Documentation ¶
Overview ¶
Package serial is a generated protocol buffer package.
It is generated from these files:
v2ray.com/core/common/serial/typed_message.proto
It has these top-level messages:
TypedMessage
Index ¶
- func ByteToHexString(value byte) string
- func BytesToHexString(value []byte) string
- func BytesToInt64(value []byte) int64
- func BytesToUint16(value []byte) uint16
- func BytesToUint32(value []byte) uint32
- func Concat(v ...interface{}) string
- func GetInstance(messageType string) (interface{}, error)
- func GetMessageType(message proto.Message) string
- func Int64ToBytes(value int64, b []byte) []byte
- func Int64ToString(value int64) string
- func IntToBytes(value int, b []byte) []byte
- func IntToString(value int) string
- func ToString(v interface{}) string
- func Uint16ToBytes(value uint16, b []byte) []byte
- func Uint16ToString(value uint16) string
- func Uint32ToBytes(value uint32, b []byte) []byte
- func Uint32ToString(value uint32) string
- func WriteHash(h hash.Hash) func([]byte) (int, error)
- func WriteString(s string) func([]byte) (int, error)
- func WriteUint16(value uint16) func([]byte) (int, error)
- func WriteUint32(value uint32) func([]byte) (int, error)
- type TypedMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteToHexString ¶ added in v1.17.2
func BytesToHexString ¶ added in v1.17.2
func BytesToInt64 ¶ added in v1.17.2
func BytesToUint16 ¶ added in v1.17.2
func BytesToUint32 ¶ added in v1.17.2
func GetInstance ¶
func GetMessageType ¶
func Int64ToBytes ¶ added in v1.17.2
func Int64ToString ¶ added in v1.17.2
func IntToBytes ¶ added in v1.17.2
func IntToString ¶ added in v1.17.2
func Uint16ToBytes ¶ added in v1.17.2
func Uint16ToString ¶ added in v1.17.2
func Uint32ToBytes ¶ added in v1.17.2
func Uint32ToString ¶ added in v1.18.1
Types ¶
type TypedMessage ¶
type TypedMessage struct { // The name of the message type, retrieved from protobuf API. Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` // Serialized proto message. Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` }
Serialized proto message along with its type name.
func ToTypedMessage ¶
func ToTypedMessage(message proto.Message) *TypedMessage
func (*TypedMessage) Descriptor ¶
func (*TypedMessage) Descriptor() ([]byte, []int)
func (*TypedMessage) GetInstance ¶
func (v *TypedMessage) GetInstance() (interface{}, error)
func (*TypedMessage) GetType ¶
func (m *TypedMessage) GetType() string
func (*TypedMessage) GetValue ¶
func (m *TypedMessage) GetValue() []byte
func (*TypedMessage) ProtoMessage ¶
func (*TypedMessage) ProtoMessage()
func (*TypedMessage) Reset ¶
func (m *TypedMessage) Reset()
func (*TypedMessage) String ¶
func (m *TypedMessage) String() string
Click to show internal directories.
Click to hide internal directories.