artifactory

package
v2.25.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PERM_READ     = "read"
	PERM_WRITE    = "write"
	PERM_ANNOTATE = "annotate"
	PERM_DELETE   = "delete"
	PERM_MANAGE   = "manage"

	PERMISSION_SCHEMA = "application/vnd.org.jfrog.artifactory.security.PermissionTargetV2+json"
)

Variables

View Source
var Version = "2.6.18"

Version for some reason isn't getting updated by the linker

Functions

func BoolPtr

func BoolPtr(v bool) *bool

func FileExists

func FileExists(path string) bool

func Int64Ptr

func Int64Ptr(v int64) *int64

func IntPtr

func IntPtr(v int) *int

func Provider

func Provider() *schema.Provider

Provider Artifactory provider that supports configuration via username+password or a token Supported resources are repos, users, groups, replications, and permissions

func StringPtr

func StringPtr(v string) *string

func VerifySha256Checksum

func VerifySha256Checksum(path string, expectedSha256 string) (bool, error)

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"`
}

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"` // [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 AccessTokenRevokeOptions

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

AccessTokenRevokeOptions jfrog client go has no v1 code and moving to v2 would be a lot of work. To remove the dependency, we copy and past it here

type ApiKey

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

type AutoMapper

type AutoMapper func(field reflect.StructField, thing reflect.Value) map[string]interface{}

type Backup added in v2.20.2

type Backup struct {
	Key                    string   `xml:"key" yaml:"key"`
	CronExp                string   `xml:"cronExp" yaml:"cronExp"`
	Enabled                bool     `xml:"enabled" yaml:"enabled"`
	RetentionPeriodHours   int      `xml:"retentionPeriodHours" yaml:"retentionPeriodHours"`
	ExcludedRepositories   []string `xml:"excludedRepositories>repositoryRef" yaml:"excludedRepositories"`
	CreateArchive          bool     `xml:"createArchive" yaml:"createArchive"`
	ExcludeNewRepositories bool     `xml:"excludeNewRepositories" yaml:"excludeNewRepositories"`
	SendMailOnError        bool     `xml:"sendMailOnError" yaml:"sendMailOnError"`
}

type Backups added in v2.20.2

type Backups struct {
	BackupArr []Backup `xml:"backups>backup" yaml:"backup"`
}

type BaseWebhookCriteria added in v2.18.0

type BaseWebhookCriteria struct {
	IncludePatterns []string `json:"includePatterns"`
	ExcludePatterns []string `json:"excludePatterns"`
}

type BlockDownloadSettings

type BlockDownloadSettings struct {
	Unscanned *bool `json:"unscanned,omitempty"`
	Active    *bool `json:"active,omitempty"`
}

type BowerRemoteRepo added in v2.24.0

type BowerRemoteRepo struct {
	RemoteRepositoryBaseParams
	RemoteRepositoryVcsParams
	BowerRegistryUrl string `json:"bowerRegistryUrl"`
}

type BowerRemoteRepositoryParams

type BowerRemoteRepositoryParams struct {
	RemoteRepositoryBaseParams
	BowerRegistryUrl string `json:"bowerRegistryUrl,omitempty"`
}

type BuildWebhookCriteria added in v2.18.0

type BuildWebhookCriteria struct {
	BaseWebhookCriteria
	AnyBuild       bool     `json:"anyBuild"`
	SelectedBuilds []string `json:"selectedBuilds"`
}

type CargoRemoteRepo

type CargoRemoteRepo struct {
	RemoteRepositoryBaseParams
	RegistryUrl     string `hcl:"git_registry_url" json:"gitRegistryUrl"`
	AnonymousAccess bool   `hcl:"anonymous_access" json:"cargoAnonymousAccess"`
}

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"`
}

CertificateDetails this type doesn't even exist in the new go client. In fact, the whole API call doesn't

type Checksums

type Checksums struct {
	Md5    string `json:"md5,omitempty"`
	Sha1   string `json:"sha1,omitempty"`
	Sha256 string `json:"sha256,omitempty"`
}

type CocoapodsRemoteRepo added in v2.24.0

type CocoapodsRemoteRepo struct {
	RemoteRepositoryBaseParams
	RemoteRepositoryVcsParams
	PodsSpecsRepoUrl string `json:"podsSpecsRepoUrl"`
}

type CommonJavaVirtualRepositoryParams added in v2.25.0

type CommonJavaVirtualRepositoryParams struct {
	ForceMavenAuthentication             bool   `json:"forceMavenAuthentication,omitempty"`
	PomRepositoryReferencesCleanupPolicy string `hcl:"pom_repository_references_cleanup_policy" json:"pomRepositoryReferencesCleanupPolicy,omitempty"`
	KeyPair                              string `hcl:"key_pair" json:"keyPair,omitempty"`
}

type CommonMavenGradleLocalRepositoryParams

type CommonMavenGradleLocalRepositoryParams struct {
	MaxUniqueSnapshots           int    `hcl:"max_unique_snapshots" json:"maxUniqueSnapshots,omitempty"`
	HandleReleases               *bool  `hcl:"handle_releases" json:"handleReleases,omitempty"`
	HandleSnapshots              *bool  `hcl:"handle_snapshots" json:"handleSnapshots,omitempty"`
	SuppressPomConsistencyChecks *bool  `hcl:"suppress_pom_consistency_checks" json:"suppressPomConsistencyChecks,omitempty"`
	SnapshotVersionBehavior      string `hcl:"snapshot_version_behavior" json:"snapshotVersionBehavior,omitempty"`
	ChecksumPolicyType           string `hcl:"checksum_policy_type" json:"checksumPolicyType,omitempty"`
}

