proton

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 16 Imported by: 37

README

proton

Serialization library for go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(filePath string, msgs ...any) error

Generate generates proton methods for provided types and stores them in a file

Types

type Marshalable added in v0.3.0

type Marshalable interface {
	Marshal(buf []byte) uint64
}

Marshalable is the interface for marshalable messages.

type Marshaler added in v0.4.0

type Marshaler interface {
	Marshal(msg Marshalable, buf []byte) (uint64, uint64, error)
	Unmarshal(id uint64, buf []byte) (any, uint64, error)
}

Marshaler is the interface implemented by marshalers.

type Message added in v0.4.0

type Message interface {
	Marshalable

	Size() uint64
	Unmarshal(b []byte) uint64
}

Message is the interface implemented by messages.

Jump to

Keyboard shortcuts

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