artifactory

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.

func Int

func Int(v int) *int

Int is a helper routine that allocates a new int value to store v and returns a pointer to it.

func Int64

func Int64(v int64) *int64

Int64 is a helper routine that allocates a new int64 value to store v and returns a pointer to it.

func String

func String(v string) *string

String is a helper routine that allocates a new string value to store v and returns a pointer to it.

Types

type AccessToken

type AccessToken struct {
	AccessToken  *string `json:"access_token,omitempty"`
	ExpiresIn    *int    `json:"expires_in,omitempty"`
	Scope        *string `json:"scope,omitempty"`
	TokenType    *string `json:"token_type,omitempty"`
	RefreshToken *string `json:"refresh_token,omitempty"`
}

func (AccessToken) String

func (r AccessToken) String() string

type AccessTokenOptions

type AccessTokenOptions struct {
	// The grant type used to authenticate the request. In this case, the only value supported is "client_credentials" which is also the default value if this parameter is not specified.
	GrantType *string `url:"grant_type,omitempty"` // [Optional, default: "client_credentials"]
	// The user name for which this token is created. If the user does not exist, a transient user is created. Non-admin users can only create tokens for themselves so they must specify their own username.
	// If the user does not exist, the member-of-groups scope token must be provided (e.g. member-of-groups: g1, g2, g3...)
	Username *string `url:"username,omitempty"`
	// The scope to assign to the token provided as a space-separated list of scope tokens. Currently there are three possible scope tokens:
	//     - "api:*" - indicates that the token grants access to REST API calls. This is always granted by default whether specified in the call or not.
	//     - member-of-groups:[<group-name>] - indicates the groups that the token is associated with (e.g. member-of-groups: g1, g2, g3...). The token grants access according to the permission targets specified for the groups listed.
	//       Specify "*" for group-name to indicate that the token should provide the same access privileges that are given to the group of which the logged in user is a member.
	//       A non-admin user can only provide a scope that is a subset of the groups to which he belongs
	//     - "jfrt@<instance-id>:admin" - provides admin privileges on the specified Artifactory instance. This is only available for administrators.
	// If omitted and the username specified exists, the token is granted the scope of that user.
	Scope *string `url:"scope,omitempty"` // [Optional if the user specified in username exists]
	// The time in seconds for which the token will be valid. To specify a token that never expires, set to zero. Non-admin can only set a value that is equal to or less than the default 3600.
	ExpiresIn *int `url:"expires_in,omitempty"` // [Optional, default: 3600]
	// If true, this token is refreshable and the refresh token can be used to replace it with a new token once it expires.
	Refreshable *string `url:"refreshable,omitempty"` // [Optional, default: false]
	// A space-separate list of the other Artifactory instances or services that should accept this token identified by their Artifactory Service IDs as obtained from the Get Service ID endpoint.
	// In case you want the token to be accepted by all Artifactory instances you may use the following audience parameter "audience=jfrt@*".
	Audience *string `url:"audience,omitempty"` // [Optional, default: Only the service ID of the Artifactory instance that created the token]
}

type AccessTokenRefreshOptions

type AccessTokenRefreshOptions struct {
	// Should be set to refresh_token.
	GrantType *string `url:"grant_type,omitempty"`
	// The refresh token of the access token that needs to be refreshed.
	RefreshToken *string `url:"refresh_token,omitempty"`
	// The access token to refresh.
	AccessToken *string `url:"access_token,omitempty"`
	// The user name for which this token is created. If the user does not exist, a transient user is created. Non-admin users can only create tokens for themselves so they must specify their own username.
	// If the user does not exist, the member-of-groups scope token must be provided (e.g. member-of-groups: g1, g2, g3...)
	// Note: access_token and username are mutually exclusive, so only one of these parameters should be specified.
	Username *string `url:"username,omitempty"`
	// The scope to assign to the token provided as a space-separated list of scope tokens. Currently there are three possible scope tokens:
	//     - "api:*" - indicates that the token grants access to REST API calls. This is always granted by default whether specified in the call or not.
	//     - member-of-groups:[<group-name>] - indicates the groups that the token is associated with (e.g. member-of-groups: g1, g2, g3...). The token grants access according to the permission targets specified for the groups listed.
	//       Specify "*" for group-name to indicate that the token should provide the same access privileges that are given to the group of which the logged in user is a member.
	//       A non-admin user can only provide a scope that is a subset of the groups to which he belongs
	//     - "jfrt@<instance-id>:admin" - provides admin privileges on the specified Artifactory instance. This is only available for administrators.
	// If omitted and the username specified exists, the token is granted the scope of that user.
	Scope *string `url:"scope,omitempty"`
	// The time in seconds for which the token will be valid. To specify a token that never expires, set to zero. Non-admin can only set a value that is equal to or less than the default 3600.
	ExpiresIn *int `url:"expires_in,omitempty"`
	// If true, this token is refreshable and the refresh token can be used to replace it with a new token once it expires.
	Refreshable *string `url:"refreshable,omitempty"`
	// A space-separate list of the other Artifactory instances or services that should accept this token identified by their Artifactory Service IDs as obtained from the Get Service ID endpoint.
	// In case you want the token to be accepted by all Artifactory instances you may use the following audience parameter "audience=jfrt@*".
	Audience *string `url:"audience,omitempty"`
}

type AccessTokenRevokeOptions

type AccessTokenRevokeOptions struct {
	Token string `url:"token,omitempty"`
}

type ApiKey

type ApiKey struct {
	ApiKey *string `json:"apiKey,omitempty"`
}

type ArtifactService

type ArtifactService service

ArtifactService exposes the Artifact API endpoints from Artifactory

func (*ArtifactService) DeleteRepositoryReplicationConfig

func (s *ArtifactService) DeleteRepositoryReplicationConfig(ctx context.Context, repoKey string) (*http.Response, error)

func (*ArtifactService) GetRepositoryReplicationConfig

func (s *ArtifactService) GetRepositoryReplicationConfig(ctx context.Context, repoKey string) (*ReplicationConfig, *http.Response, error)

Returns the replication configuration for the given repository key, if found. Supported by local and remote repositories. Note: The 'enableEventReplication' parameter refers to both push and pull replication. Notes: Requires Artifactory Pro Security: Requires a privileged user

func (*ArtifactService) SetRepositoryReplicationConfig

func (s *ArtifactService) SetRepositoryReplicationConfig(ctx context.Context, repoKey string, config *ReplicationConfig) (*http.Response, error)

Add or replace replication configuration for given repository key. Supported by local and remote repositories. Accepts the JSON payload returned from Get Repository Replication Configuration for a single and an array of configurations. If the payload is an array of replication configurations, then values for cronExp and enableEventReplication in the first element in the array will determine the corresponding values when setting the repository replication configuration. Notes: Requires Artifactory Pro Security: Requires a privileged user

func (*ArtifactService) UpdateRepositoryReplicationConfig

func (s *ArtifactService) UpdateRepositoryReplicationConfig(ctx context.Context, repoKey string, config *ReplicationConfig) (*http.Response, error)