type CommonMavenGradleRemoteRepository

type CommonMavenGradleRemoteRepository struct {
	FetchJarsEagerly             *bool  `hcl:"fetch_jars_eagerly" json:"fetchJarsEagerly,omitempty"`
	FetchSourcesEagerly          *bool  `hcl:"fetch_sources_eagerly" json:"fetchSourcesEagerly,omitempty"`
	RemoteRepoChecksumPolicyType string `hcl:"remote_repo_checksum_policy_type" json:"remoteRepoChecksumPolicyType,omitempty"`
	ListRemoteFolderItems        *bool  `hcl:"list_remote_folder_items" json:"listRemoteFolderItems,omitempty"`
	HandleReleases               *bool  `hcl:"handle_releases" json:"handleReleases,omitempty"`
	HandleSnapshots              *bool  `hcl:"handle_snapshots" json:"handleSnapshots,omitempty"`
	SuppressPomConsistencyChecks *bool  `hcl:"suppress_pom_consistency_checks" json:"suppressPomConsistencyChecks,omitempty"`
	RejectInvalidJars            *bool  `hcl:"reject_invalid_jars" json:"rejectInvalidJars,omitempty"`
}

CommonMavenGradleRemoteRepository move this to maven dedicated remote

type ComposerRemoteRepo added in v2.24.0

type ComposerRemoteRepo struct {
	RemoteRepositoryBaseParams
	RemoteRepositoryVcsParams
	ComposerRegistryUrl string `json:"composerRegistryUrl"`
}

type Constructor

type Constructor func() interface{}

Constructor Must return a pointer to a struct. When just returning a struct, resty gets confused and thinks it's a map

type ContentSynchronisation

type ContentSynchronisation struct {
	Enabled    bool                             `json:"enabled"`
	Statistics ContentSynchronisationStatistics `json:"statistics"`
	Properties ContentSynchronisationProperties `json:"properties"`
	Source     ContentSynchronisationSource     `json:"source"`
}

type ContentSynchronisationProperties added in v2.14.0

type ContentSynchronisationProperties struct {
	Enabled bool `hcl:"properties_enabled" json:"enabled"`
}

type ContentSynchronisationSource added in v2.14.0

type ContentSynchronisationSource struct {
	OriginAbsenceDetection bool `hcl:"source_origin_absence_detection" json:"originAbsenceDetection"`
}

type ContentSynchronisationStatistics added in v2.14.0

type ContentSynchronisationStatistics struct {
	Enabled bool `hcl:"statistics_enabled" json:"enabled"`
}

type DebianVirtualRepositoryParams

type DebianVirtualRepositoryParams struct {
	VirtualRepositoryBaseParams
	DebianTrivialLayout *bool `json:"debianTrivialLayout,omitempty"`
}

type DockerLocalRepositoryParams

type DockerLocalRepositoryParams struct {
	LocalRepositoryBaseParams
	MaxUniqueTags       int    `hcl:"max_unique_tags" json:"maxUniqueTags,omitempty"`
	DockerApiVersion    string `hcl:"api_version" json:"dockerApiVersion"`
	TagRetention        int    `hcl:"tag_retention" json:"dockerTagRetention"`
	BlockPushingSchema1 bool   `hcl:"block_pushing_schema1" json:"blockPushingSchema1"`
}

type DockerRemoteRepository

type DockerRemoteRepository struct {
	RemoteRepositoryBaseParams
	ExternalDependenciesEnabled  bool     `hcl:"external_dependencies_enabled" json:"externalDependenciesEnabled"`
	ExternalDependenciesPatterns []string `hcl:"external_dependencies_patterns" json:"externalDependenciesPatterns"`
	EnableTokenAuthentication    bool     `hcl:"enable_token_authentication" json:"enableTokenAuthentication"`
	BlockPushingSchema1          bool     `hcl:"block_pushing_schema1" json:"blockPushingSchema1"`
}

type FileInfo

type FileInfo struct {
	Repo              string    `json:"repo,omitempty"`
	Path              string    `json:"path,omitempty"`
	Created           string    `json:"created,omitempty"`
	CreatedBy         string    `json:"createdBy,omitempty"`
	LastModified      string    `json:"lastModified,omitempty"`
	ModifiedBy        string    `json:"modifiedBy,omitempty"`
	LastUpdated       string    `json:"lastUpdated,omitempty"`
	DownloadUri       string    `json:"downloadUri,omitempty"`
	MimeType          string    `json:"mimeType,omitempty"`
	Size              int       `json:"size,string,omitempty"`
	Checksums         Checksums `json:"checksums,omitempty"`
	OriginalChecksums Checksums `json:"originalChecksums,omitempty"`
	Uri               string    `json:"uri,omitempty"`
}

func (FileInfo) Id added in v2.23.0

func (fi FileInfo) Id() string

type GeneralSecurity

type GeneralSecurity struct {
	GeneralSettings `yaml:"security" json:"security"`
}

type GeneralSettings

type GeneralSettings struct {
	AnonAccessEnabled bool `yaml:"anonAccessEnabled" json:"anonAccessEnabled"`
}

type GetPushReplication added in v2.22.0

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

type GetReplicationConfig added in v2.22.0

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

type GoRemoteRepo added in v2.24.0

