Documentation
¶
Overview ¶
Package cloudsmith implements a Terraform provider for interacting with Cloudsmith.
Package cloudsmith provides Terraform provider functionality for managing Cloudsmith resources.
Index ¶
Constants ¶
const ( DefaultPageSize int64 = 100 DefaultMaxResults int64 = 100 * DefaultPageSize )
const ( CreatedAt string = "created_at" Description string = "description" Name string = "name" AllowUnknownLicenses string = "allow_unknown_licenses" OnViolationQuarantine string = "on_violation_quarantine" SlugPerm string = "slug_perm" SpdxIdentifiers string = "spdx_identifiers" PackageQueryString string = "package_query_string" UpdatedAt string = "updated_at" Organization string = "organization" )
const ( Alpine = "alpine" Cargo = "cargo" Composer = "composer" Conda = "conda" Cran = "cran" Dart = "dart" Deb = "deb" Docker = "docker" Generic = "generic" Go = "go" Helm = "helm" Hex = "hex" HuggingFace = "huggingface" Maven = "maven" Nix = "nix" Npm = "npm" NuGet = "nuget" Python = "python" Rpm = "rpm" Ruby = "ruby" Swift = "swift" )
upstream types
const ( AuthMode = "auth_mode" AuthSecret = "auth_secret" AuthUsername = "auth_username" Component = "component" DistroVersion = "distro_version" DistroVersions = "distro_versions" ExtraHeader1 = "extra_header_1" ExtraHeader2 = "extra_header_2" ExtraValue1 = "extra_value_1" ExtraValue2 = "extra_value_2" IsActive = "is_active" IncludeSources = "include_sources" Mode = "mode" Priority = "priority" TrustLevel = "trust_level" UpstreamDistribution = "upstream_distribution" UpstreamPrefix = "upstream_prefix" UpstreamType = "upstream_type" UpstreamUrl = "upstream_url" VerifySsl = "verify_ssl" AuthCertificateKey = "auth_certificate_key" AuthCertificate = "auth_certificate" )
tf state prop names
const ( MinSeverity string = "min_severity" AllowUnknownSeverity string = "allow_unknown_severity" )
const CidrAllow string = "cidr_allow"
const CidrDeny string = "cidr_deny"
const CountryCodeAllow string = "country_code_allow"
const CountryCodeDeny string = "country_code_deny"
const Namespace string = "namespace"
const Repository string = "repository"
const (
TargetRepository = "target_repository"
)
Variables ¶
This section is empty.
Functions ¶
func PaginateAll ¶ added in v0.0.75
func PaginateAll[T any](fetch PageFetcher[T], opts PaginationOptions) ([]T, error)
PaginateAll collects every page reported by the API, stopping early only when MaxResults is reached. Iteration ends when the current page equals the API-reported total page count (X-Pagination-PageTotal).
func PaginateAllHTTP ¶ added in v0.0.75
func PaginateAllHTTP[T any](exec PageExecutor[T], opts PaginationOptions) ([]T, error)
PaginateAllHTTP validates Cloudsmith pagination headers before paginating. A 404 response is treated as an empty list so callers can short-circuit "not found" without hitting header-parsing errors.
Types ¶
type Checksums ¶ added in v0.0.31
func (Checksums) CompareWithPkg ¶ added in v0.0.31
func (c Checksums) CompareWithPkg(pkg *cloudsmithapi.PackageDetail) error
type PageExecutor ¶ added in v0.0.75
PageExecutor matches the generated SDK's list Execute methods.
type PageFetcher ¶ added in v0.0.75
PageFetcher fetches one page and returns the API-reported total page count.
type PaginationOptions ¶ added in v0.0.75
PaginationOptions controls page size and optional result cap.
type Upstream ¶ added in v0.0.26
type Upstream interface {
GetAuthMode() string
GetAuthSecret() string
GetAuthUsername() string
GetExtraHeader1() string
GetExtraHeader2() string
GetExtraValue1() string
GetExtraValue2() string
GetDisableReason() string
GetDisableReasonText() string
GetCreatedAt() time.Time
GetIsActive() bool
GetMode() string
GetName() string
GetPriority() int64
GetSlugPerm() string
GetUpdatedAt() time.Time
GetUpstreamUrl() string
GetVerifySsl() bool
}
Source Files
¶
- data_entitlement.go
- data_source_namespace.go
- data_source_oidc.go
- data_source_organization.go
- data_source_organization_member_details.go
- data_source_organization_members.go
- data_source_package.go
- data_source_package_deny_policy.go
- data_source_package_list.go
- data_source_policy.go
- data_source_policy_list.go
- data_source_repository.go
- data_source_repository_connected_list.go
- data_source_repository_privileges.go
- data_source_service_details.go
- data_source_service_list.go
- data_source_team_members.go
- data_source_teams.go
- data_source_usage_limits.go
- data_source_user_self.go
- pagination.go
- provider.go
- provider_auth.go
- provider_config.go
- resource_entitlement.go
- resource_entitlement_control.go
- resource_license_policy.go
- resource_manage_team.go
- resource_oidc.go
- resource_package_deny_policy.go
- resource_policy.go
- resource_policy_action.go
- resource_repository.go
- resource_repository_connected.go
- resource_repository_geo_ip_rules.go
- resource_repository_privileges.go
- resource_repository_retention_rule.go
- resource_repository_upstream.go
- resource_saml.go
- resource_saml_auth.go
- resource_service.go
- resource_team.go
- resource_usage_limits.go
- resource_vulnerability_policy.go
- resource_webhook.go
- utils.go