skynet

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(oc *config.OpenRegistryConfig) *Client

func (*Client) AddImage

func (c *Client) AddImage(ns string, mf, l map[string][]byte) (string, error)

AddImage - arguments: ns = namespace, mf = manifest and l = layers

func (*Client) Download

func (c *Client) Download(path string) (io.ReadCloser, error)

func (*Client) DownloadDir

func (c *Client) DownloadDir(skynetLink, dir string) error

func (*Client) List

func (c *Client) List(path string) ([]*SkynetMeta, error)

func (*Client) Metadata

func (c *Client) Metadata(skylink string) (*skynet.Metadata, error)

func (*Client) Upload

func (c *Client) Upload(namespace, digest string, content []byte, pin bool) (string, error)

type Config

type Config struct {
	Host       string
	GatewayURL string
}

type Image

type Image struct {
	Layers    map[string][]byte
	Manifests map[string][]byte
}

func (Image) Reader

func (i Image) Reader() (io.Reader, error)

type SkynetMeta

type SkynetMeta struct {
	SkyLink string
	Name    string
	Size    uint64
	Type    int
}

Jump to

Keyboard shortcuts

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