dockerhub

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceTypeRepository = "dockerhub.repository"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenRequest

type AccessTokenRequest struct {
	Identifier string `json:"identifier"`
	Secret     string `json:"secret"`
}

type AccessTokenResponse

type AccessTokenResponse struct {
	AccessToken string `json:"access_token"`
}

type Client

type Client struct {
	AccessToken string
	BaseURL     string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(httpClient core.HTTPContext, integration core.IntegrationContext) (*Client, error)

func (*Client) GetRepository

func (c *Client) GetRepository(namespace, repository string) (*Repository, error)

func (*Client) GetRepositoryTag

func (c *Client) GetRepositoryTag(namespace, repository, tag string) (*Tag, error)

func (*Client) ListRepositories

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

func (*Client) ValidateCredentials

func (c *Client) ValidateCredentials(namespace string) error

type Configuration

type Configuration struct {
	Username    string `json:"username"`
	AccessToken string `json:"accessToken"`
}

type DockerHub

type DockerHub struct{}

func (*DockerHub) Actions

func (d *DockerHub) Actions() []core.Action

func (*DockerHub) Cleanup

func (*DockerHub) Components

func (d *DockerHub) Components() []core.Component

func (*DockerHub) Configuration

func (d *DockerHub) Configuration() []configuration.Field

func (*DockerHub) Description

func (d *DockerHub) Description() string

func (*DockerHub) HandleAction

func (d *DockerHub) HandleAction(ctx core.IntegrationActionContext) error

func (*DockerHub) HandleRequest

func (d *DockerHub) HandleRequest(ctx core.HTTPRequestContext)

func (*DockerHub) Icon

func (d *DockerHub) Icon() string

func (*DockerHub) Instructions

func (d *DockerHub) Instructions() string

func (*DockerHub) Label

func (d *DockerHub) Label() string

func (*DockerHub) ListResources

func (d *DockerHub) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)

func (*DockerHub) Name

func (d *DockerHub) Name() string

func (*DockerHub) Sync

func (d *DockerHub) Sync(ctx core.SyncContext) error

func (*DockerHub) Triggers

func (d *DockerHub) Triggers() []core.Trigger

type GetImageTag

type GetImageTag struct{}

func (*GetImageTag) Actions

func (c *GetImageTag) Actions() []core.Action

func (*GetImageTag) Cancel

func (c *GetImageTag) Cancel(ctx core.ExecutionContext) error

func (*GetImageTag) Cleanup

func (c *GetImageTag) Cleanup(ctx core.SetupContext) error

func (*GetImageTag) Color

func (c *GetImageTag) Color() string

func (*GetImageTag) Configuration

func (c *GetImageTag) Configuration() []configuration.Field

func (*GetImageTag) Description

func (c *GetImageTag) Description() string

func (*GetImageTag) Documentation

func (c *GetImageTag) Documentation() string

func (*GetImageTag) ExampleOutput

func (c *GetImageTag) ExampleOutput() map[string]any

func (*GetImageTag) Execute

func (c *GetImageTag) Execute(ctx core.ExecutionContext) error

func (*GetImageTag) HandleAction

func (c *GetImageTag) HandleAction(ctx core.ActionContext) error

func (*GetImageTag) HandleWebhook

func (c *GetImageTag) HandleWebhook(ctx core.WebhookRequestContext) (int, error)

func (*GetImageTag) Icon

func (c *GetImageTag) Icon() string

func (*GetImageTag) Label

func (c *GetImageTag) Label() string

func (*GetImageTag) Name

func (c *GetImageTag) Name() string

func (*GetImageTag) OutputChannels

func (c *GetImageTag) OutputChannels(configuration any) []core.OutputChannel

func (*GetImageTag) ProcessQueueItem

func (c *GetImageTag) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetImageTag) Setup

func (c *GetImageTag) Setup(ctx core.SetupContext) error

type GetImageTagConfiguration

type GetImageTagConfiguration struct {
	Namespace  string `json:"namespace" mapstructure:"namespace"`
	Repository string `json:"repository" mapstructure:"repository"`
	Tag        string `json:"tag" mapstructure:"tag"`
}

type Image

type Image struct {
	Architecture string `json:"architecture"`
	OS           string `json:"os"`
	Digest       string `json:"digest"`
	Size         int64  `json:"size"`
	Status       string `json:"status"`
	LastPulled   string `json:"last_pulled"`
	LastPushed   string `json:"last_pushed"`
}

