artifactory

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const EXPORT_SETTIGNS_MIMETYPE string = "application/vnd.org.jfrog.artifactory.system.ExportSettings+json"
View Source
const GROUP_MIMETYPE string = "application/vnd.org.jfrog.artifactory.security.Group+json"
View Source
const IMPORT_SETTINGS_MIMETYPE string = "application/vnd.org.jfrog.artifactory.system.ImportSettings+json"
View Source
const LOCAL_REPO_MIMETYPE string = "application/vnd.org.jfrog.artifactory.repositories.LocalRepositoryConfiguration+json"
View Source
const PERMISSION_TARGET_MIMETYPE string = "application/vnd.org.jfrog.artifactory.security.PermissionTarget+json"
View Source
const REMOTE_REPO_MIMETYPE string = "application/vnd.org.jfrog.artifactory.repositories.RemoteRepositoryConfiguration+json"
View Source
const SYSTEM_VERSION_MIMETYPE string = "application/vnd.org.jfrog.artifactory.system.Version+json"
View Source
const USER_MIMETYPE string = "application/vnd.org.jfrog.artifactory.security.User+json"
View Source
const VERSION = "4.9.1"
View Source
const VIRTUAL_REPO_MIMETYPE string = "application/vnd.org.jfrog.artifactory.repositories.VirtualRepositoryConfiguration+json"

Variables

This section is empty.

Functions

This section is empty.

Types

type AQLFileInfo

type AQLFileInfo struct {
	Repo         string         `json:"repo,omitempty"`
	Path         string         `json:"path,omitempty"`
	Name         string         `json:"name,omitempty"`
	Type         string         `json:"type,omitempty"`
	Created      string         `json:"created,omitempty"`
	CreatedBy    string         `json:"created_by,omitempty"`
	Modified     string         `json:"modified,omitempty"`
	ModifiedBy   string         `json:"modified_by,omitempty"`
	Depth        int            `json:"depth,omitempty"`
	Size         int64          `json:"size,omitempty"`
	Properties   []AQLPropertes `json:"properties,omitempty"`
	ActualMD5    string         `json:"actual_md5,omitempty"`
	ActualSHA1   string         `json:"actual_sha1,omitempty"`
	OriginalSHA1 string         `json:"original_sha1,omitempty"`
}

type AQLPropertes

type AQLPropertes struct {
	Key   string `json:"key"`
	Value string `json:"value,omitempty"`
}

type AQLResults

type AQLResults struct {
	Results []AQLFileInfo `json:"results"`
	Range   struct {
		StartPos int `json:"start_pos"`
		EndPos   int `json:"end_pos"`
		Total    int `json:"total"`
		Limit    int `json:"limit"`
	} `json:"range"`
}

type Artifact

type Artifact struct {
	Info   FileInfo
	Client *ArtifactoryClient
}

func (*Artifact) Delete

func (c *Artifact) Delete() error

func (*Artifact) Download

func (c *Artifact) Download() ([]byte, error)

type ArtifactChecksums

type ArtifactChecksums struct {
	MD5  string `json:"md5"`
	SHA1 string `json:"sha1"`
}

type ArtifactProperties

type ArtifactProperties map[string][]string

type ArtifactoryClient

type ArtifactoryClient struct {
	Client    *http.Client
	Config    *ClientConfig
	Transport *http.Transport
}

func NewClient

func NewClient(config *ClientConfig) (c ArtifactoryClient)

func NewClientFromEnv

func NewClientFromEnv() (c ArtifactoryClient)

func (*ArtifactoryClient) CreateGroup

func (c *ArtifactoryClient) CreateGroup(gname string, g GroupDetails) error

func (*ArtifactoryClient) CreateUser

func (c *ArtifactoryClient) CreateUser(uname string, u UserDetails) error

func (*ArtifactoryClient) CreateUserApiKey

func (c *ArtifactoryClient) CreateUserApiKey() (s string, err error)

func (*ArtifactoryClient) Delete

func (c *ArtifactoryClient) Delete(path string) error

func (*ArtifactoryClient) DeleteArtifact

func (c *ArtifactoryClient) DeleteArtifact(repo, path string) ([]byte, error)

func (*ArtifactoryClient) DeleteUser

func (c *ArtifactoryClient) DeleteUser(uname string) error

func (*ArtifactoryClient) DeployArtifact

func (c *ArtifactoryClient) DeployArtifact(repoKey string, filename string, path string, properties map[string]string) (CreatedStorageItem, error)

