protocol

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: 0BSD Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleSuggestRequest

type BundleSuggestRequest struct {
	Request
	Domain string `cbor:"5,keyasint,omitempty"`
	ID     Hash   `cbor:"6,keyasint,omitempty"`
}

type BundleSuggestResponse

type BundleSuggestResponse struct {
	Response
	Present bool   `cbor:"5,keyasint,omitempty"`
	Missing []Hash `cbor:"6,keyasint,omitempty"`
}

type BundleUploadRequest

type BundleUploadRequest struct {
	Request
	Domain string `cbor:"5,keyasint,omitempty"`
	Bundle []byte `cbor:"6,keyasint,omitempty"`
}

type BundleUploadResponse

type BundleUploadResponse struct {
	Response
	ID      Hash   `cbor:"5,keyasint,omitempty"`
	Missing []Hash `cbor:"6,keyasint,omitempty"`
}

type Client added in v0.0.2

type Client struct {
	Url string

	EncMode cbor.EncMode
	// contains filtered or unexported fields
}

func NewClient added in v0.0.2

func NewClient() *Client

func (*Client) Finalize added in v0.0.2

func (c *Client) Finalize(key string, domain string, id Hash) (*FinalizeUploadResponse, error)

func (*Client) SuggestBundle added in v0.0.2

func (c *Client) SuggestBundle(key, domain string, id Hash) (*BundleSuggestResponse, error)

func (*Client) UploadBundle added in v0.0.2

func (c *Client) UploadBundle(key, domain string, bundle []byte) (*BundleUploadResponse, error)

func (*Client) UploadMissing added in v0.0.2

func (c *Client) UploadMissing(key string, domain string, parts [][]byte) (*MissingUploadResponse, error)

type FinalizeUploadRequest

type FinalizeUploadRequest struct {
	Request
	Domain string `cbor:"5,keyasint,omitempty"`
	ID     Hash   `cbor:"6,keyasint,omitempty"`
}

type FinalizeUploadResponse

type FinalizeUploadResponse struct {
	Response
}

type Hash

type Hash [32]byte

type MissingUploadRequest

type MissingUploadRequest struct {
	Request
	Domain string   `cbor:"5,keyasint,omitempty"`
	ID     Hash     `cbor:"6,keyasint,omitempty"`
	Parts  [][]byte `cbor:"7,keyasint,omitempty"`
}

type MissingUploadResponse

type MissingUploadResponse struct {
	Response
}

type Node

type Node struct {
	Children map[string]*Node `cbor:"1,keyasint,omitempty"`
	Hash     *Hash            `cbor:"2,keyasint,omitempty"`
}

type Request

type Request struct {
	Key string `cbor:"1,keyasint"`
}

type Response

type Response struct {
	Success  bool     `cbor:"1,keyasint"`
	Errors   []string `cbor:"2,keyasint,omitempty"`
	Warnings []string `cbor:"3,keyasint,omitempty"`
	Messages []string `cbor:"4,keyasint,omitempty"`
}

Jump to

Keyboard shortcuts

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