Documentation ¶
Index ¶
- Constants
- Variables
- func GetGenericSchemas(packageType string) map[int16]map[string]*sdkv2_schema.Schema
- func GetJavaSchemas(packageType string, suppressPom bool) map[int16]map[string]*schema.Schema
- func GetPackageType(packageType string) string
- func GetTerraformSchemas(registryType string) map[int16]map[string]*schema.Schema
- func NewGenericLocalRepositoryResource(packageType string) func() resource.Resource
- func NewMachineLearningLocalRepositoryResource() resource.Resource
- func ResourceArtifactoryLocalAlpineRepository() *schema.Resource
- func ResourceArtifactoryLocalAnsibleRepository() *schema.Resource
- func ResourceArtifactoryLocalCargoRepository() *schema.Resource
- func ResourceArtifactoryLocalConanRepository() *schema.Resource
- func ResourceArtifactoryLocalDebianRepository() *schema.Resource
- func ResourceArtifactoryLocalDockerV1Repository() *schema.Resource
- func ResourceArtifactoryLocalDockerV2Repository() *schema.Resource
- func ResourceArtifactoryLocalHelmOciRepository() *schema.Resource
- func ResourceArtifactoryLocalJavaRepository(packageType string, suppressPom bool) *schema.Resource
- func ResourceArtifactoryLocalNugetRepository() *schema.Resource
- func ResourceArtifactoryLocalOciRepository() *schema.Resource
- func ResourceArtifactoryLocalRpmRepository() *schema.Resource
- func ResourceArtifactoryLocalTerraformRepository(registryType string) *schema.Resource
- func UnpackConnanRepository(data *schema.ResourceData) (interface{}, string, error)
- type AlpineLocalRepoParams
- type AnsibleLocalRepoParams
- type CargoLocalRepoParams
- type ConanRepoParams
- type DebianLocalRepositoryParams
- type DockerLocalRepositoryParams
- type HelmOciLocalRepositoryParams
- type JavaLocalRepositoryParams
- type LocalAPIModel
- type LocalGenericAPIModel
- type LocalGenericResourceModel
- func (r *LocalGenericResourceModel) FromAPIModel(ctx context.Context, apiModel interface{}) diag.Diagnostics
- func (r *LocalGenericResourceModel) GetCreateResourcePlanData(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *LocalGenericResourceModel) GetReadResourceStateData(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *LocalGenericResourceModel) GetUpdateResourcePlanData(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- func (r *LocalGenericResourceModel) GetUpdateResourceStateData(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- func (r LocalGenericResourceModel) SetCreateResourceStateData(ctx context.Context, resp *resource.CreateResponse)
- func (r LocalGenericResourceModel) SetReadResourceStateData(ctx context.Context, resp *resource.ReadResponse)
- func (r LocalGenericResourceModel) SetUpdateResourceStateData(ctx context.Context, resp *resource.UpdateResponse)
- func (r LocalGenericResourceModel) ToAPIModel(ctx context.Context, packageType string) (interface{}, diag.Diagnostics)
- type LocalResourceModel
- func (r *LocalResourceModel) FromAPIModel(ctx context.Context, apiModel interface{}) diag.Diagnostics
- func (r *LocalResourceModel) GetCreateResourcePlanData(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *LocalResourceModel) GetReadResourceStateData(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *LocalResourceModel) GetUpdateResourcePlanData(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- func (r *LocalResourceModel) GetUpdateResourceStateData(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- func (r LocalResourceModel) SetCreateResourceStateData(ctx context.Context, resp *resource.CreateResponse)
- func (r LocalResourceModel) SetReadResourceStateData(ctx context.Context, resp *resource.ReadResponse)
- func (r LocalResourceModel) SetUpdateResourceStateData(ctx context.Context, resp *resource.UpdateResponse)
- func (r LocalResourceModel) ToAPIModel(ctx context.Context, packageType string) (interface{}, diag.Diagnostics)
- type MachineLearningLocalRepositoryResource
- type NugetLocalRepositoryParams
- type OciLocalRepositoryParams
- type RepositoryBaseParams
- type RpmLocalRepositoryParams
Constants ¶
View Source
const ( Rclass = "local" CurrentSchemaVersion = 1 )
Variables ¶
View Source
var AlpineLocalSchemas = GetSchemas(alpineSchema)
View Source
var AnsibleSchemas = GetSchemas(ansibleSchema)
View Source
var BaseSchemaV1 = lo.Assign( repository.BaseSchemaV1, baseSchema, )
View Source
var CargoSchemas = GetSchemas(cargoSchema)
View Source
var ConanSchemas = GetSchemas(conanSchema)
View Source
var DebianSchemas = GetSchemas(debianSchema)
View Source
var DockerV1Schemas = GetSchemas(dockerV1Schema)
View Source
var DockerV2Schemas = GetSchemas(dockerV2Schema)
View Source
var GetSchemas = func(s map[string]*sdkv2_schema.Schema) map[int16]map[string]*sdkv2_schema.Schema { return map[int16]map[string]*sdkv2_schema.Schema{ 0: lo.Assign( BaseSchemaV1, s, ), 1: lo.Assign( BaseSchemaV1, s, ), } }
View Source
var HelmOCISchemas = GetSchemas(helmOCISchema)
View Source
var LocalAttributes = lo.Assign( repository.BaseAttributes, map[string]schema.Attribute{ "blacked_out": schema.BoolAttribute{ Optional: true, Computed: true, Default: booldefault.StaticBool(false), MarkdownDescription: "When set, the repository does not participate in artifact resolution and new artifacts cannot be deployed.", }, "xray_index": schema.BoolAttribute{ Optional: true, Computed: true, Default: booldefault.StaticBool(false), MarkdownDescription: "Enable Indexing In Xray. Repository will be indexed with the default retention period. You will be able to change it via Xray settings.", }, "priority_resolution": schema.BoolAttribute{ Optional: true, Computed: true, Default: booldefault.StaticBool(false), MarkdownDescription: "Setting repositories with priority will cause metadata to be merged only from repositories set with this field", }, "property_sets": schema.SetAttribute{ ElementType: types.StringType, Optional: true, Validators: []validator.Set{ setvalidator.SizeAtLeast(1), }, MarkdownDescription: "List of property set name", }, "archive_browsing_enabled": schema.BoolAttribute{ Optional: true, Computed: true, Default: booldefault.StaticBool(false), MarkdownDescription: "When set, you may view content such as HTML or Javadoc files directly from Artifactory.\nThis may not be safe and therefore requires strict content moderation to prevent malicious users from uploading content that may compromise security (e.g., cross-site scripting attacks).", }, "download_direct": schema.BoolAttribute{ Optional: true, Computed: true, Default: booldefault.StaticBool(false), MarkdownDescription: "When set, download requests to this repository will redirect the client to download the artifact directly from the cloud storage provider. Available in Enterprise+ and Edge licenses only.", }, }, )
View Source
var NugetSchemas = GetSchemas(nugetSchema)
View Source
var OCILocalSchemas = GetSchemas(ociSchema)
View Source
var PackageTypesLikeGeneric = []string{ repository.BowerPackageType, repository.ChefPackageType, repository.CocoapodsPackageType, repository.ComposerPackageType, repository.CondaPackageType, repository.CranPackageType, repository.GemsPackageType, repository.GenericPackageType, repository.GitLFSPackageType, repository.GoPackageType, repository.HelmPackageType, repository.HuggingFacePackageType, repository.NPMPackageType, repository.OpkgPackageType, repository.PubPackageType, repository.PuppetPackageType, repository.PyPiPackageType, repository.SwiftPackageType, repository.TerraformBackendPackageType, repository.VagrantPackageType, }
View Source
var RPMSchemas = GetSchemas(rpmSchema)
View Source
var UnpackLocalJavaRepository = func(data *schema.ResourceData, Rclass string, packageType string) JavaLocalRepositoryParams { d := &utilsdk.ResourceData{ResourceData: data} return JavaLocalRepositoryParams{ RepositoryBaseParams: UnpackBaseRepo(Rclass, data, packageType), ChecksumPolicyType: d.GetString("checksum_policy_type", false), SnapshotVersionBehavior: d.GetString("snapshot_version_behavior", false), MaxUniqueSnapshots: d.GetInt("max_unique_snapshots", false), HandleReleases: d.GetBool("handle_releases", false), HandleSnapshots: d.GetBool("handle_snapshots", false), SuppressPomConsistencyChecks: d.GetBool("suppress_pom_consistency_checks", false), } }
Functions ¶
func GetGenericSchemas ¶ added in v12.1.0
func GetGenericSchemas(packageType string) map[int16]map[string]*sdkv2_schema.Schema
func GetJavaSchemas ¶ added in v12.1.0
func GetPackageType ¶
GetPackageType `packageType` in the API call payload for Terraform repositories must be "terraform", but we use `terraform_module` and `terraform_provider` as a package types in the Provider. GetPackageType function corrects this discrepancy.
func GetTerraformSchemas ¶ added in v12.1.0
func NewGenericLocalRepositoryResource ¶ added in v12.7.0
func NewMachineLearningLocalRepositoryResource ¶ added in v12.7.0
func UnpackConnanRepository ¶
func UnpackConnanRepository(data *schema.ResourceData) (interface{}, string, error)
Types ¶
type AlpineLocalRepoParams ¶
type AlpineLocalRepoParams struct { RepositoryBaseParams repository.PrimaryKeyPairRefParam }
func UnpackLocalAlpineRepository ¶
func UnpackLocalAlpineRepository(data *schema.ResourceData, Rclass string) AlpineLocalRepoParams
type AnsibleLocalRepoParams ¶
type AnsibleLocalRepoParams struct { RepositoryBaseParams repository.PrimaryKeyPairRefParam }
func UnpackLocalAnsibleRepository ¶
func UnpackLocalAnsibleRepository(data *schema.ResourceData, Rclass string) AnsibleLocalRepoParams
type CargoLocalRepoParams ¶
type CargoLocalRepoParams struct { RepositoryBaseParams AnonymousAccess bool `json:"cargoAnonymousAccess"` EnableSparseIndex bool `json:"cargoInternalIndex"` }
func UnpackLocalCargoRepository ¶
func UnpackLocalCargoRepository(data *schema.ResourceData, Rclass string) CargoLocalRepoParams
type ConanRepoParams ¶
type ConanRepoParams struct { RepositoryBaseParams repository.ConanBaseParams }
type DebianLocalRepositoryParams ¶
type DebianLocalRepositoryParams struct { RepositoryBaseParams repository.PrimaryKeyPairRefParam repository.SecondaryKeyPairRefParam TrivialLayout bool `hcl:"trivial_layout" json:"debianTrivialLayout"` IndexCompressionFormats []string `hcl:"index_compression_formats" json:"optionalIndexCompressionFormats,omitempty"` }
func UnpackLocalDebianRepository ¶
func UnpackLocalDebianRepository(data *schema.ResourceData, Rclass string) DebianLocalRepositoryParams
type DockerLocalRepositoryParams ¶
type DockerLocalRepositoryParams struct { RepositoryBaseParams MaxUniqueTags int `hcl:"max_unique_tags" json:"maxUniqueTags"` DockerApiVersion string `hcl:"api_version" json:"dockerApiVersion"` TagRetention int `hcl:"tag_retention" json:"dockerTagRetention"` BlockPushingSchema1 bool `hcl:"block_pushing_schema1" json:"blockPushingSchema1"` }
func UnpackLocalDockerV1Repository ¶
func UnpackLocalDockerV1Repository(data *schema.ResourceData, Rclass string) DockerLocalRepositoryParams
func UnpackLocalDockerV2Repository ¶
func UnpackLocalDockerV2Repository(data *schema.ResourceData, Rclass string) DockerLocalRepositoryParams
type HelmOciLocalRepositoryParams ¶
type HelmOciLocalRepositoryParams struct { RepositoryBaseParams MaxUniqueTags int `json:"maxUniqueTags"` TagRetention int `json:"dockerTagRetention"` }
func UnpackLocalHelmOciRepository ¶
func UnpackLocalHelmOciRepository(data *schema.ResourceData, Rclass string) HelmOciLocalRepositoryParams
type JavaLocalRepositoryParams ¶
type JavaLocalRepositoryParams struct { RepositoryBaseParams ChecksumPolicyType string `hcl:"checksum_policy_type" json:"checksumPolicyType"` SnapshotVersionBehavior string `hcl:"snapshot_version_behavior" json:"snapshotVersionBehavior"` MaxUniqueSnapshots int `hcl:"max_unique_snapshots" json:"maxUniqueSnapshots"` HandleReleases bool `hcl:"handle_releases" json:"handleReleases"` HandleSnapshots bool `hcl:"handle_snapshots" json:"handleSnapshots"` SuppressPomConsistencyChecks bool `hcl:"suppress_pom_consistency_checks" json:"suppressPomConsistencyChecks"` }
type LocalAPIModel ¶ added in v12.7.0
type LocalAPIModel struct { repository.BaseAPIModel BlackedOut *bool `json:"blackedOut"` XrayIndex bool `json:"xrayIndex"` PropertySets []string `json:"propertySets,omitempty"` ArchiveBrowsingEnabled *bool `json:"archiveBrowsingEnabled"` DownloadRedirect *bool `json:"downloadRedirect"` PriorityResolution bool `json:"priorityResolution"` }
type LocalGenericAPIModel ¶ added in v12.7.0
type LocalGenericAPIModel struct { LocalAPIModel CDNRedirect *bool `json:"cdnRedirect"` }
type LocalGenericResourceModel ¶ added in v12.7.0
type LocalGenericResourceModel struct { LocalResourceModel RepoLayoutRef types.String `tfsdk:"repo_layout_ref"` CDNRedirect types.Bool `tfsdk:"cdn_redirect"` }
func (*LocalGenericResourceModel) FromAPIModel ¶ added in v12.7.0
func (r *LocalGenericResourceModel) FromAPIModel(ctx context.Context, apiModel interface{}) diag.Diagnostics
func (*LocalGenericResourceModel) GetCreateResourcePlanData ¶ added in v12.7.0
func (r *LocalGenericResourceModel) GetCreateResourcePlanData(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*LocalGenericResourceModel) GetReadResourceStateData ¶ added in v12.7.0
func (r *LocalGenericResourceModel) GetReadResourceStateData(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*LocalGenericResourceModel) GetUpdateResourcePlanData ¶ added in v12.7.0
func (r *LocalGenericResourceModel) GetUpdateResourcePlanData(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
func (*LocalGenericResourceModel) GetUpdateResourceStateData ¶ added in v12.7.0
func (r *LocalGenericResourceModel) GetUpdateResourceStateData(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
func (LocalGenericResourceModel) SetCreateResourceStateData ¶ added in v12.7.0
func (r LocalGenericResourceModel) SetCreateResourceStateData(ctx context.Context, resp *resource.CreateResponse)
func (LocalGenericResourceModel) SetReadResourceStateData ¶ added in v12.7.0
func (r LocalGenericResourceModel) SetReadResourceStateData(ctx context.Context, resp *resource.ReadResponse)
func (LocalGenericResourceModel) SetUpdateResourceStateData ¶ added in v12.7.0
func (r LocalGenericResourceModel) SetUpdateResourceStateData(ctx context.Context, resp *resource.UpdateResponse)
func (LocalGenericResourceModel) ToAPIModel ¶ added in v12.7.0
func (r LocalGenericResourceModel) ToAPIModel(ctx context.Context, packageType string) (interface{}, diag.Diagnostics)
type LocalResourceModel ¶ added in v12.7.0
type LocalResourceModel struct { repository.BaseResourceModel BlackedOut types.Bool `tfsdk:"blacked_out"` XrayIndex types.Bool `tfsdk:"xray_index"` PropertySets types.Set `tfsdk:"property_sets"` ArchiveBrowsingEnabled types.Bool `tfsdk:"archive_browsing_enabled"` DownloadDirect types.Bool `tfsdk:"download_direct"` PriorityResolution types.Bool `tfsdk:"priority_resolution"` }
func (*LocalResourceModel) FromAPIModel ¶ added in v12.7.0
func (r *LocalResourceModel) FromAPIModel(ctx context.Context, apiModel interface{}) diag.Diagnostics
func (*LocalResourceModel) GetCreateResourcePlanData ¶ added in v12.7.0
func (r *LocalResourceModel) GetCreateResourcePlanData(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*LocalResourceModel) GetReadResourceStateData ¶ added in v12.7.0
func (r *LocalResourceModel) GetReadResourceStateData(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*LocalResourceModel) GetUpdateResourcePlanData ¶ added in v12.7.0
func (r *LocalResourceModel) GetUpdateResourcePlanData(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
func (*LocalResourceModel) GetUpdateResourceStateData ¶ added in v12.7.0
func (r *LocalResourceModel) GetUpdateResourceStateData(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
func (LocalResourceModel) SetCreateResourceStateData ¶ added in v12.7.0
func (r LocalResourceModel) SetCreateResourceStateData(ctx context.Context, resp *resource.CreateResponse)
func (LocalResourceModel) SetReadResourceStateData ¶ added in v12.7.0
func (r LocalResourceModel) SetReadResourceStateData(ctx context.Context, resp *resource.ReadResponse)
func (LocalResourceModel) SetUpdateResourceStateData ¶ added in v12.7.0
func (r LocalResourceModel) SetUpdateResourceStateData(ctx context.Context, resp *resource.UpdateResponse)
func (LocalResourceModel) ToAPIModel ¶ added in v12.7.0
func (r LocalResourceModel) ToAPIModel(ctx context.Context, packageType string) (interface{}, diag.Diagnostics)
type MachineLearningLocalRepositoryResource ¶ added in v12.7.0
type MachineLearningLocalRepositoryResource struct {
// contains filtered or unexported fields
}
func (*MachineLearningLocalRepositoryResource) Schema ¶ added in v12.7.0
func (r *MachineLearningLocalRepositoryResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
type NugetLocalRepositoryParams ¶
type NugetLocalRepositoryParams struct { RepositoryBaseParams MaxUniqueSnapshots int `hcl:"max_unique_snapshots" json:"maxUniqueSnapshots"` ForceNugetAuthentication bool `hcl:"force_nuget_authentication" json:"forceNugetAuthentication"` }
func UnpackLocalNugetRepository ¶
func UnpackLocalNugetRepository(data *schema.ResourceData, Rclass string) NugetLocalRepositoryParams
type OciLocalRepositoryParams ¶
type OciLocalRepositoryParams struct { RepositoryBaseParams MaxUniqueTags int `json:"maxUniqueTags"` DockerApiVersion string `json:"dockerApiVersion"` TagRetention int `json:"dockerTagRetention"` }
func UnpackLocalOciRepository ¶
func UnpackLocalOciRepository(data *schema.ResourceData, Rclass string) OciLocalRepositoryParams
type RepositoryBaseParams ¶
type RepositoryBaseParams 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 `json:"description"` Notes string `json:"notes"` 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"` CdnRedirect *bool `json:"cdnRedirect"` PriorityResolution bool `hcl:"priority_resolution" json:"priorityResolution"` TerraformType string `json:"terraformType"` }
func UnpackBaseRepo ¶
func UnpackBaseRepo(rclassType string, s *sdkv2_schema.ResourceData, packageType string) RepositoryBaseParams
func UnpackLocalTerraformRepository ¶
func UnpackLocalTerraformRepository(data *schema.ResourceData, Rclass string, registryType string) RepositoryBaseParams
func (RepositoryBaseParams) Id ¶
func (bp RepositoryBaseParams) Id() string
type RpmLocalRepositoryParams ¶
type RpmLocalRepositoryParams struct { RepositoryBaseParams repository.PrimaryKeyPairRefParam repository.SecondaryKeyPairRefParam RootDepth int `hcl:"yum_root_depth" json:"yumRootDepth"` CalculateYumMetadata bool `hcl:"calculate_yum_metadata" json:"calculateYumMetadata"` EnableFileListsIndexing bool `hcl:"enable_file_lists_indexing" json:"enableFileListsIndexing"` GroupFileNames string `hcl:"yum_group_file_names" json:"yumGroupFileNames"` }
func UnpackLocalRpmRepository ¶
func UnpackLocalRpmRepository(data *schema.ResourceData, Rclass string) RpmLocalRepositoryParams
Source Files ¶
- local.go
- resource_artifactory_local_alpine_repository.go
- resource_artifactory_local_ansible_repository.go
- resource_artifactory_local_cargo_repository.go
- resource_artifactory_local_conan_repository.go
- resource_artifactory_local_debian_repository.go
- resource_artifactory_local_docker_repository.go
- resource_artifactory_local_generic_repository.go
- resource_artifactory_local_helmoci_repository.go
- resource_artifactory_local_java_repository.go
- resource_artifactory_local_machinelearning_repository.go
- resource_artifactory_local_nuget_repository.go
- resource_artifactory_local_oci_repository.go
- resource_artifactory_local_rpm_repository.go
- resource_artifactory_local_terraform_repository.go
Click to show internal directories.
Click to hide internal directories.