Documentation ¶
Index ¶
- type Client
- func (c *Client) CreateOrUpdate(ctx context.Context, account string, name string) error
- func (c *Client) Delete(ctx context.Context, account, name string) error
- func (c *Client) Get(ctx context.Context, account, name string) (*RepositoryResponse, error)
- func (c *Client) List(ctx context.Context, account string, opts ...common.ListOption) (*RepositoryListResponse, error)
- type Package
- type PackageStatusType
- type Repository
- type RepositoryListResponse
- type RepositoryResponse
- type RepositoryType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
*up.Config
}
Client is a repositories client.
func NewClient ¶
func NewClient(cfg *up.Config) *Client
NewClient build a repositories client from the passed config.
func (*Client) CreateOrUpdate ¶
CreateOrUpdate a repository on Upbound.
func (*Client) List ¶
func (c *Client) List(ctx context.Context, account string, opts ...common.ListOption) (*RepositoryListResponse, error)
List all repositories in the given account on Upbound.
type Package ¶
type Package struct { PackageID uint `json:"packageId"` RepositoryID uint `json:"repositoryId"` Version string `json:"version"` Status PackageStatusType `json:"status"` Digest string `json:"digest"` Reason *string `json:"reason,omitempty"` CreatedAt time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt,omitempty"` }
Package describes a package in a repository.
type PackageStatusType ¶
type PackageStatusType string
PackageStatusType indicates the status of a package.
const ( // PackageStatusReceived indicates a package was received and no further // action has been taken. PackageStatusReceived PackageStatusType = "received" // PackageStatusAnalyzing indicates a package is in the process of being // validated. PackageStatusAnalyzing PackageStatusType = "analyzing" // PackageStatusRejected indicates the package failed validation. PackageStatusRejected PackageStatusType = "rejected" // PackageStatusAccepted indicates the package has been validated. PackageStatusAccepted PackageStatusType = "accepted" // PackageStatusPublished indicates the package has been validated and is // now published in Upbound Marketplace. PackageStatusPublished PackageStatusType = "published" )
type Repository ¶
type Repository struct { RepositoryID uint `json:"repositoryId"` AccountID uint `json:"accountId"` Name string `json:"name"` Type *RepositoryType `json:"type,omitempty"` Public bool `json:"public"` Official bool `json:"official"` CurrentVersion *string `json:"currentVersion,omitempty"` CreatedAt time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt,omitempty"` }
Repository describes a repository.
type RepositoryListResponse ¶
type RepositoryListResponse struct { Repositories []Repository `json:"repositories"` Size int `json:"size"` Page int `json:"page"` Count int `json:"count"` }
RepositoryListResponse is the HTTP body returned when listing repositories.
type RepositoryResponse ¶
type RepositoryResponse struct { Repository Versions []Package `json:"versions"` }
RepositoryResponse is the HTTP body returned when fetching a repository.
type RepositoryType ¶
type RepositoryType string
RepositoryType is the base type for repository types
const ( // RepositoryTypeProvider indicates that the repository contains a provider. RepositoryTypeProvider RepositoryType = "provider" // RepositoryTypeConfiguration indicates that the repository contains a // configuration. RepositoryTypeConfiguration RepositoryType = "configuration" )
Click to show internal directories.
Click to hide internal directories.