Update existing replication configuration for given repository key, if found. Supported by local and remote repositories. Notes: Requires Artifactory Pro Security: Requires a privileged user

type BasicAuthTransport

type BasicAuthTransport struct {
	Username  string
	Password  string
	Transport http.RoundTripper
}

BasicAuthTransport allows the construction of a HTTP client that authenticates with basic auth It also adds the correct headers to the request

func (*BasicAuthTransport) Client

func (t *BasicAuthTransport) Client() *http.Client

Client returns a HTTP client and injects the basic auth transport

func (*BasicAuthTransport) RoundTrip

func (t *BasicAuthTransport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip allows us to add headers to every request

type CertificateDetails

type CertificateDetails struct {
	CertificateAlias *string `json:"certificateAlias,omitempty"`
	IssuedTo         *string `json:"issuedTo,omitempty"`
	IssuedBy         *string `json:"issuedby,omitempty"`
	IssuedOn         *string `json:"issuedOn,omitempty"`
	ValidUntil       *string `json:"validUntil,omitempty"`
	FingerPrint      *string `json:"fingerPrint,omitempty"`
}

func (CertificateDetails) String

func (r CertificateDetails) String() string

type Client

type Client struct {

	// Base URL for API requests. BaseURL should always be specified with a trailing slash.
	BaseURL *url.URL

	// User agent used when communicating with the Artifactory API.
	UserAgent string

	// Services used for talking to different parts of the Artifactory API.
	Repositories *RepositoriesService
	Security     *SecurityService
	System       *SystemService
	Artifacts    *ArtifactService
	// contains filtered or unexported fields
}

Client is the container for all the api methods

func NewClient

func NewClient(baseURL string, httpClient *http.Client) (*Client, error)

NewClient creates a Client from a provided base url for an artifactory instance and a http client

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*http.Response, error)

Do executes a give request with the given context. If the parameter v is a writer the body will be written to it in raw format, else v is assumed to be a struct to unmarshal the body into assuming JSON format. If v is nil then the body is not read and can be manually parsed from the response

func (*Client) NewJSONEncodedRequest

func (c *Client) NewJSONEncodedRequest(method, urlStr string, body interface{}) (*http.Request, error)

NewJSONEncodedRequest is a wrapper around client.NewRequest which encodes the body as a JSON object

func (*Client) NewRequest

func (c *Client) NewRequest(method, urlStr string, body io.Reader) (*http.Request, error)

NewRequest creates an API request. A relative URL can be provided in urlStr, in which case it is resolved relative to the BaseURL of the Client. Relative URLs should always be specified without a preceding slash. If specified, the value pointed to by body is included as the request body.

func (*Client) NewURLEncodedRequest

func (c *Client) NewURLEncodedRequest(method, urlStr string, body interface{}) (*http.Request, error)

NewURLEncodedRequest is a wrapper around client.NewRequest which encodes the body with URL encoding

type ClientProvider

type ClientProvider interface {
	Client() *http.Client
}

ClientProvider exposes a Client method and enforces a standard for the custom transoirts

type ContentSynchronisation

type ContentSynchronisation struct {
	Enabled    *bool       `json:"enabled,omitempty"`
	Statistics *Statistics `json:"statistics,omitempty"`
	Properties *Properties `json:"properties,omitempty"`
	Source     *Source     `json:"source,omitempty"`
}

type ErrorResponse

type ErrorResponse struct {
	Response *http.Response `json:"-"`                // HTTP response that caused this error
	Errors   []Status       `json:"errors,omitempty"` // Individual errors
}

ErrorResponse reports one or more errors caused by an API request.

func (*ErrorResponse) Error

func (r *ErrorResponse) Error() string

type Group

type Group struct {
	Name            *string `json:"name,omitempty"`            // Optional element in create/replace queries
	Description     *string `json:"description,omitempty"`     // Optional element in create/replace queries
	AutoJoin        *bool   `json:"autoJoin,omitempty"`        // Optional element in create/replace queries; default: false (must be false if adminPrivileges is true)
	AdminPrivileges *bool   `json:"adminPrivileges,omitempty"` // Optional element in create/replace queries; default: false
	Realm           *string `json:"realm,omitempty"`           // Optional element in create/replace queries
	RealmAttributes *string `json:"realmAttributes,omitempty"` // Optional element in create/replace queries
}

application/vnd.org.jfrog.artifactory.security.Group+json

func (Group) String

func (r Group) String() string

type GroupDetails

type GroupDetails struct {
	Name *string `json:"name,omitempty"`
	Uri  *string `json:"uri,omitempty"`
}

application/vnd.org.jfrog.artifactory.security.Groups+json

func (GroupDetails) String

func (r GroupDetails) String() string

type HALicense

type HALicense struct {
	Type         *string `json:"type,omitempty"`
	ValidThrough *string `json:"validThrough,omitempty"` // validity date formatted MMM DD, YYYY
	LicensedTo   *string `json:"licensedTo,omitempty"`
	LicenseHash  *string `json:"licenseHash,omitempty"`
	NodeId       *string `json:"nodeId,omitempty"`  // Node ID of the node activated with this license | Not in use
	NodeUrl      *string `json:"nodeUrl,omitempty"` // URL of the node activated with this license | Not in use
	Expired      *bool   `json:"expired,omitempty"`
}

type HALicenseHashes

type HALicenseHashes struct {
	LicenseHash *[]string `url:"licenseHash,omitempty"`
}

type HALicenses

type HALicenses struct {
	Licenses *[]HALicense `json:"licenses,omitempty"`
}

func (HALicenses) String

func (r HALicenses) String() string

type ItemPermissions

type ItemPermissions struct {
	Uri        *string     `json:"uri,omitempty"`
	Principals *Principals `json:"principals,omitempty"`
}

Permissions are returned according to the following conventions: m=admin; d=delete; w=deploy; n=annotate; r=read

func (ItemPermissions) String

func (r ItemPermissions) String() string

type LicenseDetails

type LicenseDetails struct {
	Type         *string `json:"type,omitempty"`
	ValidThrough *string `json:"validThrough,omitempty"`
	LicensedTo   *string `json:"licensedTo,omitempty"`
}

func (LicenseDetails) String

func (r LicenseDetails) String() string

type LicenseKey

type LicenseKey struct {
	LicenseKey *string `json:"licenseKey,omitempty"`
}

type LocalRepository

