dockerhub

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Affiliation

type Affiliation string

type Client

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

func NewClient

func NewClient(client *http.Client) *Client

func (*Client) ListRepositories

func (c *Client) ListRepositories(hubuser string) ([]*Repository, error)

func (*Client) ListTags

func (c *Client) ListTags(repository string) ([]*Tag, int64, error)

type Image

type Image struct {
	Architecture string      `json:"architecture"`
	Features     string      `json:"features"`
	Variant      interface{} `json:"variant"`
	Digest       string      `json:"digest"`
	OS           OS          `json:"os"`
	OSFeatures   string      `json:"os_features"`
	OSVersion    interface{} `json:"os_version"`
	Size         int64       `json:"size"`
	Status       Status      `json:"status"`
	LastPulled   string      `json:"last_pulled"`
	LastPushed   *time.Time  `json:"last_pushed"`
}

type LastUpdaterUsername

type LastUpdaterUsername string

type OS

type OS string

type Repositories

type Repositories struct {
	Count    int64         `json:"count"`
	Next     string        `json:"next"`
	Previous interface{}   `json:"previous"`
	Results  []*Repository `json:"results"`
}

func UnmarshalRepositories

func UnmarshalRepositories(data []byte) (*Repositories, error)

func (*Repositories) Marshal

func (r *Repositories) Marshal() ([]byte, error)

type Repository

type Repository struct {
	User              string         `json:"user"`
	Name              string         `json:"name"`
	Namespace         string         `json:"namespace"`
	RepositoryType    RepositoryType `json:"repository_type"`
	Status            int64          `json:"status"`
	Description       string         `json:"description"`
	IsPrivate         bool           `json:"is_private"`
	IsAutomated       bool           `json:"is_automated"`
	CanEdit           bool           `json:"can_edit"`
	StarCount         int64          `json:"star_count"`
	PullCount         int64          `json:"pull_count"`
	LastUpdated       *time.Time     `json:"last_updated"`
	IsMigrated        bool           `json:"is_migrated"`
	CollaboratorCount int64          `json:"collaborator_count"`
	Affiliation       Affiliation    `json:"affiliation"`
	HubUser           string         `json:"hub_user"`
}

type RepositoryType

type RepositoryType string

type Status

type Status string

type Tag

type Tag struct {
	Creator             int64               `json:"creator"`
	ID                  int64               `json:"id"`
	ImageID             interface{}         `json:"image_id"`
	Images              []Image             `json:"images"`
	LastUpdated         time.Time           `json:"last_updated"`
	LastUpdater         int64               `json:"last_updater"`
	LastUpdaterUsername LastUpdaterUsername `json:"last_updater_username"`
	Name                string              `json:"name"`
	Repository          int64               `json:"repository"`
	FullSize            int64               `json:"full_size"`
	V2                  bool                `json:"v2"`
	TagStatus           Status              `json:"tag_status"`
	TagLastPulled       string              `json:"tag_last_pulled"`
	TagLastPushed       string              `json:"tag_last_pushed"`
}

type Tags

type Tags struct {
	Count    int64       `json:"count"`
	Next     interface{} `json:"next"`
	Previous interface{} `json:"previous"`
	Results  []*Tag      `json:"results"`
}

func UnmarshalTags

func UnmarshalTags(data []byte) (Tags, error)

func (*Tags) Marshal

func (r *Tags) Marshal() ([]byte, error)

Jump to

Keyboard shortcuts

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