Documentation ¶
Index ¶
- Constants
- Variables
- func CheckRepo(id string, request *resty.Request) (*resty.Response, error)
- func DeleteRepo(_ context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics
- func GetDefaultRepoLayoutRef(repositoryType string, packageType string) func() (interface{}, error)
- func HandleResetWithNonExistentValue(d *util.ResourceData, key string) string
- func MkRepoCreate(unpack unpacker.UnpackFunc, read schema.ReadContextFunc) schema.CreateContextFunc
- func MkRepoRead(pack packer.PackFunc, construct Constructor) schema.ReadContextFunc
- func MkRepoUpdate(unpack unpacker.UnpackFunc, read schema.ReadContextFunc) schema.UpdateContextFunc
- func MkResourceSchema(skeema map[string]*schema.Schema, packer packer.PackFunc, ...) *schema.Resource
- func ProjectEnvironmentsDiff(_ context.Context, diff *schema.ResourceDiff, _ interface{}) error
- func RepoLayoutRefSchema(repositoryType string, packageType string) map[string]*schema.Schema
- func Retry400(response *resty.Response, _ error) bool
- func ValidateRepoLayoutRefSchemaOverride(_ interface{}, _ cty.Path) diag.Diagnostics
- type Constructor
- type ContentSynchronisation
- type ContentSynchronisationProperties
- type ContentSynchronisationSource
- type ContentSynchronisationStatistics
- type ReadFunc
- type SupportedRepoClasses
Constants ¶
View Source
const RepositoriesEndpoint = "artifactory/api/repositories/{key}"
Variables ¶
View Source
var CompressionFormats = map[string]*schema.Schema{ "index_compression_formats": { Type: schema.TypeSet, Elem: &schema.Schema{ Type: schema.TypeString, }, Set: schema.HashString, Optional: true, }, }
View Source
var GradleLikeRepoTypes = []string{
"gradle",
"sbt",
"ivy",
}
View Source
var ProjectEnvironmentsSupported = []string{"DEV", "PROD"}
View Source
var RepoKeyValidator = validation.All( validation.StringDoesNotMatch(regexp.MustCompile("^[0-9].*"), "repo key cannot start with a number"), validation.StringDoesNotContainAny(" !@#$%^&*()+={}[]:;<>,/?~`|\\"), )
View Source
var RepoTypesSupported = []string{
"alpine",
"bower",
"cargo",
"chef",
"cocoapods",
"composer",
"conan",
"conda",
"cran",
"debian",
"docker",
"gems",
"generic",
"gitlfs",
"go",
"gradle",
"helm",
"ivy",
"maven",
"npm",
"nuget",
"opkg",
"p2",
"puppet",
"pypi",
"rpm",
"sbt",
"vagrant",
"vcs",
}
Functions ¶
func DeleteRepo ¶ added in v6.26.0
func DeleteRepo(_ context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics
func GetDefaultRepoLayoutRef ¶ added in v6.6.0
GetDefaultRepoLayoutRef return the default repo layout by Repository Type & Package Type
func HandleResetWithNonExistentValue ¶ added in v6.10.0
func HandleResetWithNonExistentValue(d *util.ResourceData, key string) string
HandleResetWithNonExistentValue Special handling for field that requires non-existant value for RT
Artifactory REST API will not accept empty string or null to reset value to not set Instead, using a non-existant value works as a workaround To ensure we don't accidentally set the value to a valid value, we use a UUID v4 string
func MkRepoCreate ¶ added in v6.26.0
func MkRepoCreate(unpack unpacker.UnpackFunc, read schema.ReadContextFunc) schema.CreateContextFunc
func MkRepoRead ¶ added in v6.26.0
func MkRepoRead(pack packer.PackFunc, construct Constructor) schema.ReadContextFunc
func MkRepoUpdate ¶ added in v6.26.0
func MkRepoUpdate(unpack unpacker.UnpackFunc, read schema.ReadContextFunc) schema.UpdateContextFunc
func MkResourceSchema ¶
func MkResourceSchema(skeema map[string]*schema.Schema, packer packer.PackFunc, unpack unpacker.UnpackFunc, constructor Constructor) *schema.Resource
func ProjectEnvironmentsDiff ¶ added in v6.26.0
func ProjectEnvironmentsDiff(_ context.Context, diff *schema.ResourceDiff, _ interface{}) error
func RepoLayoutRefSchema ¶
func ValidateRepoLayoutRefSchemaOverride ¶ added in v6.6.0
func ValidateRepoLayoutRefSchemaOverride(_ interface{}, _ cty.Path) diag.Diagnostics
Types ¶
type Constructor ¶
type Constructor func() (interface{}, error)
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 ¶
type ContentSynchronisationProperties struct {
Enabled bool `hcl:"properties_enabled" json:"enabled"`
}
type ContentSynchronisationSource ¶
type ContentSynchronisationSource struct {
OriginAbsenceDetection bool `hcl:"source_origin_absence_detection" json:"originAbsenceDetection"`
}
type ContentSynchronisationStatistics ¶
type ContentSynchronisationStatistics struct {
Enabled bool `hcl:"statistics_enabled" json:"enabled"`
}
type ReadFunc ¶
type ReadFunc func(d *schema.ResourceData, m interface{}) error
type SupportedRepoClasses ¶ added in v6.6.0
Click to show internal directories.
Click to hide internal directories.