artifactory

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RepoClassLocal   = RepoClass("local")
	RepoClassRemote  = RepoClass("remote")
	RepoClassVirtual = RepoClass("virtual")
)

RepoClass constants

Variables

This section is empty.

Functions

This section is empty.

Types

type AQLResult

type AQLResult struct {
	Repo       string    `json:"repo,omitempty"`
	Path       string    `json:"path,omitempty"`
	Name       string    `json:"name,omitempty"`
	Type       string    `json:"type,omitempty"`
	Size       int64     `json:"size,omitempty"`
	Created    time.Time `json:"created,omitempty"`
	CreatedBy  string    `json:"created_by,omitempty"`
	Modified   time.Time `json:"modified,omitempty"`
	ModifiedBy string    `json:"modified_by,omitempty"`
	Updated    time.Time `json:"updated,omitempty"`
}

AQLResult holds AQL result response

type AQLSearchResults

type AQLSearchResults struct {
	Results []AQLResult `json:"results,omitempty"`
}

AQLSearchResults holds AQL search results response

type Client

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

Client represents an active artifactory object

func New

func New(opts Options) (*Client, error)

New initializes a new artifactory client

func (*Client) DeleteItem

func (c *Client) DeleteItem(repo string, path string) error

DeleteItem deletes a file or a folder on Artifactory

func (*Client) DockerRepositories

func (c *Client) DockerRepositories(registry string) (dr DockerRepositories, err error)

DockerRepositories returns a list of docker repositories

func (*Client) DockerTagLastDownloaded

func (c *Client) DockerTagLastDownloaded(registry string, repo string, tag string) (time.Time, error)

DockerTagLastDownloaded returns the last downloaded time of a Docker tag manifest

func (*Client) DockerTagLastModified

func (c *Client) DockerTagLastModified(registry string, repo string, tag string) (time.Time, error)

DockerTagLastModified returns the last modified time of a Docker tag manifest

func (*Client) DockerTagRemove

func (c *Client) DockerTagRemove(registry string, repo string, tag string) error

DockerTagRemove removes a Docker tag on Artifactory

func (*Client) DockerTagSize

func (c *Client) DockerTagSize(registry string, repo string, tag string) (int64, error)

DockerTagSize returns the size of a Docker tag

func (*Client) DockerTags

func (c *Client) DockerTags(registry string, repo string) (dt DockerTags, err error)

DockerTags returns tags of a docker repository

func (*Client) FileList

func (c *Client) FileList(repo string, path string) (FileList, error)

FileList gets a flat listing of the files and folders within a folder

func (*Client) FileStats

func (c *Client) FileStats(repo string, path string) (FileStats, error)

FileStats returns the file stats of an artifact

func (*Client) LastDownloaded

func (c *Client) LastDownloaded(repo string, path string) (time.Time, error)

LastDownloaded returns the last downloaded time of an artifact

func (*Client) RepoConfiguration

func (c *Client) RepoConfiguration(repo string) (RepoConfiguration, error)

RepoConfiguration retrieves the current configuration of a repository

func (*Client) SearchAQL

func (c *Client) SearchAQL(query string) (AQLSearchResults, error)

SearchAQL search files using AQL language

func (*Client) SystemVersion

func (c *Client) SystemVersion() (*SystemVersion, error)

SystemVersion retrieves information about the current Artifactory version, revision, and currently installed Add-ons.

type DockerRepositories

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

DockerRepositories holds docker repositories response

type DockerTags

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

DockerTags holds docker tags response

type FileList

type FileList struct {
	URI     string    `json:"uri"`
	Created time.Time `json:"created"`
	Files   []struct {
		URI          string    `json:"uri"`
		Size         int64     `json:"size"`
		LastModified time.Time `json:"lastModified"`
		Folder       bool      `json:"folder"`
		Sha1         string    `json:"sha1"`
		Sha2         string    `json:"sha2"`
	} `json:"files"`
}

FileList holds file list response

type FileStats

type FileStats struct {
	URI                  string `json:"uri"`
	DownloadCount        int64  `json:"downloadCount"`
	LastDownloaded       int64  `json:"lastDownloaded"`
	RemoteDownloadCount  int64  `json:"remoteDownloadCount"`
	RemoteLastDownloaded int64  `json:"remoteLastDownloaded"`
}

FileStats holds file stats response

type LastModified

type LastModified struct {
	URI          string `json:"uri"`
	LastModified string `json:"lastModified"`
}

LastModified holds last modified response

type Options

type Options struct {
	URL     string
	APIKey  string
	Timeout time.Duration
}

Options holds artifactory client object options

type RepoClass

type RepoClass string

RepoClass holds repo classification type

type RepoConfiguration

type RepoConfiguration struct {
	Key         string    `json:"key"`
	Rclass      RepoClass `json:"rclass"`
	PackageType string    `json:"packageType"`
	Description string    `json:"description"`
	Notes       string    `json:"notes"`
}

RepoConfiguration holds repository configuration response

type SystemVersion

type SystemVersion struct {
	Version  string   `json:"version"`
	Revision string   `json:"revision"`
	Addons   []string `json:"addons"`
	License  string   `json:"license"`
}

SystemVersion holds system version response

Jump to

Keyboard shortcuts

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