Documentation ¶
Index ¶
- Constants
- type APIError
- type APIErrors
- type AccessFederationValid
- type ApiResponse
- type BuildInfo
- type Certificate
- type Certificates
- type Client
- func (c *Client) FetchAccessFederationValidStatus() (AccessFederationValid, error)
- func (c *Client) FetchBuildInfo() (BuildInfo, error)
- func (c *Client) FetchCertificates() (Certificates, error)
- func (c *Client) FetchGroups() (Groups, error)
- func (c *Client) FetchHTTP(path string) (*ApiResponse, error)
- func (c *Client) FetchHealth() (HealthStatus, error)
- func (c *Client) FetchLicense() (LicenseInfo, error)
- func (c *Client) FetchLicenses() (LicensesInfo, error)
- func (c *Client) FetchMirrorLags() (MirrorLags, error)
- func (c *Client) FetchOpenMetrics() (OpenMetrics, error)
- func (c *Client) FetchReplications() (Replications, error)
- func (c *Client) FetchStorageInfo() (StorageInfo, error)
- func (c *Client) FetchUnavailableMirrors() (UnavailableMirrors, error)
- func (c *Client) FetchUsers() (Users, error)
- func (c *Client) GetAccessFederationTarget() string
- func (c *Client) IsFederationEnabled() bool
- func (c *Client) PostHTTP(path string, body []byte, headers *map[string]string) (*ApiResponse, error)
- func (c *Client) QueryAQL(query []byte) (*ApiResponse, error)
- type Group
- type Groups
- type HealthStatus
- type LicenseInfo
- type LicensesInfo
- type MirrorLag
- type MirrorLags
- type OpenMetrics
- type Replication
- type ReplicationStatus
- type Replications
- type StorageInfo
- type UnavailableMirror
- type UnavailableMirrors
- type UnmarshalError
- type User
- type Users
Constants ¶
const USAFullDate = "Jan 2, 2006"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct {
// contains filtered or unexported fields
}
APIError is a custom Error type for API error
type APIErrors ¶
type APIErrors struct {
Errors interface{}
}
APIErrors represents Artifactory API Error response
type AccessFederationValid ¶ added in v1.15.0
type ApiResponse ¶ added in v1.9.5
type BuildInfo ¶
type BuildInfo struct { Version string `json:"version"` Revision string `json:"revision"` Addons []string `json:"addons"` License string `json:"license"` NodeId string }
BuildInfo represents API respond from version endpoint
type Certificate ¶ added in v1.14.0
type Certificate struct { CertificateAlias string `json:"certificateAlias"` IssuedTo string `json:"issuedTo"` IssuedBy string `json:"issuedBy"` IssuedOn string `json:"issuedOn"` ValidUntil string `json:"validUntil"` Fingerprint string `json:"fingerprint"` }
Certificate represents a single element of an API response from the certificates endpoint
type Certificates ¶ added in v1.14.0
type Certificates struct { Certificates []Certificate NodeId string }
type Client ¶
type Client struct { URI string // contains filtered or unexported fields }
Client represents Artifactory HTTP Client
func (*Client) FetchAccessFederationValidStatus ¶ added in v1.15.0
func (c *Client) FetchAccessFederationValidStatus() (AccessFederationValid, error)
FetchAccessFederationValidStatus checks one of the federation endpoints to see if federation is enabled
func (*Client) FetchBuildInfo ¶
FetchBuildInfo makes the API call to version endpoint and returns BuildInfo
func (*Client) FetchCertificates ¶ added in v1.14.0
func (c *Client) FetchCertificates() (Certificates, error)
FetchCertificates makes the API call to the certificates endpoint and returns []Certificates
func (*Client) FetchGroups ¶
FetchGroups makes the API call to groups endpoint and returns []Group
func (*Client) FetchHTTP ¶
func (c *Client) FetchHTTP(path string) (*ApiResponse, error)
FetchHTTP is a wrapper function for making all Get API calls
func (*Client) FetchHealth ¶
func (c *Client) FetchHealth() (HealthStatus, error)
FetchHealth returns true if the ping endpoint returns "OK"
func (*Client) FetchLicense ¶
func (c *Client) FetchLicense() (LicenseInfo, error)
FetchLicense makes the API call to license endpoint and returns LicenseInfo
func (*Client) FetchLicenses ¶ added in v1.15.0
func (c *Client) FetchLicenses() (LicensesInfo, error)
FetchLicenses makes the API call to licenses endpoint and returns LicensesInfo
func (*Client) FetchMirrorLags ¶ added in v1.12.0
func (c *Client) FetchMirrorLags() (MirrorLags, error)
FetchMirrorLags makes the API call to federation/status/mirrorsLag endpoint and returns []MirrorLag
func (*Client) FetchOpenMetrics ¶ added in v1.14.0
func (c *Client) FetchOpenMetrics() (OpenMetrics, error)
FetchOpenMetrics makes the API call to open metrics endpoint and returns all the open metrics
func (*Client) FetchReplications ¶
func (c *Client) FetchReplications() (Replications, error)
FetchReplications makes the API call to replication endpoint and returns []Replication
func (*Client) FetchStorageInfo ¶
func (c *Client) FetchStorageInfo() (StorageInfo, error)
FetchStorageInfo makes the API call to storageinfo endpoint and returns StorageInfo
func (*Client) FetchUnavailableMirrors ¶ added in v1.12.0
func (c *Client) FetchUnavailableMirrors() (UnavailableMirrors, error)
FetchUnavailableMirrors makes the API call to federation/status/unavailableMirrors endpoint and returns []UnavailableMirror
func (*Client) FetchUsers ¶
FetchUsers makes the API call to users endpoint and returns []User
func (*Client) GetAccessFederationTarget ¶ added in v1.15.0
func (*Client) IsFederationEnabled ¶ added in v1.12.0
IsFederationEnabled checks one of the federation endpoints to see if federation is enabled
type HealthStatus ¶ added in v1.9.5
type LicenseInfo ¶
type LicenseInfo struct { Type string `json:"type"` ValidThrough string `json:"validThrough"` LicensedTo string `json:"licensedTo"` NodeId string }
LicenseInfo represents API response from license endpoint
func (LicenseInfo) IsOSS ¶ added in v1.15.0
func (l LicenseInfo) IsOSS() bool
func (LicenseInfo) TypeNormalized ¶ added in v1.15.0
func (l LicenseInfo) TypeNormalized() string
func (LicenseInfo) ValidSeconds ¶ added in v1.15.0
func (l LicenseInfo) ValidSeconds() (int64, error)
type LicensesInfo ¶ added in v1.15.0
type LicensesInfo struct { Licenses []struct { LicenseInfo NodeId string `json:"nodeId"` NodeUrl string `json:"nodeUrl"` LicenseHash string `json:"licenseHash"` Expired bool `json:"expired"` } `json:"licenses"` }
LicensesInfo represents API response from licenses endpoint
type MirrorLag ¶ added in v1.12.0
type MirrorLag struct { LocalRepoKey string `json:"localRepoKey"` RemoteUrl string `json:"remoteUrl"` RemoteRepoKey string `json:"remoteRepoKey"` LagInMS int `json:"lagInMS"` }
MirrorLag represents single element of API respond from federation/status/mirrorsLag endpoint
type MirrorLags ¶ added in v1.12.0
type OpenMetrics ¶ added in v1.14.0
type Replication ¶
type Replication struct { ReplicationType string `json:"replicationType"` Enabled bool `json:"enabled"` CronExp string `json:"cronExp"` SyncDeletes bool `json:"syncDeletes"` SyncProperties bool `json:"syncProperties"` PathPrefix string `json:"pathPrefix"` RepoKey string `json:"repoKey"` URL string `json:"url"` EnableEventReplication bool `json:"enableEventReplication"` CheckBinaryExistenceInFilestore bool `json:"checkBinaryExistenceInFilestore"` SyncStatistics bool `json:"syncStatistics"` Status string `json:"status"` }
Replication represents single element of API respond from replication endpoint
type ReplicationStatus ¶ added in v1.10.0
type ReplicationStatus struct {
Status string `json:"status"`
}
type Replications ¶ added in v1.9.5
type Replications struct { Replications []Replication NodeId string }
type StorageInfo ¶
type StorageInfo struct { BinariesSummary struct { BinariesCount string `json:"binariesCount"` BinariesSize string `json:"binariesSize"` ArtifactsSize string `json:"artifactsSize"` Optimization string `json:"optimization"` ItemsCount string `json:""` ArtifactsCount string `json:"artifactsCount"` } `json:"binariesSummary"` FileStoreSummary struct { StorageType string `json:"storageType"` StorageDirectory string `json:"storageDirectory"` TotalSpace string `json:"totalSpace"` UsedSpace string `json:"usedSpace"` FreeSpace string `json:"freeSpace"` } `json:"fileStoreSummary"` RepositoriesSummaryList []struct { RepoKey string `json:"repoKey"` RepoType string `json:"repoType"` FoldersCount int `json:"foldersCount"` FilesCount int `json:"filesCount"` UsedSpace string `json:"usedSpace"` ItemsCount int `json:"itemsCount"` PackageType string `json:"packageType"` Percentage string `json:"percentage"` } `json:"repositoriesSummaryList"` NodeId string }
StorageInfo represents API respond from license storageinfo
type UnavailableMirror ¶ added in v1.12.0
type UnavailableMirror struct {}
UnavailableMirror represents single element of API respond from federation/status/unavailableMirrors endpoint
type UnavailableMirrors ¶ added in v1.12.0
type UnavailableMirrors struct {}
type UnmarshalError ¶
type UnmarshalError struct {
// contains filtered or unexported fields
}
UnmarshalError is a custom Error type for unmarshal API respond body error
func (*UnmarshalError) Error ¶
func (e *UnmarshalError) Error() string