type ImagePushData

type ImagePushData struct {
	Tag      string `json:"tag"`
	PushedAt int64  `json:"pushed_at"`
	Pusher   string `json:"pusher"`
}

type ImagePushPayload

type ImagePushPayload struct {
	CallbackURL string              `json:"callback_url"`
	PushData    ImagePushData       `json:"push_data"`
	Repository  ImagePushRepository `json:"repository"`
}

type ImagePushRepository

type ImagePushRepository struct {
	RepoName   string `json:"repo_name"`
	Name       string `json:"name"`
	Namespace  string `json:"namespace"`
	RepoURL    string `json:"repo_url"`
	IsPrivate  bool   `json:"is_private"`
	Status     string `json:"status"`
	StarCount  int    `json:"star_count"`
	PullCount  int    `json:"pull_count"`
	Owner      string `json:"owner"`
	Repository string `json:"repository"`
}

type ImageSet

type ImageSet []Image

func (*ImageSet) UnmarshalJSON

func (i *ImageSet) UnmarshalJSON(data []byte) error

type ListRepositoriesResponse

type ListRepositoriesResponse struct {
	Next    string       `json:"next"`
	Results []Repository `json:"results"`
}

type OnImagePush

type OnImagePush struct{}

func (*OnImagePush) Actions

func (p *OnImagePush) Actions() []core.Action

func (*OnImagePush) Cleanup

func (p *OnImagePush) Cleanup(ctx core.TriggerContext) error

func (*OnImagePush) Color

func (p *OnImagePush) Color() string

func (*OnImagePush) Configuration

func (p *OnImagePush) Configuration() []configuration.Field

func (*OnImagePush) Description

func (p *OnImagePush) Description() string

func (*OnImagePush) Documentation

func (p *OnImagePush) Documentation() string

func (*OnImagePush) ExampleData

func (p *OnImagePush) ExampleData() map[string]any

func (*OnImagePush) HandleAction

func (p *OnImagePush) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)

func (*OnImagePush) HandleWebhook

func (p *OnImagePush) HandleWebhook(ctx core.WebhookRequestContext) (int, error)

func (*OnImagePush) Icon

func (p *OnImagePush) Icon() string

func (*OnImagePush) Label

func (p *OnImagePush) Label() string

func (*OnImagePush) Name

func (p *OnImagePush) Name() string

func (*OnImagePush) Setup

func (p *OnImagePush) Setup(ctx core.TriggerContext) error

type OnImagePushConfiguration

type OnImagePushConfiguration struct {
	Repository string                    `json:"repository" mapstructure:"repository"`
	Tags       []configuration.Predicate `json:"tags" mapstructure:"tags"`
}

type OnImagePushMetadata

type OnImagePushMetadata struct {
	Repository *RepositoryMetadata `json:"repository" mapstructure:"repository"`
	WebhookURL string              `json:"webhookUrl" mapstructure:"webhookUrl"`
}

type Repository

type Repository struct {
	Name        string `json:"name" mapstructure:"name"`
	Namespace   string `json:"namespace" mapstructure:"namespace"`
	Description string `json:"description" mapstructure:"description"`
	IsPrivate   bool   `json:"is_private" mapstructure:"is_private"`
	StarCount   int    `json:"star_count" mapstructure:"star_count"`
	PullCount   int    `json:"pull_count" mapstructure:"pull_count"`
	Status      string `json:"status_description" mapstructure:"status_description"`
}

type RepositoryMetadata

type RepositoryMetadata struct {
	Namespace string `json:"namespace" mapstructure:"namespace"`
	Name      string `json:"name" mapstructure:"name"`
}

type Tag

type Tag struct {
	ID                  int64    `json:"id"`
	Name                string   `json:"name"`
	FullSize            int64    `json:"full_size"`
	LastUpdated         string   `json:"last_updated"`
	LastUpdater         int64    `json:"last_updater"`
	LastUpdaterUsername string   `json:"last_updater_username"`
	Status              string   `json:"status"`
	TagLastPulled       string   `json:"tag_last_pulled"`
	TagLastPushed       string   `json:"tag_last_pushed"`
	Repository          int64    `json:"repository"`
	Images              ImageSet `json:"images"`
}

Jump to

Keyboard shortcuts

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