type GoRemoteRepo struct {
	RemoteRepositoryBaseParams
	VcsGitProvider string `json:"vcsGitProvider"`
}

type Group

type Group struct {
	Name            string   `json:"name,omitempty"`
	Description     string   `json:"description,omitempty"`
	AutoJoin        bool     `json:"autoJoin,omitempty"`
	AdminPrivileges bool     `json:"adminPrivileges,omitempty"`
	Realm           string   `json:"realm,omitempty"`
	RealmAttributes string   `json:"realmAttributes,omitempty"`
	UsersNames      []string `json:"userNames"`
	WatchManager    bool     `json:"watchManager"`
	PolicyManager   bool     `json:"policyManager"`
	ReportsManager  bool     `json:"reportsManager"`
}

Group is a encoding struct to match https://www.jfrog.com/confluence/display/JFROG/Security+Configuration+JSON#SecurityConfigurationJSON-application/vnd.org.jfrog.artifactory.security.Group+json

func (Group) Id

func (g Group) Id() string

type HclPredicate

type HclPredicate func(hcl string) bool

type Identifiable

type Identifiable interface {
	Id() string
}

type JavaVirtualRepositoryParams added in v2.25.0

type JavaVirtualRepositoryParams struct {
	VirtualRepositoryBaseParams
	CommonJavaVirtualRepositoryParams
}

type KeyPairPayLoad

type KeyPairPayLoad struct {
	PairName    string `hcl:"pair_name" json:"pairName"`
	PairType    string `hcl:"pair_type" json:"pairType"`
	Alias       string `hcl:"alias" json:"alias"`
	PrivateKey  string `hcl:"private_key" json:"privateKey"`
	Passphrase  string `hcl:"passphrase" json:"passphrase"`
	PublicKey   string `hcl:"public_key" json:"publicKey"`
	Unavailable bool   `hcl:"unavailable" json:"unavailable"`
}

func (KeyPairPayLoad) Id

func (kp KeyPairPayLoad) Id() string

type LdapGroupSetting

type LdapGroupSetting struct {
	Name                 string `xml:"name" yaml:"name"`
	EnabledLdap          string `xml:"enabledLdap" yaml:"enabledLdap"`
	GroupBaseDn          string `xml:"groupBaseDn" yaml:"groupBaseDn"`
	GroupNameAttribute   string `xml:"groupNameAttribute" yaml:"groupNameAttribute"`
	GroupMemberAttribute string `xml:"groupMemberAttribute" yaml:"groupMemberAttribute"`
	SubTree              bool   `xml:"subTree" yaml:"subTree"`
	Filter               string `xml:"filter" yaml:"filter"`
	DescriptionAttribute string `xml:"descriptionAttribute" yaml:"descriptionAttribute"`
	Strategy             string `xml:"strategy" yaml:"strategy"`
}

type LdapGroupSettings

type LdapGroupSettings struct {
	LdapGroupSettingArr []LdapGroupSetting `xml:"ldapGroupSetting" yaml:"ldapGroupSetting"`
}

type LdapSearchType

type LdapSearchType struct {
	SearchSubTree   bool   `xml:"searchSubTree" yaml:"searchSubTree" `
	SearchFilter    string `xml:"searchFilter" yaml:"searchFilter"`
	SearchBase      string `xml:"searchBase" yaml:"searchBase"`
	ManagerDn       string `xml:"managerDn" yaml:"managerDn"`
	ManagerPassword string `xml:"managerPassword" yaml:"managerPassword"`
}

type LdapSetting

type LdapSetting struct {
	Key                      string         `xml:"key" yaml:"key"`
	Enabled                  bool           `xml:"enabled" yaml:"enabled"`
	LdapUrl                  string         `xml:"ldapUrl" yaml:"ldapUrl"`
	UserDnPattern            string         `xml:"userDnPattern" yaml:"userDnPattern"`
	EmailAttribute           string         `xml:"emailAttribute" yaml:"emailAttribute"`
	AutoCreateUser           bool           `xml:"autoCreateUser" yaml:"autoCreateUser"`
	LdapPoisoningProtection  bool           `xml:"ldapPoisoningProtection" yaml:"ldapPoisoningProtection"`
	AllowUserToAccessProfile bool           `xml:"allowUserToAccessProfile" yaml:"allowUserToAccessProfile"`
	PagingSupportEnabled     bool           `xml:"pagingSupportEnabled" yaml:"pagingSupportEnabled"`
	Search                   LdapSearchType `xml:"search" yaml:"search"`
}

type LdapSettings

type LdapSettings struct {
	LdapSettingArr []LdapSetting `xml:"ldapSetting" yaml:"ldapSetting"`
}

type Lens

type Lens func(key string, value interface{}) []error

type LocalRepositoryBaseParams

type LocalRepositoryBaseParams struct {
	Key                    string   `hcl:"key" json:"key,omitempty"`
	ProjectKey             string   `json:"projectKey"`
	ProjectEnvironments    []string `json:"environments"`
	Rclass                 string   `json:"rclass"`
	PackageType            string   `hcl:"package_type" json:"packageType,omitempty"`
	Description            string   `hcl:"description" json:"description,omitempty"`
	Notes                  string   `hcl:"notes" json:"notes,omitempty"`
	IncludesPattern        string   `hcl:"includes_pattern" json:"includesPattern,omitempty"`
	ExcludesPattern        string   `hcl:"excludes_pattern" json:"excludesPattern,omitempty"`
	RepoLayoutRef          string   `hcl:"repo_layout_ref" json:"repoLayoutRef,omitempty"`
	BlackedOut             *bool    `hcl:"blacked_out" json:"blackedOut,omitempty"`
	XrayIndex              bool     `json:"xrayIndex"`
	PropertySets           []string `hcl:"property_sets" json:"propertySets,omitempty"`
	ArchiveBrowsingEnabled *bool    `hcl:"archive_browsing_enabled" json:"archiveBrowsingEnabled,omitempty"`
	DownloadRedirect       *bool    `hcl:"download_direct" json:"downloadRedirect,omitempty"`
	PriorityResolution     bool     `hcl:"priority_resolution" json:"priorityResolution"`
}

