selfhosted

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthResponse

type AuthResponse struct {
	Token string `json:"token"`
}

type Client

type Client struct {
	*http.Client
	*Options
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, log *logrus.Entry, opts *Options) (*Client, error)

func (*Client) IsHost

func (c *Client) IsHost(host string) bool

func (*Client) Name

func (c *Client) Name() string

Name returns the name of the host URL for the selfhosted client

func (*Client) RepoImageFromPath

func (c *Client) RepoImageFromPath(path string) (string, string)

func (*Client) Tags

func (c *Client) Tags(ctx context.Context, host, repo, image string) ([]api.ImageTag, error)

Tags will fetch the image tags from a given image URL. It must first query the tags that are available, then query the 2.1 and 2.2 API endpoints to gather the image digest and created time.

type History

type History struct {
	V1Compatibility string `json:"v1Compatibility"`
}

type ManifestResponse

type ManifestResponse struct {
	Digest       string
	Architecture api.Architecture `json:"architecture"`
	History      []History        `json:"history"`
}

type Options

type Options struct {
	Host      string
	Username  string
	Password  string
	Bearer    string
	TokenPath string
	Insecure  bool
	CAPath    string
}

type TagResponse

type TagResponse struct {
	Tags []string `json:"tags"`
}

type V1Compatibility

type V1Compatibility struct {
	Created time.Time `json:"created,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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