dockerhub

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: GPL-3.0 Imports: 8 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 interface {
	ListNamespaceRepositories(context.Context, string) ([]Repository, error)
	ListRepositoryTags(ctx context.Context, namespace, repository string) ([]Tag, error)
}

func NewClient

func NewClient(options Options) Client

type Options

type Options struct {
	AuthToken string
}

type PaginatedResponse

type PaginatedResponse[Result any] struct {
	Count    int      `json:"count"`
	Next     string   `json:"next"`
	Previous string   `json:"previous"`
	Results  []Result `json:"results"`
}

type Repository

type Repository struct {
	Name              string         `json:"name"`
	Namespace         string         `json:"namespace"`
	RepositoryType    RepositoryType `json:"repository_type,omitempty"`
	Status            int            `json:"status"`
	StatusDescription string         `json:"status_description"`
	Description       string         `json:"description"`
	IsPrivate         bool           `json:"is_private"`
	StarCount         int            `json:"star_count"`
	PullCount         int            `json:"pull_count"`
	LastUpdated       time.Time      `json:"last_updated"`
	LastModified      time.Time      `json:"last_modified"`
	DateRegistered    time.Time      `json:"date_registered"`
	Affiliation       string         `json:"affiliation"`
	MediaTypes        []string       `json:"media_types"`
	ContentTypes      []string       `json:"content_types"`
	Categories        []string       `json:"categories"`
	StorageSize       int64          `json:"storage_size"`
}

type RepositoryType

type RepositoryType string
const (
	RepositoryTypeImage  RepositoryType = "image"
	RepositoryTypePlugin RepositoryType = "plugin"
)

type Tag

type Tag struct {
	Id     int `json:"id"`
	Images []struct {
		Architecture string `json:"architecture"`
		Features     string `json:"features"`
		Variant      string `json:"variant"`
		Digest       string `json:"digest"`
		Layers       []struct {
			Digest      string `json:"digest"`
			Size        int    `json:"size"`
			Instruction string `json:"instruction"`
		} `json:"layers"`
		Os         string    `json:"os"`
		OsFeatures string    `json:"os_features"`
		OsVersion  string    `json:"os_version"`
		Size       int       `json:"size"`
		Status     string    `json:"status"`
		LastPulled time.Time `json:"last_pulled"`
		LastPushed time.Time `json:"last_pushed"`
	} `json:"images"`
	Creator             int       `json:"creator"`
	LastUpdated         time.Time `json:"last_updated"`
	LastUpdater         int       `json:"last_updater"`
	LastUpdaterUsername string    `json:"last_updater_username"`
	Name                string    `json:"name"`
	Repository          int       `json:"repository"`
	FullSize            int       `json:"full_size"`
	V2                  bool      `json:"v2"`
	Status              string    `json:"status"`
	TagLastPulled       time.Time `json:"tag_last_pulled"`
	TagLastPushed       time.Time `json:"tag_last_pushed"`
}

Jump to

Keyboard shortcuts

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