func (LocalRepositoryBaseParams) Id

type MessyDebianLocalRepositoryParams

type MessyDebianLocalRepositoryParams struct {
	LocalRepositoryBaseParams
	DebianTrivialLayout *bool `hcl:"debian_trivial_layout" json:"debianTrivialLayout,omitempty"`
}

type MessyLocalRepo

type MessyLocalRepo struct {
	LocalRepositoryBaseParams
	CommonMavenGradleLocalRepositoryParams
	MessyDebianLocalRepositoryParams
	DockerLocalRepositoryParams
	RpmLocalRepositoryParams
	ForceNugetAuthentication bool `hcl:"force_nuget_authentication" json:"forceNugetAuthentication"`
}

type MessyRemoteRepo

type MessyRemoteRepo struct {
	BowerRemoteRepositoryParams
	CommonMavenGradleRemoteRepository
	DockerRemoteRepository
	VcsRemoteRepositoryParams
	PypiRemoteRepositoryParams
	NugetRemoteRepositoryParams
	Key                               string                  `hcl:"key" json:"key,omitempty"`
	ProjectKey                        string                  `json:"projectKey"`
	ProjectEnvironments               []string                `json:"environments"`
	Rclass                            string                  `json:"rclass"`
	PackageType                       string                  `hcl:"package_type" json:"packageType,omitempty"`
	Url                               string                  `hcl:"url" json:"url"`
	Username                          string                  `hcl:"username" json:"username,omitempty"`
	Password                          string                  `hcl:"password" json:"password,omitempty"`
	Proxy                             string                  `hcl:"proxy" json:"proxy"`
	Description                       string                  `hcl:"description" json:"description,omitempty"`
	Notes                             string                  `hcl:"notes" json:"notes,omitempty"`
	IncludesPattern                   string                  `hcl:"includes_pattern" json:"includesPattern,omitempty"`
	ExcludesPattern                   string                  `hcl:"excludes_pattern" json:"excludesPattern,omitempty"`
	RepoLayoutRef                     string                  `hcl:"repo_layout_ref" json:"repoLayoutRef,omitempty"`
	RemoteRepoLayoutRef               string                  `json:"remoteRepoLayoutRef"`
	HardFail                          *bool                   `hcl:"hard_fail" json:"hardFail,omitempty"`
	Offline                           *bool                   `hcl:"offline" json:"offline,omitempty"`
	BlackedOut                        *bool                   `hcl:"blacked_out" json:"blackedOut,omitempty"`
	XrayIndex                         bool                    `json:"xrayIndex"`
	PropagateQueryParams              bool                    `hcl:"propagate_query_params" json:"propagateQueryParams"`
	PriorityResolution                bool                    `hcl:"priority_resolution" json:"priorityResolution"`
	StoreArtifactsLocally             *bool                   `hcl:"store_artifacts_locally" json:"storeArtifactsLocally,omitempty"`
	SocketTimeoutMillis               int                     `hcl:"socket_timeout_millis" json:"socketTimeoutMillis,omitempty"`
	LocalAddress                      string                  `hcl:"local_address" json:"localAddress,omitempty"`
	RetrievalCachePeriodSecs          int                     `hcl:"retrieval_cache_period_seconds" json:"retrievalCachePeriodSecs,omitempty"`
	FailedRetrievalCachePeriodSecs    int                     `json:"failedRetrievalCachePeriodSecs,omitempty"`
	MissedRetrievalCachePeriodSecs    int                     `hcl:"missed_cache_period_seconds" json:"missedRetrievalCachePeriodSecs"`
	UnusedArtifactsCleanupEnabled     *bool                   `hcl:"unused_artifacts_cleanup_period_enabled" json:"unusedArtifactsCleanupEnabled,omitempty"`
	UnusedArtifactsCleanupPeriodHours int                     `hcl:"unused_artifacts_cleanup_period_hours" json:"unusedArtifactsCleanupPeriodHours,omitempty"`
	AssumedOfflinePeriodSecs          int                     `hcl:"assumed_offline_period_secs" json:"assumedOfflinePeriodSecs,omitempty"`
	ShareConfiguration                *bool                   `hcl:"share_configuration" json:"shareConfiguration,omitempty"`
	SynchronizeProperties             *bool                   `hcl:"synchronize_properties" json:"synchronizeProperties,omitempty"`
	BlockMismatchingMimeTypes         *bool                   `hcl:"block_mismatching_mime_types" json:"blockMismatchingMimeTypes,omitempty"`
	PropertySets                      []string                `hcl:"property_sets" json:"propertySets,omitempty"`
	AllowAnyHostAuth                  *bool                   `hcl:"allow_any_host_auth" json:"allowAnyHostAuth,omitempty"`
	EnableCookieManagement            *bool                   `hcl:"enable_cookie_management" json:"enableCookieManagement,omitempty"`
	BypassHeadRequests                *bool                   `hcl:"bypass_head_requests" json:"bypassHeadRequests,omitempty"`
	ClientTlsCertificate              string                  `hcl:"client_tls_certificate" json:"clientTlsCertificate,omitempty"`
	ContentSynchronisation            *ContentSynchronisation `hcl:"content_synchronisation" json:"contentSynchronisation,omitempty"`
}