type LocalRepository struct {
	Key                          *string   `json:"key,omitempty"`
	RClass                       *string   `json:"rclass,omitempty"` // Mandatory element in create/replace queries (optional in "update" queries)
	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"`
	ArchiveBrowsingEnabled       *bool     `json:"archiveBrowsingEnabled,omitempty"`
	BlackedOut                   *bool     `json:"blackedOut,omitempty"`
	BlockXrayUnscannedArtifacts  *bool     `json:"blockXrayUnscannedArtifacts,omitempty"`
	CalculateYumMetadata         *bool     `json:"calculateYumMetadata,omitempty"`
	ChecksumPolicyType           *string   `json:"checksumPolicyType,omitempty"`
	DebianTrivialLayout          *bool     `json:"debianTrivialLayout,omitempty"`
	DockerApiVersion             *string   `json:"dockerApiVersion,omitempty"`
	EnableBowerSupport           *bool     `json:"enableBowerSupport,omitempty"`
	EnableCocoaPodsSupport       *bool     `json:"enableCocoaPodsSupport,omitempty"`
	EnableComposerSupport        *bool     `json:"enableComposerSupport,omitempty"`
	EnableConanSupport           *bool     `json:"enableConanSupport,omitempty"`
	EnableDebianSupport          *bool     `json:"enableDebianSupport,omitempty"`
	EnableDistRepoSupport        *bool     `json:"enableDistRepoSupport,omitempty"`
	EnableDockerSupport          *bool     `json:"enableDockerSupport,omitempty"`
	EnableFileListsIndexing      *bool     `json:"enableFileListsIndexing,omitempty"`
	EnableGemsSupport            *bool     `json:"enableGemsSupport,omitempty"`
	EnableGitLfsSupport          *bool     `json:"enableGitLfsSupport,omitempty"`
	EnableNpmSupport             *bool     `json:"enableNpmSupport,omitempty"`
	EnableNuGetSupport           *bool     `json:"enableNuGetSupport,omitempty"`
	EnablePuppetSupport          *bool     `json:"enablePuppetSupport,omitempty"`
	EnablePypiSupport            *bool     `json:"enablePypiSupport,omitempty"`
	EnableVagrantSupport         *bool     `json:"enableVagrantSupport,omitempty"`
	EnabledChefSupport           *bool     `json:"enabledChefSupport,omitempty"`
	ForceNugetAuthentication     *bool     `json:"forceNugetAuthentication,omitempty"`
	HandleReleases               *bool     `json:"handleReleases,omitempty"`
	HandleSnapshots              *bool     `json:"handleSnapshots,omitempty"`
	MaxUniqueSnapshots           *int      `json:"maxUniqueSnapshots,omitempty"`
	MaxUniqueTags                *int      `json:"maxUniqueTags,omitempty"`
	PropertySets                 *[]string `json:"propertySets,omitempty"`
	RepoLayoutRef                *string   `json:"repoLayoutRef,omitempty"`
	SnapshotVersionBehavior      *string   `json:"snapshotVersionBehavior,omitempty"`
	SuppressPomConsistencyChecks *bool     `json:"suppressPomConsistencyChecks,omitempty"`
	XrayIndex                    *bool     `json:"xrayIndex,omitempty"`
	XrayMinimumBlockedSeverity   *string   `json:"xrayMinimumBlockedSeverity,omitempty"`
	YumRootDepth                 *int      `json:"yumRootDepth,omitempty"`
}

application/vnd.org.jfrog.artifactory.repositories.LocalRepositoryConfiguration+json

func (LocalRepository) String

func (r LocalRepository) String() string

type PasswordChangeOptions

type PasswordChangeOptions struct {
	Username     *string `json:"username,omitempty"`
	OldPassword  *string `json:"oldPassword,omitempty"`
	NewPassword1 *string `json:"newPassword1,omitempty"`
	NewPassword2 *string `json:"newPassword2,omitempty"`
}

type PasswordExpirationPolicy

type PasswordExpirationPolicy struct {
	Enabled        *bool `json:"enabled,omitempty"`
	PasswordMaxAge *int  `json:"passwordMaxAge,omitempty"`
	NotifyByEmail  *bool `json:"notifyByEmail,omitempty"`
}

type PermissionTargets

type PermissionTargets struct {
	Name            *string     `json:"name,omitempty"`            // Optional element in create/replace queries
	IncludesPattern *string     `json:"includesPattern,omitempty"` // Optional element in create/replace queries
	ExcludesPattern *string     `json:"excludesPattern,omitempty"` // Optional element in create/replace queries
	Repositories    *[]string   `json:"repositories,omitempty"`    // Mandatory element in create/replace queries, optional in "update" queries
	Principals      *Principals `json:"principals,omitempty"`      // Optional element in create/replace queries
}

application/vnd.org.jfrog.artifactory.security.PermissionTarget+json Permissions are set/returned according to the following conventions:

m=admin; d=delete; w=deploy; n=annotate; r=read

func (PermissionTargets) String

func (r PermissionTargets) String() string

type PermissionTargetsDetails

type PermissionTargetsDetails struct {
	Name *string `json:"name,omitempty"`
	Uri  *string `json:"uri,omitempty"`
}

application/vnd.org.jfrog.artifactory.security.PermissionTargets+json

func (PermissionTargetsDetails) String

func (r PermissionTargetsDetails) String() string

type Principals

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

type Properties

type Properties struct {
	Enabled *bool `json:"enabled,omitempty"`
}

type RemoteRepository

