acr

package
v0.0.0-...-d1486fa Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PerPageCount         = 100
	ParallelImageFetch   = 10
	ImageQueueBufferSize = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeableAttributes

type ChangeableAttributes struct {
	DeleteEnabled bool `json:"deleteEnabled"`
	WriteEnabled  bool `json:"writeEnabled"`
	ReadEnabled   bool `json:"readEnabled"`
	ListEnabled   bool `json:"listEnabled"`
}

type ManifestV1Azure

type ManifestV1Azure struct {
	Digest               string               `json:"digest"`
	ImageSize            int                  `json:"imageSize"`
	CreatedTime          time.Time            `json:"createdTime"`
	LastUpdateTime       time.Time            `json:"lastUpdateTime"`
	Architecture         string               `json:"architecture"`
	Os                   string               `json:"os"`
	MediaType            string               `json:"mediaType"`
	ConfigMediaType      string               `json:"configMediaType"`
	Tags                 []string             `json:"tags"`
	ChangeableAttributes ChangeableAttributes `json:"changeableAttributes"`
}

type ManifestsAzureResp

type ManifestsAzureResp struct {
	Registry  string            `json:"registry"`
	ImageName string            `json:"imageName"`
	Manifests []ManifestV1Azure `json:"manifests"`
}

type NonSecret

type NonSecret struct {
	AzureRegistryURL      string `json:"azure_registry_url" validate:"required,url"`
	AzureRegistryUsername string `json:"azure_registry_username" validate:"required,min=1"`
}

type RegistryACR

type RegistryACR struct {
	Name         string    `json:"name" validate:"required,min=2,max=64"`
	NonSecret    NonSecret `json:"non_secret"`
	Secret       Secret    `json:"secret"`
	RegistryType string    `json:"registry_type" validate:"required"`
}

func New

func New(data []byte) (*RegistryACR, error)

func (*RegistryACR) DecryptExtras

func (d *RegistryACR) DecryptExtras(aes encryption.AES) error

func (*RegistryACR) DecryptSecret

func (d *RegistryACR) DecryptSecret(aes encryption.AES) error

func (*RegistryACR) EncryptExtras

func (d *RegistryACR) EncryptExtras(aes encryption.AES) error

func (*RegistryACR) EncryptSecret

func (d *RegistryACR) EncryptSecret(aes encryption.AES) error

func (*RegistryACR) FetchImagesFromRegistry

func (d *RegistryACR) FetchImagesFromRegistry(ctx context.Context) ([]model.IngestedContainerImage, error)

func (*RegistryACR) GetExtras

func (d *RegistryACR) GetExtras() map[string]interface{}

func (*RegistryACR) GetNamespace

func (d *RegistryACR) GetNamespace() string

func (*RegistryACR) GetRegistryType

func (d *RegistryACR) GetRegistryType() string

func (*RegistryACR) GetSecret

func (d *RegistryACR) GetSecret() map[string]interface{}

getters

func (*RegistryACR) GetUsername

func (d *RegistryACR) GetUsername() string

func (*RegistryACR) IsValidCredential

func (d *RegistryACR) IsValidCredential() bool

func (*RegistryACR) ValidateFields

func (d *RegistryACR) ValidateFields(v *validator.Validate) error

type RepoDetails

type RepoDetails struct {
	URL        string
	UserName   string
	Password   string
	NameSpace  string
	Repository string
}

type RepoTagsResp

type RepoTagsResp struct {
	Name string   `json:"name"`
	Tags []string `json:"tags"`
}

type ReposResp

type ReposResp struct {
	Repositories []string `json:"repositories"`
}

type Secret

type Secret struct {
	AzureRegistryPassword string `json:"azure_registry_password" validate:"required,min=1"`
}

Jump to

Keyboard shortcuts

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