func (MessyRemoteRepo) Id

func (mr MessyRemoteRepo) Id() string

type NugetRemoteRepo added in v2.24.0

type NugetRemoteRepo struct {
	RemoteRepositoryBaseParams
	FeedContextPath          string `json:"feedContextPath"`
	DownloadContextPath      string `json:"downloadContextPath"`
	V3FeedUrl                string `hcl:"v3_feed_url" json:"v3FeedUrl"` // Forced to specify hcl tag because predicate is not parsed by universalPack function.
	ForceNugetAuthentication bool   `json:"forceNugetAuthentication"`
}

type NugetRemoteRepositoryParams

type NugetRemoteRepositoryParams struct {
	RemoteRepositoryBaseParams
	FeedContextPath          string `hcl:"feed_context_path" json:"feedContextPath,omitempty"`
	DownloadContextPath      string `hcl:"download_context_path" json:"downloadContextPath,omitempty"`
	V3FeedUrl                string `hcl:"v3_feed_url" json:"v3FeedUrl,omitempty"`
	ForceNugetAuthentication *bool  `hcl:"force_nuget_authentication" json:"forceNugetAuthentication,omitempty"`
}

type NugetVirtualRepositoryParams

type NugetVirtualRepositoryParams struct {
	VirtualRepositoryBaseParams
	ForceNugetAuthentication *bool `json:"forceNugetAuthentication,omitempty"`
}

type OauthProviderSettings

type OauthProviderSettings struct {
	Name         string `json:"name"`
	Enabled      bool   `yaml:"enabled" json:"enabled"`
	Type         string `yaml:"providerType" json:"providerType"`
	ClientId     string `yaml:"id" json:"id"`
	ClientSecret string `yaml:"secret" json:"secret"`
	ApiUrl       string `yaml:"apiUrl" json:"apiUrl"`
	AuthUrl      string `yaml:"authUrl" json:"authUrl"`
	TokenUrl     string `yaml:"tokenUrl" json:"tokenUrl"`
}

type OauthSecurity

type OauthSecurity struct {
	Oauth OauthSettingsWrapper `yaml:"security"`
}

type OauthSettings

type OauthSettings struct {
	EnableIntegration        bool                             `yaml:"enableIntegration" json:"enabled"`
	PersistUsers             bool                             `yaml:"persistUsers" json:"persistUsers"`
	AllowUserToAccessProfile bool                             `yaml:"allowUserToAccessProfile" json:"allowUserToAccessProfile"`
	OauthProvidersSettings   map[string]OauthProviderSettings `yaml:"oauthProvidersSettings"`
	AvailableTypes           []OauthType                      `json:"availableTypes"`
	Providers                []OauthProviderSettings          `json:"providers"`
}

type OauthSettingsWrapper

type OauthSettingsWrapper struct {
	Settings OauthSettings `yaml:"oauthSettings"`
}

type OauthType

type OauthType struct {
	DisplayName     string
	Type            string
	MandatoryFields []string
	FieldHolders    []string
	FieldValues     []string
}

type PackFunc

type PackFunc func(repo interface{}, d *schema.ResourceData) error

type Policy

type Policy struct {
	Name        *string       `json:"name,omitempty"`
	Type        *string       `json:"type,omitempty"`
	Author      *string       `json:"author,omitempty"`
	Description *string       `json:"description,omitempty"`
	Rules       *[]PolicyRule `json:"rules,omitempty"`
	Created     *string       `json:"created,omitempty"`
	Modified    *string       `json:"modified,omitempty"`
}

type PolicyCVSSRange

type PolicyCVSSRange struct {
	To   *int `json:"to,omitempty"`
	From *int `json:"from,omitempty"`
}

PolicyCVSSRange All of this was ripped out of it's original location and copied here. The original provider code used th v1 API, which is not supported in the JFROG go client The current objective is to rip out any dependencies not from jfrog. So, jfrog doesn't support it I need backward compatibility, and I can't have any other dependencies.

type PolicyRule

type PolicyRule struct {
	Name     *string             `json:"name,omitempty"`
	Priority *int                `json:"priority,omitempty"`
	Criteria *PolicyRuleCriteria `json:"criteria,omitempty"`
	Actions  *PolicyRuleActions  `json:"actions,omitempty"`
}

type PolicyRuleActions

type PolicyRuleActions struct {
	Mails          *[]string              `json:"mails,omitempty"`
	FailBuild      *bool                  `json:"fail_build,omitempty"`
	BlockDownload  *BlockDownloadSettings `json:"block_download,omitempty"`
	Webhooks       *[]string              `json:"webhooks,omitempty"`
	CustomSeverity *string                `json:"custom_severity,omitempty"`
}

type PolicyRuleCriteria

type PolicyRuleCriteria struct {
	// Security Criteria
	MinimumSeverity *string          `json:"min_severity,omitempty"`
	CVSSRange       *PolicyCVSSRange `json:"cvss_range,omitempty"`

	// License Criteria
	AllowUnknown    *bool     `json:"allow_unknown,omitempty"`
	BannedLicenses  *[]string `json:"banned_licenses,omitempty"`
	AllowedLicenses *[]string `json:"allowed_licenses,omitempty"`
}

