encoder

package
v1.4.13 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(data []byte, v any) error

func Encode

func Encode(v any) ([]byte, error)

Types

type Collection

type Collection struct {
	Name   string
	UserID uuid.UUID
}

func (*Collection) Decode

func (c *Collection) Decode(data []byte) error

func (*Collection) Encode

func (c *Collection) Encode() ([]byte, error)

type Device

type Device common.Device

func (*Device) Decode

func (t *Device) Decode(data []byte) error

func (*Device) Encode

func (t *Device) Encode() ([]byte, error)

type Encoder

type Encoder interface {
	Encode() ([]byte, error)
	Decode(data []byte) error
}

type Notification

type Notification common.Notification

func (*Notification) Decode

func (t *Notification) Decode(data []byte) error

func (*Notification) Encode

func (t *Notification) Encode() ([]byte, error)

type QR

type QR common.QR

func (*QR) Decode

func (Q *QR) Decode(data []byte) error

func (*QR) Encode

func (Q *QR) Encode() ([]byte, error)

type TagData

type TagData common.TagData

func (*TagData) Decode

func (t *TagData) Decode(data []byte) error

func (*TagData) Encode

func (t *TagData) Encode() ([]byte, error)

type Tea

type Tea common.Tea

func (*Tea) Decode

func (t *Tea) Decode(data []byte) error

func (*Tea) Encode

func (t *Tea) Encode() ([]byte, error)

type TeaData

type TeaData struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	Description string `json:"description"`
}

func FromCommonTeaData

func FromCommonTeaData(td *common.TeaData) *TeaData

func (*TeaData) Decode

func (t *TeaData) Decode(data []byte) error

func (*TeaData) Encode

func (t *TeaData) Encode() ([]byte, error)

func (*TeaData) ToCommonTeaData

func (t *TeaData) ToCommonTeaData() *common.TeaData

type User

type User common.User

func (*User) Decode

func (t *User) Decode(data []byte) error

func (*User) Encode

func (t *User) Encode() ([]byte, error)

Jump to

Keyboard shortcuts

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