type RemoteRepository struct {
	Key                               *string                 `json:"key,omitempty"`
	RClass                            *string                 `json:"rclass,omitempty"` // Mandatory element in create/replace queries (optional in "update" queries)
	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"`
	AllowAnyHostAuth                  *bool                   `json:"allowAnyHostAuth,omitempty"`
	ArchiveBrowsingEnabled            *bool                   `json:"archiveBrowsingEnabled,omitempty"`
	AssumedOfflinePeriodSecs          *int                    `json:"assumedOfflinePeriodSecs,omitempty"`
	BlackedOut                        *bool                   `json:"blackedOut,omitempty"`
	BlockMismatchingMimeTypes         *bool                   `json:"blockMismatchingMimeTypes,omitempty"`
	BlockXrayUnscannedArtifacts       *bool                   `json:"blockXrayUnscannedArtifacts,omitempty"`
	BypassHeadRequests                *bool                   `json:"bypassHeadRequests,omitempty"`
	ContentSynchronisation            *ContentSynchronisation `json:"contentSynchronisation,omitempty"`
	DebianTrivialLayout               *bool                   `json:"debianTrivialLayout,omitempty"`
	DockerApiVersion                  *string                 `json:"dockerApiVersion,omitempty"`
	EnableBowerSupport                *bool                   `json:"enableBowerSupport,omitempty"`
	EnableCocoaPodsSupport            *bool                   `json:"enableCocoaPodsSupport,omitempty"`
	EnableConanSupport                *bool                   `json:"enableConanSupport,omitempty"`
	EnableCookieManagement            *bool                   `json:"enableCookieManagement,omitempty"`
	EnabledChefSupport                *bool                   `json:"enabledChefSupport,omitempty"`
	EnableComposerSupport             *bool                   `json:"enableComposerSupport,omitempty"`
	EnableDebianSupport               *bool                   `json:"enableDebianSupport,omitempty"`
	EnableDistRepoSupport             *bool                   `json:"enableDistRepoSupport,omitempty"`
	EnableDockerSupport               *bool                   `json:"enableDockerSupport,omitempty"`
	EnableGemsSupport                 *bool                   `json:"enableGemsSupport,omitempty"`
	EnableGitLfsSupport               *bool                   `json:"enableGitLfsSupport,omitempty"`
	EnableNpmSupport                  *bool                   `json:"enableNpmSupport,omitempty"`
	EnableNuGetSupport                *bool                   `json:"enableNuGetSupport,omitempty"`
	EnablePuppetSupport               *bool                   `json:"enablePuppetSupport,omitempty"`
	EnablePypiSupport                 *bool                   `json:"enablePypiSupport,omitempty"`
	EnableTokenAuthentication         *bool                   `json:"enableTokenAuthentication,omitempty"`
	EnableVagrantSupport              *bool                   `json:"enableVagrantSupport,omitempty"`
	FailedRetrievalCachePeriodSecs    *int                    `json:"failedRetrievalCachePeriodSecs,omitempty"`
	FetchJarsEagerly                  *bool                   `json:"fetchJarsEagerly,omitempty"`
	FetchSourcesEagerly               *bool                   `json:"fetchSourcesEagerly,omitempty"`
	ForceNugetAuthentication          *bool                   `json:"forceNugetAuthentication,omitempty"`
	HandleReleases                    *bool                   `json:"handleReleases,omitempty"`
	HandleSnapshots                   *bool                   `json:"handleSnapshots,omitempty"`
	HardFail                          *bool                   `json:"hardFail,omitempty"`
	ListRemoteFolderItems             *bool                   `json:"listRemoteFolderItems,omitempty"`
	LocalAddress                      *string                 `json:"localAddress,omitempty"`
	MaxUniqueSnapshots                *int                    `json:"maxUniqueSnapshots,omitempty"`
	MaxUniqueTags                     *int                    `json:"maxUniqueTags,omitempty"`
	MismatchingMimeTypesOverrideList  *string                 `json:"mismatchingMimeTypesOverrideList,omitempty"`
	MissedRetrievalCachePeriodSecs    *int                    `json:"missedRetrievalCachePeriodSecs,omitempty"`
	Offline                           *bool                   `json:"offline,omitempty"`
	Password                          *string                 `json:"password,omitempty"`
	PropagateQueryParams              *bool                   `json:"propagateQueryParams,omitempty"`
	PropertySets                      *[]string               `json:"propertySets,omitempty"`
	Proxy                             *string                 `json:"proxy,omitempty"`
	RejectInvalidJars                 *bool                   `json:"rejectInvalidJars,omitempty"`
	RemoteRepoChecksumPolicyType      *string                 `json:"remoteRepoChecksumPolicyType,omitempty"`
	RepoLayoutRef                     *string                 `json:"repoLayoutRef,omitempty"`
	RetrievalCachePeriodSecs          *int                    `json:"retrievalCachePeriodSecs,omitempty"`
	ShareConfiguration                *bool                   `json:"shareConfiguration,omitempty"`
	SocketTimeoutMillis               *int                    `json:"socketTimeoutMillis,omitempty"`
	StoreArtifactsLocally             *bool                   `json:"storeArtifactsLocally,omitempty"`
	SuppressPomConsistencyChecks      *bool                   `json:"suppressPomConsistencyChecks,omitempty"`
	SynchronizeProperties             *bool                   `json:"synchronizeProperties,omitempty"`
	UnusedArtifactsCleanupEnabled     *bool                   `json:"unusedArtifactsCleanupEnabled,omitempty"`
	UnusedArtifactsCleanupPeriodHours *int                    `json:"unusedArtifactsCleanupPeriodHours,omitempty"`
	Url                               *string                 `json:"url,omitempty"`
	Username                          *string                 `json:"username,omitempty"` // Mandatory element in create/replace queries (optional in "update" queries)
	XrayIndex                         *bool                   `json:"xrayIndex,omitempty"`
	XrayMinimumBlockedSeverity        *string                 `json:"xrayMinimumBlockedSeverity,omitempty"`
	BowerRegistryURL                  *string                 `json:"bowerRegistryUrl,omitempty"`
	VcsType                           *string                 `json:"vcsType,omitempty"`
	VcsGitProvider                    *string                 `json:"vcsGitProvider,omitempty"`
	VcsGitDownloadUrl                 *string                 `json:"vcsGitDownloadUrl,omitempty"`
	ClientTLSCertificate              *string                 `json:"clientTlsCertificate,omitempty"`
	PyPiRegistryUrl                   *string                 `json:"pyPiRegistryUrl,omitempty"`
}

func (RemoteRepository) String

func (r RemoteRepository) String() string

type ReplicationConfig

type ReplicationConfig struct {
	RepoKey                *string                    `json:"-"`
	CronExp                *string                    `json:"cronExp,omitempty"`
	EnableEventReplication *bool                      `json:"enableEventReplication,omitempty"`
	Replications           *[]SingleReplicationConfig `json:"replications,omitempty"`
}

ReplicationConfig is the model for the multi replication config API endpoints. Its usage is preferred over SingleReplicationConfig as it is a more direct mapping of the replicationConfig in the UI

func (ReplicationConfig) String

func (r ReplicationConfig) String() string

type RepositoriesService

type RepositoriesService service

func (*RepositoriesService) CreateLocal

func (s *RepositoriesService) CreateLocal(ctx context.Context, repo *LocalRepository) (*http.Response, error)

Creates a new repository in Artifactory with the provided configuration. Since: 2.3.0 Notes: Requires Artifactory Pro An existing repository with the same key are removed from the configuration and its content is removed! Missing values are set to the default values as defined by the consumed type spec. Security: Requires an admin user

func (*RepositoriesService) CreateRemote

func (s *RepositoriesService) CreateRemote(ctx context.Context, repo *RemoteRepository) (*http.Response, error)

Creates a new repository in Artifactory with the provided configuration. Since: 2.3.0 Notes: Requires Artifactory Pro An existing repository with the same key are removed from the configuration and its content is removed! Missing values are set to the default values as defined by the consumed type spec. Security: Requires an admin user

func (*RepositoriesService) CreateVirtual

func (s *RepositoriesService) CreateVirtual(ctx context.Context, repo *VirtualRepository) (*http.Response, error)

Creates a new repository in Artifactory with the provided configuration. Since: 2.3.0 Notes: Requires Artifactory Pro An existing repository with the same key are removed from the configuration and its content is removed! Missing values are set to the default values as defined by the consumed type spec. Security: Requires an admin user

func (*RepositoriesService) DeleteLocal

func (s *RepositoriesService) DeleteLocal(ctx context.Context, repo string) (*http.Response, error)

Removes a repository configuration together with the whole repository content. Since: 2.3.0 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*RepositoriesService) DeleteRemote

func (s *RepositoriesService) DeleteRemote(ctx context.Context, repo string) (*http.Response, error)

Removes a repository configuration together with the whole repository content. Since: 2.3.0 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*RepositoriesService) DeleteVirtual

func (s *RepositoriesService) DeleteVirtual(ctx context.Context, repo string) (*http.Response, error)