func (*ArtifactoryClient) DockerSearch

func (c *ArtifactoryClient) DockerSearch(name string) (files []FileInfo, e error)

func (*ArtifactoryClient) GAVCSearch

func (c *ArtifactoryClient) GAVCSearch(coords *Gavc) (files []FileInfo, e error)

func (*ArtifactoryClient) Get

func (c *ArtifactoryClient) Get(path string, options map[string]string) ([]byte, error)

func (*ArtifactoryClient) GetFileInfo

func (c *ArtifactoryClient) GetFileInfo(path string) (a Artifact, err error)

func (*ArtifactoryClient) GetGeneralConfiguration

func (c *ArtifactoryClient) GetGeneralConfiguration() (s string, e error)

func (*ArtifactoryClient) GetGroupDetails

func (c *ArtifactoryClient) GetGroupDetails(u string) (GroupDetails, error)

func (*ArtifactoryClient) GetGroups

func (c *ArtifactoryClient) GetGroups() ([]Group, error)

func (*ArtifactoryClient) GetLicenseInformation

func (c *ArtifactoryClient) GetLicenseInformation() (LicenseInformation, error)

func (*ArtifactoryClient) GetPermissionTargetDetails

func (c *ArtifactoryClient) GetPermissionTargetDetails(u string) (PermissionTargetDetails, error)

func (*ArtifactoryClient) GetPermissionTargets

func (c *ArtifactoryClient) GetPermissionTargets() ([]PermissionTarget, error)

func (*ArtifactoryClient) GetRepo

func (client *ArtifactoryClient) GetRepo(key string) (RepoConfig, error)

func (*ArtifactoryClient) GetRepos

func (client *ArtifactoryClient) GetRepos(rtype string) ([]Repo, error)

func (*ArtifactoryClient) GetSystemSecurityConfiguration

func (c *ArtifactoryClient) GetSystemSecurityConfiguration() (s string, e error)

func (*ArtifactoryClient) GetUserApiKey

func (c *ArtifactoryClient) GetUserApiKey() (s string, err error)

func (*ArtifactoryClient) GetUserDetails

func (c *ArtifactoryClient) GetUserDetails(u string) (UserDetails, error)

func (*ArtifactoryClient) GetUserEncryptedPassword

func (c *ArtifactoryClient) GetUserEncryptedPassword() (s string, err error)

func (*ArtifactoryClient) GetUsers

func (c *ArtifactoryClient) GetUsers() ([]User, error)

func (*ArtifactoryClient) HttpRequest

func (c *ArtifactoryClient) HttpRequest(ar ArtifactoryRequest) ([]byte, error)

func (*ArtifactoryClient) ListFiles

func (c *ArtifactoryClient) ListFiles(repo string) (fileList FileList, err error)

func (*ArtifactoryClient) Post

func (c *ArtifactoryClient) Post(path string, data string, options map[string]string) ([]byte, error)

func (*ArtifactoryClient) Put

func (c *ArtifactoryClient) Put(path string, data string, options map[string]string) ([]byte, error)

func (*ArtifactoryClient) RetrieveArtifact

func (c *ArtifactoryClient) RetrieveArtifact(repo string, path string) ([]byte, error)

func (*ArtifactoryClient) VagrantSearch

func (c *ArtifactoryClient) VagrantSearch(name string) (files []AQLFileInfo, e error)

type ArtifactoryRequest

type ArtifactoryRequest struct {
	Verb        string
	Path        string
	ContentType string
	Accept      string
	QueryParams map[string]string
	Body        io.Reader
}

unused for now

type ClientConfig

type ClientConfig struct {
	BaseURL    string
	Username   string
	Password   string
	Token      string
	AuthMethod string
	VerifySSL  bool
	Client     *http.Client
	Transport  *http.Transport
}

type CreatedStorageItem

type CreatedStorageItem struct {
	URI               string            `json:"uri"`
	DownloadURI       string            `json:"downloadUri"`
	Repo              string            `json:"repo"`
	Created           string            `json:"created"`
	CreatedBy         string            `json:"createdBy"`
	Size              string            `json:"size"`
	MimeType          string            `json:"mimeType"`
	Checksums         ArtifactChecksums `json:"checksums"`
	OriginalChecksums ArtifactChecksums `json:"originalChecksums"`
}

type ErrorJson

type ErrorJson struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

type ErrorsJson

type ErrorsJson struct {
	Errors []ErrorJson `json:"errors,omitempty"`
	Error  string      `json:"error,omitempty"`
}

