types

package
v0.0.51 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OP_PING              = Op(0)
	OP_PONG              = Op(1)
	OP_PUT               = Op(2)
	OP_PUT_ACK           = Op(3)
	OP_GET               = Op(4)
	OP_GET_ACK           = Op(5)
	OP_GETMYADDRPORT     = Op(6)
	OP_GETMYADDRPORT_ACK = Op(7)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Get

type Get struct {
	PublicKey ed25519.PublicKey
	DatKey    string
}

func (Get) Marshal

func (g Get) Marshal(buf []byte) (int, error)

func (*Get) Unmarshal

func (g *Get) Unmarshal(buf []byte) error

type Msg

type Msg struct {
	Op            Op
	AddrPorts     []netip.AddrPort
	AuthChallenge auth.AuthChallenge
	AuthSolution  *auth.AuthSolution
	Entry         *store.Entry
	Get           *Get
	Status        *Status
}

func (*Msg) Marshal

func (msg *Msg) Marshal(buf []byte) (int, error)

func (*Msg) Unmarshal

func (msg *Msg) Unmarshal(buf []byte) error

type Op

type Op byte

type Status

type Status struct {
	UsedSpace int64
	Capacity  int64
}

func (Status) Marshal

func (s Status) Marshal(buf []byte) (int, error)

func (*Status) Unmarshal

func (s *Status) Unmarshal(buf []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