protocol

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: 0BSD Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleDownloadRequest added in v0.3.2

type BundleDownloadRequest struct {
	Request
	ID string `cbor:"6,keyasint,omitempty"`
}

type BundleDownloadResponse added in v0.3.2

type BundleDownloadResponse struct {
	Response
	Bundle []byte `cbor:"5,keyasint,omitempty"`
}

type BundleSuggestRequest

type BundleSuggestRequest struct {
	Request
	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
	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) DownloadBundle added in v0.3.2

func (c *Client) DownloadBundle(key, domain, id string) (*BundleDownloadResponse, error)

func (*Client) DownloadParts added in v0.3.2

func (c *Client) DownloadParts(key, domain string, hashes []Hash) (*PartsDownloadResponse, error)

func (*Client) Finalize added in v0.0.2

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

func (*Client) ListTeams added in v0.3.6

func (c *Client) ListTeams(key string) (*ListTeamsResponse, 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, i, count int, parts [][]byte) (*MissingUploadResponse, error)

type FinalizeUploadRequest

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

type FinalizeUploadResponse

type FinalizeUploadResponse struct {
	Response
}

type Hash

type Hash [32]byte

type ListTeamsRequest added in v0.3.6

type ListTeamsRequest struct {
	Request
}

type ListTeamsResponse added in v0.3.6

type ListTeamsResponse struct {
	Response
	Teams         []Team `cbor:"5,keyasint,omitempty"`
	ManagementURL string `cbor:"6,keyasint,omitempty"`
}

type MissingUploadRequest

type MissingUploadRequest struct {
	Request
	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 PartsDownloadRequest added in v0.3.2

type PartsDownloadRequest struct {
	Request
	Hashes []Hash `cbor:"6,keyasint,omitempty"`
}

type PartsDownloadResponse added in v0.3.2

type PartsDownloadResponse struct {
	Response
	Parts [][]byte `cbor:"5,keyasint,omitempty"`
}

type Request

type Request struct {
	Key    string `cbor:"1,keyasint"`
	Team   string `cbor:"2,keyasint,omitempty"`
	Domain string `cbor:"5,keyasint,omitempty"`
}

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"`
}

type Team added in v0.3.6

type Team struct {
	ID   string `cbor:"1,keyasint,omitempty"`
	Name string `cbor:"2,keyasint,omitempty"`
}

Jump to

Keyboard shortcuts

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