type FileInfo

type FileInfo struct {
	Uri          string             `json:"uri"`
	DownloadUri  string             `json:"downloadUri"`
	Repo         string             `json:"repo"`
	Path         string             `json:"path"`
	RemoteUrl    string             `json:"remoteUrl,omitempty"`
	Created      string             `json:"created"`
	CreatedBy    string             `json:"createdBy"`
	LastModified string             `json:"lastModified"`
	ModifiedBy   string             `json:"modifiedBy"`
	MimeType     string             `json:"mimeType"`
	Size         string             `json:"size"`
	Properties   ArtifactProperties `json:"properties"`
	Checksums    struct {
		SHA1 string `json:"sha1"`
		MD5  string `json:"md5"`
	} `json:"checksums"`
	OriginalChecksums struct {
		SHA1 string `json:"sha1"`
		MD5  string `json:"md5"`
	} `json:"originalChecksums,omitempty"`
}

type FileList

type FileList struct {
	URI     string         `json:"uri"`
	Created string         `json:"created"`
	Files   []FileListItem `json:"files"`
}

type FileListItem

type FileListItem struct {
	URI          string `json:"uri"`
	Size         int    `json:"size"`
	LastModified string `json:"lastModified"`
	Folder       bool   `json:"folder"`
	SHA1         string `json:"sha1"`
}

type Gavc

type Gavc struct {
	GroupID    string
	ArtifactID string
	Version    string
	Classifier string
	Repos      []string
}

type GavcSearchResults

type GavcSearchResults struct {
	Results []FileInfo `json:"results"`
}

type GenericRepoConfig

type GenericRepoConfig struct {
	Key                          string   `json:"key,omitempty"`
	RClass                       string   `json:"rclass"`
	PackageType                  string   `json:"packageType,omitempty"`
	Description                  string   `json:"description,omitempty"`
	Notes                        string   `json:"notes,omitempty"`
	IncludesPattern              string   `json:"includesPattern,omitempty"`
	ExcludesPattern              string   `json:"excludesPattern,omitempty"`
	HandleReleases               bool     `json:"handleReleases,omitempty"`
	HandleSnapshots              bool     `json:"handleSnapshots,omitempty"`
	MaxUniqueSnapshots           int      `json:"maxUniqueSnapshots,omitempty"`
	SuppressPomConsistencyChecks bool     `json:"supressPomConsistencyChecks,omitempty"`
	BlackedOut                   bool     `json:"blackedOut,omitempty"`
	PropertySets                 []string `json:"propertySets,omitempty"`
}

func (GenericRepoConfig) MimeType

func (r GenericRepoConfig) MimeType() string

type Group

type Group struct {
	Name string `json:"name"`
	Uri  string `json:"uri"`
}

type GroupDetails

type GroupDetails struct {
	Name            string `json:"name,omitempty"`
	Description     string `json:"description,omitempty"`
	AutoJoin        bool   `json:"autoJoin,omitempty"`
	Realm           string `json:"realm,omitempty"`
	RealmAttributes string `json:"realmAttributes,omitempty"`
}

type LicenseInformation

type LicenseInformation struct {
	LicenseType  string `json:"type"`
	ValidThrough string `json:"validThrough"`
	LicensedTo   string `json:"licensedTo"`
}

type LocalRepoConfig

type LocalRepoConfig struct {
	GenericRepoConfig

	LayoutRef               string `json:"repoLayoutRef,omitempty"`
	DebianTrivialLayout     bool   `json:"debianTrivialLayout,omitempty"`
	ChecksumPolicyType      string `json:"checksumPolicyType,omitempty"`
	SnapshotVersionBehavior string `json:"snapshotVersionBehavior,omitempty"`
	ArchiveBrowsingEnabled  bool   `json:"archiveBrowsingEnabled,omitempty"`
	CalculateYumMetadata    bool   `json:"calculateYumMetadata,omitempty"`
	YumRootDepth            int    `json:"yumRootDepth,omitempty"`
}

func (LocalRepoConfig) MimeType

func (r LocalRepoConfig) MimeType() string

type PermissionTarget

type PermissionTarget struct {
	Name string `json:"name"`
	Uri  string `json:"uri"`
}

type PermissionTargetDetails