Removes a repository configuration together with the whole repository content. Since: 2.3.0 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*RepositoriesService) GetLocal

Retrieves the current configuration of a repository. Since: 2.3.0 Notes: Requires Artifactory Pro Security: Requires an admin user for complete repository configuration. Non-admin users will receive only partial configuration data.

func (*RepositoriesService) GetRemote

Retrieves the current configuration of a repository. Since: 2.3.0 Notes: Requires Artifactory Pro Security: Requires an admin user for complete repository configuration. Non-admin users will receive only partial configuration data.

func (*RepositoriesService) GetVirtual

Retrieves the current configuration of a repository. Since: 2.3.0 Notes: Requires Artifactory Pro Security: Requires an admin user for complete repository configuration. Non-admin users will receive only partial configuration data.

func (*RepositoriesService) ListRepositories

Returns a list of minimal repository details for all repositories of the specified type. Since: 2.2.0 Security: Requires a privileged user (can be anonymous)

func (*RepositoriesService) UpdateLocal

func (s *RepositoriesService) UpdateLocal(ctx context.Context, repo string, repository *LocalRepository) (*http.Response, error)

Updates an exiting repository configuration in Artifactory with the provided configuration elements. Since: 2.3.0 Notes: Requires Artifactory Pro The class of a repository (the rclass attribute cannot be updated. Security: Requires an admin user

func (*RepositoriesService) UpdateRemote

func (s *RepositoriesService) UpdateRemote(ctx context.Context, repo string, repository *RemoteRepository) (*http.Response, error)

Updates an exiting repository configuration in Artifactory with the provided configuration elements. Since: 2.3.0 Notes: Requires Artifactory Pro The class of a repository (the rclass attribute cannot be updated. Security: Requires an admin user

func (*RepositoriesService) UpdateVirtual

func (s *RepositoriesService) UpdateVirtual(ctx context.Context, repo string, repository *VirtualRepository) (*http.Response, error)

Updates an exiting repository configuration in Artifactory with the provided configuration elements. Since: 2.3.0 Notes: Requires Artifactory Pro The class of a repository (the rclass attribute cannot be updated. Security: Requires an admin user

type RepositoryDetails

type RepositoryDetails struct {
	Key         *string `json:"key,omitempty"`
	Type        *string `json:"type,omitempty"`
	Description *string `json:"description,omitempty"`
	URL         *string `json:"url,omitempty"`
}

func (RepositoryDetails) String

func (r RepositoryDetails) String() string

type RepositoryListOptions

type RepositoryListOptions struct {
	// Type of repositories to list.
	// Can be one of local|remote|virtual|distribution. Default: all
	Type string `url:"type,omitempty"`
}

type ReverseProxyConfig

type ReverseProxyConfig struct {
	Key                      *string `json:"key,omitempty"`
	WebServerType            *string `json:"webServerType,omitempty"`
	ArtifactoryAppContext    *string `json:"artifactoryAppContext,omitempty"`
	PublicAppContext         *string `json:"publicAppContext,omitempty"`
	ServerName               *string `json:"serverName,omitempty"`
	ServerNameExpression     *string `json:"serverNameExpression,omitempty"`
	ArtifactoryServerName    *string `json:"artifactoryServerName,omitempty"`
	ArtifactoryPort          *int    `json:"artifactoryPort,omitempty"`
	SslCertificate           *string `json:"sslCertificate,omitempty"`
	SslKey                   *string `json:"sslKey,omitempty"`
	DockerReverseProxyMethod *string `json:"dockerReverseProxyMethod,omitempty"`
	UseHttps                 *bool   `json:"useHttps,omitempty"`
	UseHttp                  *bool   `json:"useHttp,omitempty"`
	SslPort                  *int    `json:"sslPort,omitempty"`
	HttpPort                 *int    `json:"httpPort,omitempty"`
}

func (ReverseProxyConfig) String

func (r ReverseProxyConfig) String() string

type SecurityService

type SecurityService service

func (*SecurityService) ActivateArtifactoryKeyEncryption

func (s *SecurityService) ActivateArtifactoryKeyEncryption(ctx context.Context) (*string, *http.Response, error)

Creates a new Artifactory encryption key and activates Artifactory key encryption. Since: 3.2.2 Notes: This is an advanced feature intended for administrators Security: Requires a valid admin user

func (*SecurityService) AddCertificate

func (s *SecurityService) AddCertificate(ctx context.Context, alias string, pem *os.File) (*Status, *http.Response, error)

Adds an SSL certificate. Since:5.4.0 Security: Requires an admin user

func (*SecurityService) ChangePassword

func (s *SecurityService) ChangePassword(ctx context.Context, opts *PasswordChangeOptions) (*string, *http.Response, error)

Changes a user's password Since: 4.4.2 Notes: Requires Artifactory Pro Security: Admin can apply this method to all users, and each (non-anonymous) user can use this method to change his own password.

func (*SecurityService) CreateApiKey

func (s *SecurityService) CreateApiKey(ctx context.Context) (*ApiKey, *http.Response, error)

Create an API key for the current user. Returns an error if API key already exists - use regenerate API key instead. Since: 4.3.0

func (*SecurityService) CreateOrReplaceGroup

func (s *SecurityService) CreateOrReplaceGroup(ctx context.Context, groupName string, group *Group) (*http.Response, error)

Creates a new group in Artifactory or replaces an existing group Since: 2.4.0 Notes: Requires Artifactory Pro Missing values will be set to the default values as defined by the consumed type. Security: Requires an admin user

func (*SecurityService) CreateOrReplacePermissionTargets

func (s *SecurityService) CreateOrReplacePermissionTargets(ctx context.Context, permissionName string, permissionTargets *PermissionTargets) (*http.Response, error)

Creates a new permission target in Artifactory or replaces an existing permission target Since: 2.4.0 Notes: Requires Artifactory Pro Missing values will be set to the default values as defined by the consumed type. Security: Requires an admin user

func (*SecurityService) CreateOrReplaceUser

func (s *SecurityService) CreateOrReplaceUser(ctx context.Context, username string, user *User) (*http.Response, error)

Creates a new user in Artifactory or replaces an existing user Since: 2.4.0 Notes: Requires Artifactory Pro Missing values will be set to the default values as defined by the consumed type. Security: Requires an admin user

func (*SecurityService) CreateToken

Creates an access token Since: 5.0.0 Security: Requires a valid user

func (*SecurityService) DeactivateArtifactoryKeyEncryption

func (s *SecurityService) DeactivateArtifactoryKeyEncryption(ctx context.Context) (*string, *http.Response, error)

Removes the current Artifactory encryption key and deactivates Artifactory key encryption. Since: 3.2.2 Notes: This is an advanced feature intended for administrators Security: Requires a valid admin user

func (*SecurityService) DeleteCertificate

func (s *SecurityService) DeleteCertificate(ctx context.Context, alias string) (*Status, *http.Response, error)

Deletes an SSL certificate. Since:5.4.0 Security: Requires an admin user

func (*SecurityService) DeleteGroup

func (s *SecurityService) DeleteGroup(ctx context.Context, groupName string) (*string, *http.Response, error)

Removes an Artifactory group. Since: 2.4.0 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*SecurityService) DeletePermissionTargets

func (s *SecurityService) DeletePermissionTargets(ctx context.Context, permissionName string) (*string, *http.Response, error)

Deletes an Artifactory permission target. Since: 2.4.0 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*SecurityService) DeleteUser

func (s *SecurityService) DeleteUser(ctx context.Context, username string) (*string, *http.Response, error)

Removes an Artifactory user. Since: 2.4.0 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*SecurityService) ExpireAllUsersPassword

