repository

package
v6.37.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

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 GradleLikePackageTypes = []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 CheckRepo

func CheckRepo(id string, request *resty.Request) (*resty.Response, error)

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

func GetDefaultRepoLayoutRef(repositoryType string, packageType string) func() (interface{}, error)

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 MkRepoRead added in v6.26.0

func MkRepoRead(pack packer.PackFunc, construct Constructor) schema.ReadContextFunc

func MkRepoUpdate added in v6.26.0

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 RepoLayoutRefSchema(repositoryType string, packageType string) map[string]*schema.Schema

func Retry400

func Retry400(response *resty.Response, _ error) bool

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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