type PullReplication

type PullReplication struct {
	Enabled                bool   `json:"enabled"`
	CronExp                string `json:"cronExp"`
	SyncDeletes            bool   `json:"syncDeletes"`
	SyncProperties         bool   `json:"syncProperties"`
	PathPrefix             string `json:"pathPrefix"`
	RepoKey                string `json:"repoKey"`
	ReplicationKey         string `json:"replicationKey"`
	EnableEventReplication bool   `json:"enableEventReplication"`
	Username               string `json:"username"`
	URL                    string `json:"url"`
}

PullReplication this is the structure for a PULL replication on a remote repo

type PypiRemoteRepositoryParams

type PypiRemoteRepositoryParams struct {
	RemoteRepositoryBaseParams
	ListRemoteFolderItems *bool  `hcl:"list_remote_folder_items" json:"listRemoteFolderItems,omitempty"`
	PypiRegistryUrl       string `hcl:"pypi_registry_url" json:"pypiRegistryUrl,omitempty"`
}

type ReadFunc

type ReadFunc func(d *schema.ResourceData, m interface{}) error

type ReleaseBundleWebhookCriteria added in v2.18.0

type ReleaseBundleWebhookCriteria struct {
	BaseWebhookCriteria
	AnyReleaseBundle              bool     `json:"anyReleaseBundle"`
	RegisteredReleaseBundlesNames []string `json:"registeredReleaseBundlesNames"`
}

type RemoteRepositoryBaseParams

type RemoteRepositoryBaseParams struct {
	Key                      string   `hcl:"key" json:"key,omitempty"`
	ProjectKey               string   `json:"projectKey"`
	ProjectEnvironments      []string `json:"environments"`
	Rclass                   string   `json:"rclass"`
	PackageType              string   `hcl:"package_type" json:"packageType,omitempty"`
	Url                      string   `hcl:"url" json:"url"`
	Username                 string   `hcl:"username" json:"username,omitempty"`
	Password                 string   `hcl:"password" json:"password,omitempty"`
	Proxy                    string   `hcl:"proxy" json:"proxy"`
	Description              string   `hcl:"description" json:"description,omitempty"`
	Notes                    string   `hcl:"notes" json:"notes,omitempty"`
	IncludesPattern          string   `hcl:"includes_pattern" json:"includesPattern,omitempty"`
	ExcludesPattern          string   `hcl:"excludes_pattern" json:"excludesPattern,omitempty"`
	RepoLayoutRef            string   `hcl:"repo_layout_ref" json:"repoLayoutRef,omitempty"`
	RemoteRepoLayoutRef      string   `json:"remoteRepoLayoutRef"`
	HardFail                 *bool    `hcl:"hard_fail" json:"hardFail,omitempty"`
	Offline                  *bool    `hcl:"offline" json:"offline,omitempty"`
	BlackedOut               *bool    `hcl:"blacked_out" json:"blackedOut,omitempty"`
	XrayIndex                bool     `json:"xrayIndex"`
	PropagateQueryParams     bool     `hcl:"propagate_query_params" json:"propagateQueryParams"`
	PriorityResolution       bool     `hcl:"priority_resolution" json:"priorityResolution"`
	StoreArtifactsLocally    *bool    `hcl:"store_artifacts_locally" json:"storeArtifactsLocally,omitempty"`
	SocketTimeoutMillis      int      `hcl:"socket_timeout_millis" json:"socketTimeoutMillis,omitempty"`
	LocalAddress             string   `hcl:"local_address" json:"localAddress,omitempty"`
	RetrievalCachePeriodSecs int      `hcl:"retrieval_cache_period_seconds" json:"retrievalCachePeriodSecs,omitempty"`
	// doesn't appear in the body when calling get. Hence no HCL
	FailedRetrievalCachePeriodSecs    int                     `json:"failedRetrievalCachePeriodSecs,omitempty"`
	MissedRetrievalCachePeriodSecs    int                     `hcl:"missed_cache_period_seconds" json:"missedRetrievalCachePeriodSecs"`
	UnusedArtifactsCleanupEnabled     *bool                   `hcl:"unused_artifacts_cleanup_period_enabled" json:"unusedArtifactsCleanupEnabled,omitempty"`
	UnusedArtifactsCleanupPeriodHours int                     `hcl:"unused_artifacts_cleanup_period_hours" json:"unusedArtifactsCleanupPeriodHours,omitempty"`
	AssumedOfflinePeriodSecs          int                     `hcl:"assumed_offline_period_secs" json:"assumedOfflinePeriodSecs,omitempty"`
	ShareConfiguration                *bool                   `hcl:"share_configuration" json:"shareConfiguration,omitempty"`
	SynchronizeProperties             *bool                   `hcl:"synchronize_properties" json:"synchronizeProperties,omitempty"`
	BlockMismatchingMimeTypes         *bool                   `hcl:"block_mismatching_mime_types" json:"blockMismatchingMimeTypes,omitempty"`
	PropertySets                      []string                `hcl:"property_sets" json:"propertySets,omitempty"`
	AllowAnyHostAuth                  *bool                   `hcl:"allow_any_host_auth" json:"allowAnyHostAuth,omitempty"`
	EnableCookieManagement            *bool                   `hcl:"enable_cookie_management" json:"enableCookieManagement,omitempty"`
	BypassHeadRequests                *bool                   `hcl:"bypass_head_requests" json:"bypassHeadRequests,omitempty"`
	ClientTlsCertificate              string                  `hcl:"client_tls_certificate" json:"clientTlsCertificate,omitempty"`
	ContentSynchronisation            *ContentSynchronisation `hcl:"content_synchronisation" json:"contentSynchronisation,omitempty"`
	MismatchingMimeTypeOverrideList   string                  `hcl:"mismatching_mime_types_override_list" json:"mismatchingMimeTypesOverrideList"`
	ListRemoteFolderItems             bool                    `json:"listRemoteFolderItems"`
}