func (s *SecurityService) ExpireAllUsersPassword(ctx context.Context) (*http.Response, error)

Expires password for all users Since: 4.4.2 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*SecurityService) ExpireMultipleUsersPassword

func (s *SecurityService) ExpireMultipleUsersPassword(ctx context.Context, usernames []string) (*http.Response, error)

Expires password for a list of users Since: 4.4.2 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*SecurityService) ExpireUserPassword

func (s *SecurityService) ExpireUserPassword(ctx context.Context, username string) (*string, *http.Response, error)

Expires a user's password Since: 4.4.2 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*SecurityService) GetApiKey

func (s *SecurityService) GetApiKey(ctx context.Context) (*ApiKey, *http.Response, error)

Get the current user's own API key Since: 4.3.0

func (*SecurityService) GetCertificates

func (s *SecurityService) GetCertificates(ctx context.Context) (*[]CertificateDetails, *http.Response, error)

Returns a list of installed SSL certificates. Since:5.4.0 Security: Requires an admin user

func (*SecurityService) GetEffectiveItemPermissions

func (s *SecurityService) GetEffectiveItemPermissions(ctx context.Context, repoName string, itemPath string) (*ItemPermissions, *http.Response, error)

Returns a list of effective permissions for the specified item (file or folder). Only users and groups with some permissions on the item are returned. Supported by local and local-cached repositories. Since: 2.3.4 Notes: Requires Artifactory Pro Security: Requires a valid admin or local admin user.

func (*SecurityService) GetEncryptedPassword

func (s *SecurityService) GetEncryptedPassword(ctx context.Context) (*string, *http.Response, error)

Get the encrypted password of the authenticated requestor Since: 3.3.0 Security: Requires a privileged user

func (*SecurityService) GetGPGPublicKey

func (s *SecurityService) GetGPGPublicKey(ctx context.Context) (*string, *http.Response, error)

Gets the public key that Artifactory provides to Debian and Opkg clients to verify packages Security: Requires an authenticated user, or anonymous (if "Anonymous Access" is globally enabled)

func (*SecurityService) GetGroup

func (s *SecurityService) GetGroup(ctx context.Context, groupName string) (*Group, *http.Response, error)

Get the details of an Artifactory Group Since: 2.4.0 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*SecurityService) GetLockedOutUsers

func (s *SecurityService) GetLockedOutUsers(ctx context.Context) ([]string, *http.Response, error)

If locking out users is enabled, lists all users that were locked out due to recurrent incorrect login attempts. Since: 4.4 Security: Requires a valid admin user

func (*SecurityService) GetPasswordExpirationPolicy

func (s *SecurityService) GetPasswordExpirationPolicy(ctx context.Context) (*PasswordExpirationPolicy, *http.Response, error)

Retrieves the password expiration policy Since: 4.4.2 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*SecurityService) GetPermissionTargets

func (s *SecurityService) GetPermissionTargets(ctx context.Context, permissionName string) (*PermissionTargets, *http.Response, error)

Get the details of an Artifactory Permission Target Since: 2.4.0 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*SecurityService) GetSecurityConfiguration

func (s *SecurityService) GetSecurityConfiguration(ctx context.Context) (*string, *http.Response, error)

Retrieve the security configuration (security.xml). Since: 2.2.0 Notes: This is an advanced feature - make sure the new configuration is really what you wanted before saving. Security: Requires a valid admin us

func (*SecurityService) GetServiceId

func (s *SecurityService) GetServiceId(ctx context.Context) (*string, *http.Response, error)

Provides the service ID of an Artifactory instance or cluster. Up to version 5.5.1, the Artiafctory service ID is formatted jf-artifactory@<id>. From version 5.5.2 the service ID is formatted jfrt@<id>. Since: 5.0.0 Security: Requires an admin user

func (*SecurityService) GetUser

func (s *SecurityService) GetUser(ctx context.Context, username string) (*User, *http.Response, error)

Get the details of an Artifactory user Since: 2.4.0 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*SecurityService) GetUserLockPolicy

func (s *SecurityService) GetUserLockPolicy(ctx context.Context) (*UserLockPolicy, *http.Response, error)

Retrieves the currently configured user lock policy. Since: 4.4 Security: Requires a valid admin user

func (*SecurityService) ListGroups

func (s *SecurityService) ListGroups(ctx context.Context) (*[]GroupDetails, *http.Response, error)

Get the groups list Since: 2.4.0 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*SecurityService) ListPermissionTargets

func (s *SecurityService) ListPermissionTargets(ctx context.Context) ([]*PermissionTargetsDetails, *http.Response, error)

Get the permission targets list Since: 2.4.0 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*SecurityService) ListUsers

func (s *SecurityService) ListUsers(ctx context.Context) (*[]UserDetails, *http.Response, error)

Get the users list Since: 2.4.0 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*SecurityService) RefreshToken

Refresh an access token to extend its validity. If only the access token and the refresh token are provided (and no other parameters), this pair is used for authentication. If username or any other parameter is provided, then the request must be authenticated by a token that grants admin permissions. Since: 5.0.0 Security: Requires a valid user (unless both access token and refresh token are provided)

func (*SecurityService) RegenerateApiKey

func (s *SecurityService) RegenerateApiKey(ctx context.Context) (*ApiKey, *http.Response, error)

Regenerate an API key for the current user Since: 4.3.0

func (*SecurityService) RevokeAllApiKeys

func (s *SecurityService) RevokeAllApiKeys(ctx context.Context) (*map[string]interface{}, *http.Response, error)

Revokes all API keys currently defined in the system Since: 4.3.0 Security: Requires a privileged user (Admin only)

func (*SecurityService) RevokeApiKey

func (s *SecurityService) RevokeApiKey(ctx context.Context) (*map[string]interface{}, *http.Response, error)

Revokes the current user's API key Since: 4.3.0

func (*SecurityService) RevokeToken

Revoke an access token Since: 5.0.0 Security: Requires a valid user

func (*SecurityService) RevokeUserApiKey

func (s *SecurityService) RevokeUserApiKey(ctx context.Context, username string) (*map[string]interface{}, *http.Response, error)

Revokes the API key of another user Since: 4.3.0 Security: Requires a privileged user (Admin only)

func (*SecurityService) SetGPGPassPhrase

func (s *SecurityService) SetGPGPassPhrase(ctx context.Context, passphrase string) (*string, *http.Response, error)

