Documentation
¶
Index ¶
- Constants
- Variables
- func NewPermissionResource() resource.Resource
- func NewProvider() func() provider.Provider
- func NewReleaseBundleV1Resource() resource.Resource
- func NewSigningKeyResource() resource.Resource
- func NewVaultSigningKeyResource() resource.Resource
- type DistributionDestination
- type DistributionProvider
- func (p *DistributionProvider) Configure(ctx context.Context, req provider.ConfigureRequest, ...)
- func (p *DistributionProvider) DataSources(ctx context.Context) []func() datasource.DataSource
- func (p *DistributionProvider) Metadata(ctx context.Context, req provider.MetadataRequest, ...)
- func (p *DistributionProvider) Resources(ctx context.Context) []func() resource.Resource
- func (p *DistributionProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
- type PermissionAPIModel
- type PermissionErrorAPIModel
- type PermissionPrincipals
- type PermissionResource
- func (r *PermissionResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *PermissionResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *PermissionResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *PermissionResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *PermissionResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *PermissionResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *PermissionResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *PermissionResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type PermissionResourceModel
- type ReleaseBundleV1APIModel
- type ReleaseBundleV1ArtifactAPIModel
- type ReleaseBundleV1GetAPIModel
- type ReleaseBundleV1PostResponseAPIModel
- type ReleaseBundleV1PropAPIModel
- type ReleaseBundleV1ReleaseNotesAPIModel
- type ReleaseBundleV1Resource
- func (r *ReleaseBundleV1Resource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *ReleaseBundleV1Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *ReleaseBundleV1Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *ReleaseBundleV1Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *ReleaseBundleV1Resource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *ReleaseBundleV1Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *ReleaseBundleV1Resource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *ReleaseBundleV1Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type ReleaseBundleV1ResourceModel
- type ReleaseBundleV1SpecAPIModel
- type ReleaseBundleV1SpecQueryAPIModel
- type ReleaseBundleV1SpecQueryMappingAPIModel
- type SigningKeyCommmonResourceModel
- type SigningKeyCommonPostRequestAPIModel
- type SigningKeyGetAPIModel
- type SigningKeyKeyPostRequestAPIModel
- type SigningKeyPostErrorAPIModel
- type SigningKeyPostRequestAPIModel
- type SigningKeyPostResponseAPIModel
- type SigningKeyPutRequestAPIModel
- type SigningKeyReportDetailPostResponseAPIModel
- type SigningKeyReportPostResponseAPIModel
- type SigningKeyResource
- func (r *SigningKeyResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *SigningKeyResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *SigningKeyResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *SigningKeyResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *SigningKeyResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *SigningKeyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *SigningKeyResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type SigningKeyResourceModel
- type VaultSigningKeyKeyPostRequestAPIModel
- type VaultSigningKeyKeyVaultDataPostRequestAPIModel
- type VaultSigningKeyPostRequestAPIModel
- type VaultSigningKeyResource
- func (r *VaultSigningKeyResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *VaultSigningKeyResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *VaultSigningKeyResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *VaultSigningKeyResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *VaultSigningKeyResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *VaultSigningKeyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *VaultSigningKeyResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type VaultSigningKeyResourceModel
- type VaultSigningKeyVaultDataPathKeyRequestAPIModel
Constants ¶
View Source
const ( PermissionsEndpoint = "distribution/api/v1/security/permissions/" PermissionEndpoint = "distribution/api/v1/security/permissions/{permissionName}" )
API Endpoints
View Source
const ( ReleaseBundlesV1Endpoint = "distribution/api/v1/release_bundle" ReleaseBundleV1Endpoint = "distribution/api/v1/release_bundle/{name}/{version}" )
View Source
const ( SigningKeysEndpoint = "distribution/api/v1/keys/{protocol}" SigningKeyEndpoint = "distribution/api/v1/keys/{protocol}/{alias}" )
Variables ¶
View Source
var Version = "1.0.0"
Functions ¶
func NewPermissionResource ¶ added in v1.3.0
func NewProvider ¶
func NewReleaseBundleV1Resource ¶ added in v1.1.0
func NewSigningKeyResource ¶
Types ¶
type DistributionDestination ¶ added in v1.3.0
type DistributionDestination struct {
SiteName string `tfsdk:"site_name" json:"site_name"`
CityName string `tfsdk:"city_name" json:"city_name"`
CountryCodes []string `tfsdk:"country_codes" json:"country_codes"`
}
DistributionDestination matches the JSON structure for distribution_destinations
type DistributionProvider ¶
type DistributionProvider struct {
Meta util.ProviderMetadata
}
func (*DistributionProvider) Configure ¶
func (p *DistributionProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)
func (*DistributionProvider) DataSources ¶
func (p *DistributionProvider) DataSources(ctx context.Context) []func() datasource.DataSource
func (*DistributionProvider) Metadata ¶
func (p *DistributionProvider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse)
func (*DistributionProvider) Resources ¶
func (p *DistributionProvider) Resources(ctx context.Context) []func() resource.Resource
func (*DistributionProvider) Schema ¶
func (p *DistributionProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
type PermissionAPIModel ¶ added in v1.3.0
type PermissionAPIModel struct {
Name string `json:"name"`
ResourceType string `json:"resource_type"`
DistributionDestinations []DistributionDestination `json:"distribution_destinations"`
Principals PermissionPrincipals `json:"principals"`
}
type PermissionErrorAPIModel ¶ added in v1.3.0
type PermissionErrorAPIModel struct {
StatusCode int `json:"status_code"`
Message string `json:"message"`
Detail string `json:"detail"`
}
Error Models
func (PermissionErrorAPIModel) String ¶ added in v1.3.0
func (m PermissionErrorAPIModel) String() string
type PermissionPrincipals ¶ added in v1.3.0
type PermissionResource ¶ added in v1.3.0
type PermissionResource struct {
ProviderData util.ProviderMetadata
TypeName string
}
func (*PermissionResource) Configure ¶ added in v1.3.0
func (r *PermissionResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*PermissionResource) Create ¶ added in v1.3.0
func (r *PermissionResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*PermissionResource) Delete ¶ added in v1.3.0
func (r *PermissionResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*PermissionResource) ImportState ¶ added in v1.3.0
func (r *PermissionResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
ImportState imports the resource into the Terraform state.
func (*PermissionResource) Metadata ¶ added in v1.3.0
func (r *PermissionResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*PermissionResource) Read ¶ added in v1.3.0
func (r *PermissionResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*PermissionResource) Schema ¶ added in v1.3.0
func (r *PermissionResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*PermissionResource) Update ¶ added in v1.3.0
func (r *PermissionResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type PermissionResourceModel ¶ added in v1.3.0
type PermissionResourceModel struct {
Name types.String `tfsdk:"name"`
ResourceType types.String `tfsdk:"resource_type"`
DistributionDestinations types.List `tfsdk:"distribution_destinations"`
Principals types.Object `tfsdk:"principals"`
}
Permission Models
type ReleaseBundleV1APIModel ¶ added in v1.1.0
type ReleaseBundleV1APIModel struct {
Name string `json:"name"`
Version string `json:"version"`
DryRun bool `json:"dry_run"`
SignImmediately bool `json:"sign_immediately"`
StoringRepository string `json:"storing_repository,omitempty"`
Description string `json:"description"`
ReleaseNotes ReleaseBundleV1ReleaseNotesAPIModel `json:"release_notes"`
Spec ReleaseBundleV1SpecAPIModel `json:"spec"`
}
type ReleaseBundleV1ArtifactAPIModel ¶ added in v1.1.0
type ReleaseBundleV1ArtifactAPIModel struct {
Checksum string `json:"checksum"`
SourceRepoPath string `json:"sourceRepoPath"`
TargetRepoPath string `json:"targetRepoPath"`
Props []ReleaseBundleV1PropAPIModel `json:"props"`
}
type ReleaseBundleV1GetAPIModel ¶ added in v1.1.0
type ReleaseBundleV1GetAPIModel struct {
Name string `json:"name"`
Version string `json:"version"`
StoringRepository string `json:"storing_repository,omitempty"`
State string `json:"state"`
Description string `json:"description"`
ReleaseNotes ReleaseBundleV1ReleaseNotesAPIModel `json:"release_notes"`
Created string `json:"created"`
CreatedBy string `json:"created_by"`
DistributedBy *string `json:"distributed_by,omitempty"`
Artifacts []ReleaseBundleV1ArtifactAPIModel `json:"artifacts"`
ArtifactsSize int64 `json:"artifacts_size"`
Archived bool `json:"archived"`
Spec ReleaseBundleV1SpecAPIModel `json:"spec"`
}
type ReleaseBundleV1PostResponseAPIModel ¶ added in v1.1.0
type ReleaseBundleV1PostResponseAPIModel struct {
StoringRepository string `json:"storing_repository"`
State string `json:"state"`
Created string `json:"created"`
CreatedBy string `json:"created_by"`
DistributedBy *string `json:"distributed_by,omitempty"`
Artifacts []ReleaseBundleV1ArtifactAPIModel `json:"artifacts"`
ArtifactsSize int64 `json:"artifacts_size"`
Archived bool `json:"archived"`
}
type ReleaseBundleV1PropAPIModel ¶ added in v1.1.0
type ReleaseBundleV1ReleaseNotesAPIModel ¶ added in v1.1.0
type ReleaseBundleV1Resource ¶ added in v1.1.0
type ReleaseBundleV1Resource struct {
ProviderData util.ProviderMetadata
TypeName string
}
func (*ReleaseBundleV1Resource) Configure ¶ added in v1.1.0
func (r *ReleaseBundleV1Resource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*ReleaseBundleV1Resource) Create ¶ added in v1.1.0
func (r *ReleaseBundleV1Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*ReleaseBundleV1Resource) Delete ¶ added in v1.1.0
func (r *ReleaseBundleV1Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*ReleaseBundleV1Resource) ImportState ¶ added in v1.1.0
func (r *ReleaseBundleV1Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
ImportState imports the resource into the Terraform state.
func (*ReleaseBundleV1Resource) Metadata ¶ added in v1.1.0
func (r *ReleaseBundleV1Resource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*ReleaseBundleV1Resource) Read ¶ added in v1.1.0
func (r *ReleaseBundleV1Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*ReleaseBundleV1Resource) Schema ¶ added in v1.1.0
func (r *ReleaseBundleV1Resource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*ReleaseBundleV1Resource) Update ¶ added in v1.1.0
func (r *ReleaseBundleV1Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type ReleaseBundleV1ResourceModel ¶ added in v1.1.0
type ReleaseBundleV1ResourceModel struct {
Name types.String `tfsdk:"name"`
Version types.String `tfsdk:"version"`
GPGPassphase types.String `tfsdk:"gpg_passphase"`
DryRun types.Bool `tfsdk:"dry_run"`
SignImmediately types.Bool `tfsdk:"sign_immediately"`
StoringRepository types.String `tfsdk:"storing_repository"`
Description types.String `tfsdk:"description"`
ReleaseNotes types.Object `tfsdk:"release_notes"`
Spec types.Object `tfsdk:"spec"`
State types.String `tfsdk:"state"`
Created types.String `tfsdk:"created"`
CreatedBy types.String `tfsdk:"created_by"`
DistributedBy types.String `tfsdk:"distributed_by"`
Artifacts types.Set `tfsdk:"artifacts"`
ArtifactsSize types.Int64 `tfsdk:"artifacts_size"`
Archived types.Bool `tfsdk:"archived"`
}
type ReleaseBundleV1SpecAPIModel ¶ added in v1.1.0
type ReleaseBundleV1SpecAPIModel struct {
Queries []ReleaseBundleV1SpecQueryAPIModel `json:"queries"`
}
type ReleaseBundleV1SpecQueryAPIModel ¶ added in v1.1.0
type ReleaseBundleV1SpecQueryAPIModel struct {
AQL string `json:"aql"`
QueryName string `json:"query_name"`
Mappings []ReleaseBundleV1SpecQueryMappingAPIModel `json:"mappings"`
AddedProps []ReleaseBundleV1PropAPIModel `json:"added_props"`
ExcludedPropsPatterns []string `json:"exclude_props_patterns"`
}
type ReleaseBundleV1SpecQueryMappingAPIModel ¶ added in v1.1.0
type SigningKeyCommmonResourceModel ¶
type SigningKeyCommmonResourceModel struct {
Protocol types.String `tfsdk:"protocol"`
Alias types.String `tfsdk:"alias"`
PropagateToEdgeNode types.Bool `tfsdk:"propagate_to_edge_nodes"`
FailOnPropagationFailure types.Bool `tfsdk:"fail_on_propagation_failure"`
SetAsDefault types.Bool `tfsdk:"set_as_default"`
}
type SigningKeyGetAPIModel ¶
type SigningKeyPostErrorAPIModel ¶
type SigningKeyPostErrorAPIModel struct {
StatusCode int `json:"status_code"`
Message string `json:"message"`
Detail string `json:"detail"`
}
func (SigningKeyPostErrorAPIModel) String ¶
func (m SigningKeyPostErrorAPIModel) String() string
type SigningKeyPostRequestAPIModel ¶
type SigningKeyPostRequestAPIModel struct {
SigningKeyCommonPostRequestAPIModel
Key SigningKeyKeyPostRequestAPIModel `json:"key"`
}
type SigningKeyPostResponseAPIModel ¶
type SigningKeyPostResponseAPIModel struct {
Report SigningKeyReportPostResponseAPIModel `json:"report"`
}
type SigningKeyPutRequestAPIModel ¶
type SigningKeyPutRequestAPIModel struct {
NewAlias string `json:"new_alias"`
}
type SigningKeyReportPostResponseAPIModel ¶
type SigningKeyReportPostResponseAPIModel struct {
Message string `json:"message"`
Status string `json:"status"`
Details []SigningKeyReportDetailPostResponseAPIModel `json:"details"`
}
func (SigningKeyReportPostResponseAPIModel) String ¶
func (m SigningKeyReportPostResponseAPIModel) String() string
type SigningKeyResource ¶
type SigningKeyResource struct {
ProviderData util.ProviderMetadata
TypeName string
}
func (*SigningKeyResource) Configure ¶
func (r *SigningKeyResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*SigningKeyResource) Create ¶
func (r *SigningKeyResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*SigningKeyResource) Delete ¶
func (r *SigningKeyResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*SigningKeyResource) Metadata ¶
func (r *SigningKeyResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*SigningKeyResource) Read ¶
func (r *SigningKeyResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*SigningKeyResource) Schema ¶
func (r *SigningKeyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*SigningKeyResource) Update ¶
func (r *SigningKeyResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
type SigningKeyResourceModel ¶
type VaultSigningKeyKeyPostRequestAPIModel ¶
type VaultSigningKeyKeyPostRequestAPIModel struct {
VaultData VaultSigningKeyKeyVaultDataPostRequestAPIModel `json:"vault_data"`
}
type VaultSigningKeyKeyVaultDataPostRequestAPIModel ¶
type VaultSigningKeyKeyVaultDataPostRequestAPIModel struct {
ID string `json:"vault_id"`
PublicKey VaultSigningKeyVaultDataPathKeyRequestAPIModel `json:"public_key"`
PrivateKey VaultSigningKeyVaultDataPathKeyRequestAPIModel `json:"private_key"`
}
type VaultSigningKeyPostRequestAPIModel ¶
type VaultSigningKeyPostRequestAPIModel struct {
SigningKeyCommonPostRequestAPIModel
Key VaultSigningKeyKeyPostRequestAPIModel `json:"key"`
}
type VaultSigningKeyResource ¶
type VaultSigningKeyResource struct {
ProviderData util.ProviderMetadata
TypeName string
}
func (*VaultSigningKeyResource) Configure ¶
func (r *VaultSigningKeyResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*VaultSigningKeyResource) Create ¶
func (r *VaultSigningKeyResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*VaultSigningKeyResource) Delete ¶
func (r *VaultSigningKeyResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*VaultSigningKeyResource) Metadata ¶
func (r *VaultSigningKeyResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*VaultSigningKeyResource) Read ¶
func (r *VaultSigningKeyResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*VaultSigningKeyResource) Schema ¶
func (r *VaultSigningKeyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*VaultSigningKeyResource) Update ¶
func (r *VaultSigningKeyResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
Click to show internal directories.
Click to hide internal directories.