func (RemoteRepositoryBaseParams) Id

type RemoteRepositoryVcsParams added in v2.24.0

type RemoteRepositoryVcsParams struct {
	VcsGitProvider    string `json:"vcsGitProvider"`
	VcsGitDownloadUrl string `json:"vcsGitDownloadUrl"`
}

type ReplicationBody added in v2.22.0

type ReplicationBody struct {
	Username               string `json:"username"`
	Password               string `json:"password"`
	URL                    string `json:"url"`
	CronExp                string `json:"cronExp"`
	RepoKey                string `json:"repoKey"`
	EnableEventReplication bool   `json:"enableEventReplication"`
	SocketTimeoutMillis    int    `json:"socketTimeoutMillis"`
	Enabled                bool   `json:"enabled"`
	SyncDeletes            bool   `json:"syncDeletes"`
	SyncProperties         bool   `json:"syncProperties"`
	SyncStatistics         bool   `json:"syncStatistics"`
	PathPrefix             string `json:"pathPrefix"`
}

type RepoWebhookCriteria added in v2.18.0

type RepoWebhookCriteria struct {
	BaseWebhookCriteria
	AnyLocal  bool     `json:"anyLocal"`
	AnyRemote bool     `json:"anyRemote"`
	RepoKeys  []string `json:"repoKeys"`
}

type ResourceData

type ResourceData struct{ *schema.ResourceData }

type RpmLocalRepositoryParams

type RpmLocalRepositoryParams struct {
	LocalRepositoryBaseParams
	YumRootDepth            int   `hcl:"yum_root_depth" json:"yumRootDepth,omitempty"`
	CalculateYumMetadata    *bool `hcl:"calculate_yum_metadata" json:"calculateYumMetadata,omitempty"`
	EnableFileListsIndexing *bool `hcl:"enable_file_lists_indexing" json:"enableFileListsIndexing,omitempty"`
}

type SamlSecurity

type SamlSecurity struct {
	Saml SamlSettingsWrapper `yaml:"security"`
}

type SamlSettings

type SamlSettings struct {
	EnableIntegration         bool   `yaml:"enableIntegration" json:"enableIntegration"`
	Certificate               string `yaml:"certificate" json:"certificate"`
	EmailAttribute            string `yaml:"emailAttribute" json:"emailAttribute"`
	GroupAttribute            string `yaml:"groupAttribute" json:"groupAttribute"`
	LoginUrl                  string `yaml:"loginUrl" json:"loginUrl"`
	LogoutUrl                 string `yaml:"logoutUrl" json:"logoutUrl"`
	NoAutoUserCreation        bool   `yaml:"noAutoUserCreation" json:"noAutoUserCreation"`
	ServiceProviderName       string `yaml:"serviceProviderName" json:"serviceProviderName"`
	AllowUserToAccessProfile  bool   `yaml:"allowUserToAccessProfile" json:"allowUserToAccessProfile"`
	AutoRedirect              bool   `yaml:"autoRedirect" json:"autoRedirect"`
	SyncGroups                bool   `yaml:"syncGroups" json:"syncGroups"`
	VerifyAudienceRestriction bool   `yaml:"verifyAudienceRestriction" json:"verifyAudienceRestriction"`
	UseEncryptedAssertion     bool   `yaml:"useEncryptedAssertion" json:"useEncryptedAssertion"`
}

type SamlSettingsWrapper

type SamlSettingsWrapper struct {
	Settings SamlSettings `yaml:"samlSettings"`
}

type Schema

type Schema map[string]*schema.Schema

type SecurityLdapGroupSettings

type SecurityLdapGroupSettings struct {
	LdapGroupSettings LdapGroupSettings `xml:"ldapGroupSettings"`
}

type SecurityLdapSettings

type SecurityLdapSettings struct {
	LdapSettings LdapSettings `xml:"ldapSettings"`
}

type SupportedRepoClasses added in v2.22.2

type SupportedRepoClasses struct {
	RepoLayoutRef      string
	SupportedRepoTypes map[string]bool
}

type UnpackFunc

type UnpackFunc func(s *schema.ResourceData) (interface{}, string, error)

UnpackFunc must return a pointer to a struct and the resource id

type UpdatePushReplication added in v2.22.0

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

type UpdateReplicationConfig added in v2.22.0

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

type User

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

type VcsRemoteRepositoryParams

type VcsRemoteRepositoryParams struct {
	RemoteRepositoryBaseParams
	VcsGitProvider        string `hcl:"vcs_git_provider" json:"vcsGitProvider,omitempty"`
	VcsType               string `hcl:"vcs_type" json:"vcsType,omitempty"`
	MaxUniqueSnapshots    int    `hcl:"max_unique_snapshots" json:"maxUniqueSnapshots,omitempty"`
	VcsGitDownloadUrl     string `hcl:"vcs_git_download_url" json:"vcsGitDownloadUrl,omitempty"`
	ListRemoteFolderItems *bool  `hcl:"list_remote_folder_items" json:"listRemoteFolderItems,omitempty"`
}

