protobuf_mus

package
v0.0.0-...-8b86ccc Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const Protobuf = "protobuf_mus"

Variables

View Source
var Serializers = []serializer.Serializer[serializer.Data]{
	SerializerMUSRawVarint{},
	SerializerMUSRawVarintReuse{/* contains filtered or unexported fields */},
	SerializerMUSRaw{},
	SerializerMUSRawReuse{/* contains filtered or unexported fields */},
	SerializerMUSUnsafe{},
	SerializerMUSUnsafeReuse{/* contains filtered or unexported fields */},
}
View Source
var SerializersNative = []serializer.Serializer[*protobuf.DataRaw]{
	SerializerNativeUnsafeReuse{/* contains filtered or unexported fields */},
}

Functions

func EqualTimestamp

func EqualTimestamp(t1, t2 Timestamp) bool

func EqualTimestampNative

func EqualTimestampNative(t1, t2 *timestamppb.Timestamp) bool

func MarshalTimestamp

func MarshalTimestamp(tm Timestamp, bs []byte) (n int)

func MarshalTimestampNative

func MarshalTimestampNative(tm *timestamppb.Timestamp, bs []byte) (n int)

func SizeTimestamp

func SizeTimestamp(tm Timestamp) (size int)

func SizeTimestampNative

func SizeTimestampNative(tm *timestamppb.Timestamp) (size int)

func UnmarshalTimestampNative

func UnmarshalTimestampNative(bs []byte) (tm *timestamppb.Timestamp, n int,
	err error)

Types

type SerializerMUSRaw

type SerializerMUSRaw struct{}

func (SerializerMUSRaw) Features

func (s SerializerMUSRaw) Features() []serializer.Feature

func (SerializerMUSRaw) Marshal

func (s SerializerMUSRaw) Marshal(data serializer.Data) (bs []byte,
	err error)

func (SerializerMUSRaw) Name

func (SerializerMUSRaw) Unmarshal

func (s SerializerMUSRaw) Unmarshal(bs []byte) (data serializer.Data,
	err error)

type SerializerMUSRawReuse

type SerializerMUSRawReuse struct {
	// contains filtered or unexported fields
}

func (SerializerMUSRawReuse) Features

func (s SerializerMUSRawReuse) Features() []serializer.Feature

func (SerializerMUSRawReuse) Marshal

func (s SerializerMUSRawReuse) Marshal(data serializer.Data) (bs []byte,
	err error)

func (SerializerMUSRawReuse) Name

func (SerializerMUSRawReuse) Unmarshal

func (s SerializerMUSRawReuse) Unmarshal(bs []byte) (data serializer.Data,
	err error)

type SerializerMUSRawVarint

type SerializerMUSRawVarint struct{}

func (SerializerMUSRawVarint) Features

func (s SerializerMUSRawVarint) Features() []serializer.Feature

func (SerializerMUSRawVarint) Marshal

func (s SerializerMUSRawVarint) Marshal(data serializer.Data) (bs []byte,
	err error)

func (SerializerMUSRawVarint) Name

func (SerializerMUSRawVarint) Unmarshal

func (s SerializerMUSRawVarint) Unmarshal(bs []byte) (data serializer.Data,
	err error)

type SerializerMUSRawVarintReuse

type SerializerMUSRawVarintReuse struct {
	// contains filtered or unexported fields
}

func (SerializerMUSRawVarintReuse) Features

func (SerializerMUSRawVarintReuse) Marshal

func (s SerializerMUSRawVarintReuse) Marshal(data serializer.Data) (bs []byte,
	err error)

func (SerializerMUSRawVarintReuse) Name

func (SerializerMUSRawVarintReuse) Unmarshal

func (s SerializerMUSRawVarintReuse) Unmarshal(bs []byte) (data serializer.Data,
	err error)

type SerializerMUSUnsafe

type SerializerMUSUnsafe struct{}

func (SerializerMUSUnsafe) Features

func (s SerializerMUSUnsafe) Features() []serializer.Feature

func (SerializerMUSUnsafe) Marshal

func (s SerializerMUSUnsafe) Marshal(data serializer.Data) (bs []byte,
	err error)

func (SerializerMUSUnsafe) Name

func (SerializerMUSUnsafe) Unmarshal

func (s SerializerMUSUnsafe) Unmarshal(bs []byte) (data serializer.Data,
	err error)

type SerializerMUSUnsafeReuse

type SerializerMUSUnsafeReuse struct {
	// contains filtered or unexported fields
}

func (SerializerMUSUnsafeReuse) Features

func (SerializerMUSUnsafeReuse) Marshal

func (s SerializerMUSUnsafeReuse) Marshal(data serializer.Data) (bs []byte,
	err error)

func (SerializerMUSUnsafeReuse) Name

func (SerializerMUSUnsafeReuse) Unmarshal

func (s SerializerMUSUnsafeReuse) Unmarshal(bs []byte) (data serializer.Data,
	err error)

type SerializerNativeUnsafeReuse

type SerializerNativeUnsafeReuse struct {
	// contains filtered or unexported fields
}

func (SerializerNativeUnsafeReuse) Features

func (SerializerNativeUnsafeReuse) Marshal

func (s SerializerNativeUnsafeReuse) Marshal(data *protobuf.DataRaw) (bs []byte,
	err error)

func (SerializerNativeUnsafeReuse) Name

func (SerializerNativeUnsafeReuse) Unmarshal

func (s SerializerNativeUnsafeReuse) Unmarshal(bs []byte) (
	data *protobuf.DataRaw, err error)

type Timestamp

type Timestamp struct {
	Seconds int64
	Nanos   int32
}

func NewTimestamp

func NewTimestamp(tm time.Time) Timestamp

func UnmarshalTimestamp

func UnmarshalTimestamp(bs []byte) (tm Timestamp, n int,
	err error)

func (Timestamp) ToTime

func (t Timestamp) ToTime() time.Time

Jump to

Keyboard shortcuts

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