type PermissionTargetDetails struct {
	Name            string     `json:"name,omitempty"`
	IncludesPattern string     `json:"includesPattern,omitempty"`
	ExcludesPattern string     `json:"excludesPattern,omitempty"`
	Repositories    []string   `json:"repositories,omitempty"`
	Principals      Principals `json:"principals,omitempty"`
}

type Principals

type Principals struct {
	Users  map[string][]string `json:"users"`
	Groups map[string][]string `json:"groups"`
}

type RemoteRepoConfig

type RemoteRepoConfig struct {
	GenericRepoConfig

	Url                               string `json:"url"`
	Username                          string `json:"username,omitempty"`
	Password                          string `json:"password,omitempty"`
	Proxy                             string `json:"proxy,omitempty"`
	RemoteRepoChecksumPolicyType      string `json:"remoteRepoChecksumPolicyType,omitempty"`
	HardFail                          bool   `json:"hardFail,omitempty"`
	Offline                           bool   `json:"offline,omitempty"`
	StoreArtifactsLocally             bool   `json:"storeArtifactsLocally,omitempty"`
	SocketTimeoutMillis               int    `json:"socketTimeoutMillis,omitempty"`
	LocalAddress                      string `json:"localAddress,omitempty"`
	RetrivialCachePeriodSecs          int    `json:"retrievalCachePeriodSecs,omitempty"`
	FailedRetrievalCachePeriodSecs    int    `json:"failedRetrievalCachePeriodSecs,omitempty"`
	MissedRetrievalCachePeriodSecs    int    `json:"missedRetrievalCachePeriodSecs,omitempty"`
	UnusedArtifactsCleanupEnabled     bool   `json:"unusedArtifactCleanupEnabled,omitempty"`
	UnusedArtifactsCleanupPeriodHours int    `json:"unusedArtifactCleanupPeriodHours,omitempty"`
	FetchJarsEagerly                  bool   `json:"fetchJarsEagerly,omitempty"`
	ShareConfiguration                bool   `json:"shareConfiguration,omitempty"`
	SynchronizeProperties             bool   `json:"synchronizeProperties,omitempty"`
	AllowAnyHostAuth                  bool   `json:"allowAnyHostAuth,omitempty"`
	EnableCookieManagement            bool   `json:"enableCookieManagement,omitempty"`
	BowerRegistryUrl                  string `json:"bowerRegistryUrl,omitempty"`
	VcsType                           string `json:"vcsType,omitempty"`
	VcsGitProvider                    string `json:"vcsGitProvider,omitempty"`
	VcsGitDownloader                  string `json:"vcsGitDownloader,omitempty"`
}

func (RemoteRepoConfig) MimeType

func (r RemoteRepoConfig) MimeType() string

type Repo

type Repo struct {
	Key         string `json:"key"`
	Rtype       string `json:"type"`
	Description string `json:"description,omitempty"`
	Url         string `json:"url,omitempty"`
}

type RepoConfig

type RepoConfig interface {
	MimeType() string
}

type Uri

type Uri struct {
	Uri string `json:"uri,omitempty"`
}

type User

type User struct {
	Name string `json:"name"`
	Uri  string `json:"uri"`
}

type UserApiKey

type UserApiKey struct {
	ApiKey string `json:"apiKey"`
}

type UserDetails

type UserDetails struct {
	Name                     string   `json:"name,omitempty"`
	Email                    string   `json:"email"`
	Password                 string   `json:"password"`
	Admin                    bool     `json:"admin,omitempty"`
	ProfileUpdatable         bool     `json:"profileUpdatable,omitempty"`
	InternalPasswordDisabled bool     `json:"internalPasswordDisabled,omitempty"`
	LastLoggedIn             string   `json:"lastLoggedIn,omitempty"`
	Realm                    string   `json:"realm,omitempty"`
	Groups                   []string `json:"groups,omitempty"`
}

type VirtualRepoConfig

type VirtualRepoConfig struct {
	GenericRepoConfig

	Repositories                                  []string `json:"repositories"`
	DebianTrivialLayout                           bool     `json:"debianTrivialLayout,omitempty"`
	ArtifactoryRequestsCanRetrieveRemoteArtifacts bool     `json:artifactoryRequestsCanRetrieveRemoteArtifacts,omitempty"`
	KeyPair                                       string   `json:"keyPair,omitempty"`
	PomRepositoryReferenceCleanupPolicy           string   `json:"pomRepositoryReferenceCleanupPolicy,omitempty"`
}

func (VirtualRepoConfig) MimeType

func (r VirtualRepoConfig) MimeType() string

Jump to

Keyboard shortcuts

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