Sets the pass phrase required signing Debian and ipk packages using the private key Security: Requires a valid admin user

func (*SecurityService) SetGPGPrivateKey

func (s *SecurityService) SetGPGPrivateKey(ctx context.Context, gpgKey string) (*string, *http.Response, error)

Sets the private key that Artifactory will use to sign Debian and ipk packages Security: Requires a valid admin user

func (*SecurityService) SetGPGPublicKey

func (s *SecurityService) SetGPGPublicKey(ctx context.Context, gpgKey string) (*string, *http.Response, error)

Sets the public key that Artifactory provides to Debian and Opkg clients to verify packages Security: Requires a valid admin user

func (*SecurityService) SetPasswordExpirationPolicy

func (s *SecurityService) SetPasswordExpirationPolicy(ctx context.Context, policy *PasswordExpirationPolicy) (*PasswordExpirationPolicy, *http.Response, error)

Sets the password expiration policy Since: 4.4.2 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*SecurityService) SetUserLockPolicy

func (s *SecurityService) SetUserLockPolicy(ctx context.Context, policy *PasswordExpirationPolicy) (*string, *http.Response, error)

Configures the user lock policy that locks users out of their account if the number of repeated incorrect login attempts exceeds the configured maximum allowed. Since: 4.4 Security: Requires a valid admin user

func (*SecurityService) UnexpireUserPassword

func (s *SecurityService) UnexpireUserPassword(ctx context.Context, username string) (*string, *http.Response, error)

Unexpires a user's password Since: 4.4.2 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*SecurityService) UnlockMultipleUsers

func (s *SecurityService) UnlockMultipleUsers(ctx context.Context, usernames []string) (*string, *http.Response, error)

Unlocks a list of users that were locked out due to recurrent incorrect login attempts. Since: 4.4 Security: Requires a valid admin user

func (*SecurityService) UnlockUser

func (s *SecurityService) UnlockUser(ctx context.Context, username string) (*string, *http.Response, error)

Unlocks a single user that was locked out due to recurrent incorrect login attempts. Since: 4.4 Security: Requires a valid admin user

func (*SecurityService) UnlockedAllUsers

func (s *SecurityService) UnlockedAllUsers(ctx context.Context) (*string, *http.Response, error)

Unlocks all users that were locked out due to recurrent incorrect login attempts. Since: 4.4 Security: Requires a valid admin user

func (*SecurityService) UpdateGroup

func (s *SecurityService) UpdateGroup(ctx context.Context, groupName string, group *Group) (*http.Response, error)

Updates an exiting group in Artifactory with the provided group details. Since: 2.4.0 Notes: Requires Artifactory Pro Security: Requires an admin user

func (*SecurityService) UpdateUser

func (s *SecurityService) UpdateUser(ctx context.Context, username string, user *User) (*http.Response, error)

Updates an exiting user in Artifactory with the provided user details. Since: 2.4.0 Notes: Requires Artifactory Pro Missing values will be set to the default values as defined by the consumed type Security: Requires an admin user

type SingleReplicationConfig

type SingleReplicationConfig struct {
	RepoKey                *string `json:"repoKey,omitempty"`
	URL                    *string `json:"url,omitempty"`
	SocketTimeoutMillis    *int    `json:"socketTimeoutMillis,omitempty"`
	Username               *string `json:"username,omitempty"`
	Password               *string `json:"password,omitempty"`
	Enabled                *bool   `json:"enabled,omitempty"`
	SyncDeletes            *bool   `json:"syncDeletes,omitempty"`
	SyncProperties         *bool   `json:"syncProperties,omitempty"`
	SyncStatistics         *bool   `json:"syncStatistics,omitempty"`
	PathPrefix             *string `json:"pathPrefix,omitempty"`
	CronExp                *string `json:"cronExp,omitempty"` // Only required when getting list of repositories as C*UD operations will be done through a repConfig obj
	EnableEventReplication *bool   `json:"enableEventReplication,omitempty"`
}

SingleReplicationConfig is the model of the Artifactory Replication Config

type Source

type Source struct {
	OriginAbsenceDetection *bool `json:"originAbsenceDetection,omitempty"`
}

type Statistics

type Statistics struct {
	Enabled *bool `json:"enabled,omitempty"`
}

type Status

type Status struct {
	Status  int    `json:"status"`  // Validation error status code
	Message string `json:"message"` // Message describing the error. Errors with Code == "custom" will always have this set.
}

Status is the individual error provided by the API

func (*Status) Error

func (e *Status) Error() string

type SystemService

type SystemService service

func (*SystemService) DeleteHALicenses

func (s *SystemService) DeleteHALicenses(ctx context.Context, licenseHashes HALicenseHashes) (*Status, *http.Response, error)

Deletes a license key from an HA cluster. Since: 5.0.0 Security: Requires an admin user

func (*SystemService) GetConfiguration

func (s *SystemService) GetConfiguration(ctx context.Context) (*string, *http.Response, error)

Get the general configuration (artifactory.config.xml). Since: 2.2.0 Security: Requires a valid admin user

func (*SystemService) GetLicense

func (s *SystemService) GetLicense(ctx context.Context) (*LicenseDetails, *http.Response, error)

Retrieve information about the currently installed license. Since: 3.3.0 Security: Requires a valid admin user

func (*SystemService) GetReverseProxyConfig

func (s *SystemService) GetReverseProxyConfig(ctx context.Context) (*ReverseProxyConfig, *http.Response, error)

Retrieves the reverse proxy configuration Since: 4.3.1 Security: Requires a valid admin user

func (*SystemService) GetReverseProxySnippet

func (s *SystemService) GetReverseProxySnippet(ctx context.Context) (*string, *http.Response, error)

Gets the reverse proxy configuration snippet in text format Since: 4.3.1 Security: Requires a valid user (not anonymous)

func (*SystemService) GetSystemInfo

func (s *SystemService) GetSystemInfo(ctx context.Context) (*string, *http.Response, error)

System Info Get general system information. Since: 2.2.0 Security: Requires a valid admin user

func (*SystemService) GetVersionAndAddons

func (s *SystemService) GetVersionAndAddons(ctx context.Context) (*VersionAddOns, *http.Response, error)

Retrieve information about the current Artifactory version, revision, and currently installed Add-ons Since: 2.2.2 Security: Requires a valid user (can be anonymous)

func (*SystemService) InstallHALicenses

func (s *SystemService) InstallHALicenses(ctx context.Context, licenses []LicenseKey) (*Status, *http.Response, error)

Install a new license key(s) on an HA cluster. Since: 5.0.0 Security: Requires an admin user

func (*SystemService) InstallLicense

func (s *SystemService) InstallLicense(ctx context.Context, licenseKey *LicenseKey) (*Status, *http.Response, error)

Install new license key or change the current one. Since: 3.3.0 Security: Requires a valid admin user

func (*SystemService) ListHALicenses

func (s *SystemService) ListHALicenses(ctx context.Context) (*HALicenses, *http.Response, error)

