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: 0

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