jfrog

package
v0.0.0-...-dd46dfa Latest Latest
Warning

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

Go to latest
Published: Dec 20, 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 ContainerConfig

type ContainerConfig struct {
	Hostname     string                 `json:"Hostname"`
	Domainname   string                 `json:"Domainname"`
	User         string                 `json:"User"`
	AttachStdin  bool                   `json:"AttachStdin"`
	AttachStdout bool                   `json:"AttachStdout"`
	AttachStderr bool                   `json:"AttachStderr"`
	ExposedPorts map[string]interface{} `json:"ExposedPorts"`
	Tty          bool                   `json:"Tty"`
	OpenStdin    bool                   `json:"OpenStdin"`
	StdinOnce    bool                   `json:"StdinOnce"`
	Env          []string               `json:"Env"`
	Cmd          []string               `json:"Cmd"`
	Image        string                 `json:"Image"`
	Volumes      interface{}            `json:"Volumes"`
	WorkingDir   string                 `json:"WorkingDir"`
	Entrypoint   []string               `json:"Entrypoint"`
	OnBuild      interface{}            `json:"OnBuild"`
	Labels       Labels                 `json:"Labels"`
	StopSignal   string                 `json:"StopSignal"`
}

type FsLayers

type FsLayers struct {
	BlobSum string `json:"blobSum"`
}
type Header struct {
	Jwk Jwk    `json:"jwk"`
	Alg string `json:"alg"`
}

type History

type History struct {
	V1Compatibility string `json:"v1Compatibility"`
}

type HistoryV1Compatibility

type HistoryV1Compatibility struct {
	Architecture    string          `json:"architecture"`
	Config          ContainerConfig `json:"config"`
	Container       string          `json:"container"`
	ContainerConfig ContainerConfig `json:"container_config"`
	Created         time.Time       `json:"created"`
	DockerVersion   string          `json:"docker_version"`
	ID              string          `json:"id"`
	Os              string          `json:"os"`
	Parent          string          `json:"parent"`
	Throwaway       bool            `json:"throwaway"`
}

type Jwk

type Jwk struct {
	Crv string `json:"crv"`
	Kid string `json:"kid"`
	Kty string `json:"kty"`
	X   string `json:"x"`
	Y   string `json:"y"`
}

type Labels

type Labels struct {
	Maintainer string `json:"maintainer"`
}

type Manifest

type Manifest struct {
	SchemaVersion int          `json:"schemaVersion"`
	Name          string       `json:"name"`
	Tag           string       `json:"tag"`
	Architecture  string       `json:"architecture"`
	FsLayers      []FsLayers   `json:"fsLayers"`
	History       []History    `json:"history"`
	Signatures    []Signatures `json:"signatures"`
}

type NonSecret

type NonSecret struct {
	JfrogRegistryURL string `json:"jfrog_registry_url" validate:"required,url"`
	JfrogRepository  string `json:"jfrog_repository" validate:"required,min=2"`
	JfrogUsername    string `json:"jfrog_username" validate:"omitempty,min=2"`
}

type RegistryJfrog

type RegistryJfrog 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(requestByte []byte) (*RegistryJfrog, error)

func (*RegistryJfrog) DecryptExtras

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

func (*RegistryJfrog) DecryptSecret

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

func (*RegistryJfrog) EncryptExtras

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

func (*RegistryJfrog) EncryptSecret

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

func (*RegistryJfrog) FetchImagesFromRegistry

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

func (*RegistryJfrog) GetExtras

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

func (*RegistryJfrog) GetNamespace

func (d *RegistryJfrog) GetNamespace() string

func (*RegistryJfrog) GetRegistryType

func (d *RegistryJfrog) GetRegistryType() string

func (*RegistryJfrog) GetSecret

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

getters

func (*RegistryJfrog) GetUsername

func (d *RegistryJfrog) GetUsername() string

func (*RegistryJfrog) IsValidCredential

func (d *RegistryJfrog) IsValidCredential() bool

func (*RegistryJfrog) ValidateFields

func (d *RegistryJfrog) 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 {
	JfrogPassword string `json:"jfrog_password" validate:"omitempty,min=2"`
}

type Signatures

type Signatures struct {
	Header    Header `json:"header"`
	Signature string `json:"signature"`
	Protected string `json:"protected"`
}

type TagInfo

type TagInfo struct {
	Created      string `json:"created"`
	LastModified string `json:"lastModified"`
	LastUpdated  string `json:"lastUpdated"`
}

Jump to

Keyboard shortcuts

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