selfhosted

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: Apache-2.0 Imports: 19 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 ErrorResponse added in v0.10.0

type ErrorResponse struct {
	Errors []ErrorType `json:"errors"`
}

type ErrorType added in v0.10.0

type ErrorType struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type History

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

type ManafestListResponse added in v0.10.0

type ManafestListResponse struct {
	Manifests []ManifestResponse `json:"manifests"`
}

type ManifestResponse

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

type Options

type Options struct {
	Transporter http.RoundTripper

	Host      string
	Username  string
	Password  string
	Bearer    string
	TokenPath string
	CAPath    string
	Insecure  bool
}

type TagResponse

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

type V1Compatibility

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

type V1CompatibilityWrapper added in v0.10.0

type V1CompatibilityWrapper struct {
	V1Compatibility
}

func (V1CompatibilityWrapper) MarshalJSON added in v0.10.0

func (v V1CompatibilityWrapper) MarshalJSON() ([]byte, error)

func (*V1CompatibilityWrapper) UnmarshalJSON added in v0.10.0

func (v *V1CompatibilityWrapper) UnmarshalJSON(b []byte) error

type V2ManifestListEntry added in v0.10.0

type V2ManifestListEntry struct {
	Digest    string       `json:"digest"`
	MediaType string       `json:"mediaType"`
	Platform  api.Platform `json:"platform"`
}

type V2ManifestListResponse added in v0.10.0

type V2ManifestListResponse struct {
	SchemaVersion int                   `json:"schemaVersion"`
	MediaType     string                `json:"mediaType"`
	Manifests     []V2ManifestListEntry `json:"manifests"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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