Retrieve information about the currently installed licenses in an HA cluster. Since: 5.0.0 Security: Requires a valid admin user

func (*SystemService) Ping

func (s *SystemService) Ping(ctx context.Context) (*string, *http.Response, error)

Get a simple status response about the state of Artifactory Returns 200 code with an 'OK' text if Artifactory is working properly, if not will return an HTTP error code with a reason. Since: 2.3.0 Security: Requires a valid user (can be anonymous). If artifactory.ping.allowUnauthenticated=true is set in

artifactory.system.properties, then no authentication is required even if anonymous access is disabled.

func (*SystemService) UpdateReverseProxyConfig

func (s *SystemService) UpdateReverseProxyConfig(ctx context.Context, config *ReverseProxyConfig) (*http.Response, error)

Updates the reverse proxy configuration Since: 4.3.1 Security: Requires an admin user

func (*SystemService) UpdateUrlBase

func (s *SystemService) UpdateUrlBase(ctx context.Context, newUrl string) (*http.Response, error)

Changes the Custom URL base Since: 3.9.0 Security: Requires a valid admin user

func (*SystemService) VerifyConnection

func (s *SystemService) VerifyConnection(ctx context.Context, opt *VerifyConnectionOptions) (*string, *http.Response, error)

Verifies a two-way connection between Artifactory and another product Returns Success (200) if Artifactory receives a similar success code (200) from the provided endpoint. Upon error, returns 400 along with a JSON object that contains the error returned from the other system. Since: 4.15.0 Security: Requires an admin user.

type TokenAuthTransport

type TokenAuthTransport struct {
	Token     string
	Transport http.RoundTripper
}

TokenAuthTransport exposes a HTTP client which uses this transport. It authenticates via an Artifactory API token It also adds the correct headers to the request

func (*TokenAuthTransport) Client

func (t *TokenAuthTransport) Client() *http.Client

Client returns a HTTP client and injects the token auth transport

func (*TokenAuthTransport) RoundTrip

func (t *TokenAuthTransport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip allows us to add headers to every request

type User

type User struct {
	Name                     *string   `json:"name,omitempty"`                     // Optional element in create/replace queries
	Email                    *string   `json:"email,omitempty"`                    // Mandatory element in create/replace queries, optional in "update" queries
	Password                 *string   `json:"password,omitempty"`                 // Mandatory element in create/replace queries, optional in "update" queries
	Admin                    *bool     `json:"admin,omitempty"`                    // Optional element in create/replace queries; Default: false
	ProfileUpdatable         *bool     `json:"profileUpdatable,omitempty"`         // Optional element in create/replace queries; Default: true
	DisableUIAccess          *bool     `json:"disableUIAccess,omitempty"`          // Optional element in create/replace queries; Default: false
	InternalPasswordDisabled *bool     `json:"internalPasswordDisabled,omitempty"` // Optional element in create/replace queries; Default: false
	LastLoggedIn             *string   `json:"lastLoggedIn,omitempty"`             // Read-only element
	Realm                    *string   `json:"realm,omitempty"`                    // Read-only element
	Groups                   *[]string `json:"groups,omitempty"`                   // Optional element in create/replace queries
}

application/vnd.org.jfrog.artifactory.security.User+json

func (User) String

func (r User) String() string

type UserDetails

type UserDetails struct {
	Name  *string `json:"name,omitempty"`
	Uri   *string `json:"uri,omitempty"`
	Realm *string `json:"realm,omitempty"`
}

func (UserDetails) String

func (r UserDetails) String() string

type UserLockPolicy

type UserLockPolicy struct {
	Enabled       *bool `json:"enabled,omitempty"`
	LoginAttempts *int  `json:"loginAttempts,omitempty"`
}

type VerifyConnectionOptions

type VerifyConnectionOptions struct {
	Endpoint *string `json:"endpoint,omitempty"` // Mandatory
	Username *string `json:"username,omitempty"` // Optional
	Password *string `json:"password,omitempty"` // Optional
}

type VersionAddOns

type VersionAddOns struct {
	Version  *string   `json:"version,omitempty"`
	Revision *string   `json:"revision,omitempty"`
	Addons   *[]string `json:"addons,omitempty"`
}

func (VersionAddOns) String

func (r VersionAddOns) String() string

type VirtualRepository

type VirtualRepository struct {
	Key                                           *string   `json:"key,omitempty"`
	RClass                                        *string   `json:"rclass,omitempty"` // Mandatory element in create/replace queries (optional in "update" queries)
	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"`
	ArtifactoryRequestsCanRetrieveRemoteArtifacts *bool     `json:"artifactoryRequestsCanRetrieveRemoteArtifacts,omitempty"`
	DebianTrivialLayout                           *bool     `json:"debianTrivialLayout,omitempty"`
	DefaultDeploymentRepo                         *string   `json:"defaultDeploymentRepo,omitempty"`
	DockerApiVersion                              *string   `json:"dockerApiVersion,omitempty"`
	EnableBowerSupport                            *bool     `json:"enableBowerSupport,omitempty"`
	EnableCocoaPodsSupport                        *bool     `json:"enableCocoaPodsSupport,omitempty"`
	EnableConanSupport                            *bool     `json:"enableConanSupport,omitempty"`
	EnableComposerSupport                         *bool     `json:"enableComposerSupport,omitempty"`
	EnabledChefSupport                            *bool     `json:"enabledChefSupport,omitempty"`
	EnableDebianSupport                           *bool     `json:"enableDebianSupport,omitempty"`
	EnableDistRepoSupport                         *bool     `json:"enableDistRepoSupport,omitempty"`
	EnableDockerSupport                           *bool     `json:"enableDockerSupport,omitempty"`
	EnableGemsSupport                             *bool     `json:"enableGemsSupport,omitempty"`
	EnableGitLfsSupport                           *bool     `json:"enableGitLfsSupport,omitempty"`
	EnableNpmSupport                              *bool     `json:"enableNpmSupport,omitempty"`
	EnableNuGetSupport                            *bool     `json:"enableNuGetSupport,omitempty"`
	EnablePuppetSupport                           *bool     `json:"enablePuppetSupport,omitempty"`
	EnablePypiSupport                             *bool     `json:"enablePypiSupport,omitempty"`
	EnableVagrantSupport                          *bool     `json:"enableVagrantSupport,omitempty"`
	ExternalDependenciesEnabled                   *bool     `json:"externalDependenciesEnabled,omitempty"`
	ForceNugetAuthentication                      *bool     `json:"forceNugetAuthentication,omitempty"`
	KeyPair                                       *string   `json:"keyPair,omitempty"`
	PomRepositoryReferencesCleanupPolicy          *string   `json:"pomRepositoryReferencesCleanupPolicy,omitempty"`
	Repositories                                  *[]string `json:"repositories,omitempty"`
	VirtualRetrievalCachePeriodSecs               *int      `json:"virtualRetrievalCachePeriodSecs,omitempty"`
}

func (VirtualRepository) String

func (r VirtualRepository) String() string

Jump to

Keyboard shortcuts

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