type VirtualRepositoryBaseParams

type VirtualRepositoryBaseParams struct {
	Key                                           string   `hcl:"key" json:"key,omitempty"`
	ProjectKey                                    string   `json:"projectKey"`
	ProjectEnvironments                           []string `json:"environments"`
	Rclass                                        string   `json:"rclass"`
	PackageType                                   string   `hcl:"package_type" json:"packageType,omitempty"`
	Description                                   string   `hcl:"description" json:"description,omitempty"`
	Notes                                         string   `hcl:"notes" json:"notes,omitempty"`
	IncludesPattern                               string   `hcl:"includes_pattern" json:"includesPattern,omitempty"`
	ExcludesPattern                               string   `hcl:"excludes_pattern" json:"excludesPattern,omitempty"`
	RepoLayoutRef                                 string   `hcl:"repo_layout_ref" json:"repoLayoutRef,omitempty"`
	Repositories                                  []string `hcl:"repositories" json:"repositories,omitempty"`
	ArtifactoryRequestsCanRetrieveRemoteArtifacts bool     `hcl:"artifactory_requests_can_retrieve_remote_artifacts" json:"artifactoryRequestsCanRetrieveRemoteArtifacts,omitempty"`
	DefaultDeploymentRepo                         string   `hcl:"default_deployment_repo" json:"defaultDeploymentRepo,omitempty"`
}

func (VirtualRepositoryBaseParams) Id

type VirtualRepositoryBaseParamsWithRetrievalCachePeriodSecs

type VirtualRepositoryBaseParamsWithRetrievalCachePeriodSecs struct {
	VirtualRepositoryBaseParams
	VirtualRetrievalCachePeriodSecs int `hcl:"retrieval_cache_period_seconds" json:"virtualRetrievalCachePeriodSecs"`
}

type Watch

type Watch struct {
	GeneralData      *WatchGeneralData      `json:"general_data,omitempty"`
	ProjectResources *WatchProjectResources `json:"project_resources,omitempty"`
	AssignedPolicies *[]WatchAssignedPolicy `json:"assigned_policies,omitempty"`
}

type WatchAssignedPolicy

type WatchAssignedPolicy struct {
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

type WatchFilter

type WatchFilter struct {
	Type  *string                  `json:"type,omitempty"`
	Value *WatchFilterValueWrapper `json:"value,omitempty"`
}

type WatchFilterValue

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

type WatchFilterValueWrapper

type WatchFilterValueWrapper struct {
	WatchFilterValue
	IsPropertyFilter bool `json:”-”`
}

WatchFilterValueWrapper is a wrapper around WatchFilterValue which handles the API returning both a string and an object for the watch filter value

type WatchGeneralData

type WatchGeneralData struct {
	Name        *string `json:"name,omitempty"`
	Description *string `json:"description,omitempty"`
	Active      *bool   `json:"active,omitempty"`
}

WatchGeneralData this struct and all the others below it line up identically with the structs from the V2 go client from jfrog with one fatal exception: None of these nested types is exported and it's totally inconsistent with the rest of the code. Option are: move this code into the terraform space, as is, or beg the jfrog-go-client team to captial case those variables. I ticket will be filed, but I am not hopeful.

type WatchProjectResource

type WatchProjectResource struct {
	Type            *string        `json:"type,omitempty"`
	RepoType        *string        `json:"repo_type,omitempty"`
	BinaryManagerId *string        `json:"bin_mgr_id,omitempty"`
	Name            *string        `json:"name,omitempty"`
	Filters         *[]WatchFilter `json:"filters,omitempty"`
}

type WatchProjectResources

type WatchProjectResources struct {
	Resources *[]WatchProjectResource `json:"resources,omitempty"`
}

type WebhookBaseParams added in v2.18.0

type WebhookBaseParams struct {
	Key         string             `json:"key"`
	Description string             `json:"description"`
	Enabled     bool               `json:"enabled"`
	EventFilter WebhookEventFilter `json:"event_filter"`
	Handlers    []WebhookHandler   `json:"handlers"`
}

func (WebhookBaseParams) Id added in v2.18.0

func (w WebhookBaseParams) Id() string

type WebhookCustomHttpHeader added in v2.18.0

type WebhookCustomHttpHeader struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type WebhookEventFilter added in v2.18.0

type WebhookEventFilter struct {
	Domain     string      `json:"domain"`
	EventTypes []string    `json:"event_types"`
	Criteria   interface{} `json:"criteria"`
}

type WebhookHandler added in v2.18.0

type WebhookHandler struct {
	HandlerType       string                    `json:"handler_type"`
	Url               string                    `json:"url"`
	Secret            string                    `json:"secret"`
	Proxy             string                    `json:"proxy"`
	CustomHttpHeaders []WebhookCustomHttpHeader `json:"custom_http_headers"`
}

type XmlLdapConfig

type XmlLdapConfig struct {
	XMLName  xml.Name             `xml:"config"`
	Security SecurityLdapSettings `xml:"security"`
}

type XmlLdapGroupConfig

type XmlLdapGroupConfig struct {
	XMLName  xml.Name                  `xml:"config"`
	Security SecurityLdapGroupSettings `xml:"security"`
}

Source Files

Jump to

Keyboard shortcuts

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