Documentation ¶
Index ¶
- Constants
- func BytesToGibibytes(bytes int64) int64
- func GibibytesToBytes(bytes int64) int64
- func NewProjectResource() resource.Resource
- func ProjectEnvironmentResource() *schema.Resource
- func ProjectGroupResource() *schema.Resource
- func ProjectRepositoryResource() *schema.Resource
- func ProjectRoleResource() *schema.Resource
- func ProjectUserResource() *schema.Resource
- func RetryOnSpecificMsgBody(matchString string) func(response *resty.Response, err error) bool
- type AdminPrivilegesAPIModel
- type ArtifactoryRepo
- type Equatable
- type MemberAPIModel
- type MembershipAPIModel
- type ProjectAPIModel
- type ProjectEnvironment
- type ProjectEnvironmentUpdate
- type ProjectError
- type ProjectErrorsResponse
- type ProjectGroup
- type ProjectResource
- func (r *ProjectResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *ProjectResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *ProjectResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *ProjectResource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *ProjectResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *ProjectResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *ProjectResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *ProjectResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- func (r *ProjectResource) UpgradeState(ctx context.Context) map[int64]resource.StateUpgrader
- type ProjectResourceModelV1
- type ProjectResourceModelV2
- type ProjectResourceModelV3
- type ProjectResourceModelV4
- type ProjectUser
- type Repository
- type Role
- type Set
Constants ¶
const ( ProjectsUrl = "/access/api/v1/projects" ProjectUrl = ProjectsUrl + "/{projectKey}" MaxStorageInGibibytes = 8589934591 )
const ProjectEnvironmentUrl = "/access/api/v1/projects/{projectKey}/environments"
const ProjectGroupsUrl = "access/api/v1/projects/{projectKey}/groups/{name}"
const ProjectRoleUrl = ProjectRolesUrl + "/{roleName}"
const ProjectRolesUrl = ProjectUrl + "/roles"
const ProjectUsersUrl = "access/api/v1/projects/{projectKey}/users/{name}"
Variables ¶
This section is empty.
Functions ¶
func BytesToGibibytes ¶
func GibibytesToBytes ¶
func NewProjectResource ¶
func ProjectGroupResource ¶
func ProjectRoleResource ¶
func ProjectUserResource ¶
func RetryOnSpecificMsgBody ¶
Types ¶
type AdminPrivilegesAPIModel ¶
type ArtifactoryRepo ¶
type ArtifactoryRepo struct {
Key string
}
type MemberAPIModel ¶
Use by both project user and project group, as they shared identical data structure
func (MemberAPIModel) Equals ¶
func (a MemberAPIModel) Equals(b Equatable) bool
func (MemberAPIModel) Id ¶
func (m MemberAPIModel) Id() string
type MembershipAPIModel ¶
type MembershipAPIModel struct {
Members []MemberAPIModel
}
Use by both project user and project group, as they shared identical data structure
type ProjectAPIModel ¶
type ProjectAPIModel struct { Key string `json:"project_key"` DisplayName string `json:"display_name"` Description string `json:"description"` AdminPrivileges AdminPrivilegesAPIModel `json:"admin_privileges"` StorageQuota int64 `json:"storage_quota_bytes"` SoftLimit bool `json:"soft_limit"` QuotaEmailNotification bool `json:"storage_quota_email_notification"` }
Project GET {{ host }}/access/api/v1/projects/{{projKey}}/ GET {{ host }}/artifactory/api/repositories/?project={{projKey}}
type ProjectEnvironment ¶
type ProjectEnvironment struct {
Name string `json:"name"`
}
func (ProjectEnvironment) Id ¶
func (p ProjectEnvironment) Id() string
type ProjectEnvironmentUpdate ¶
type ProjectEnvironmentUpdate struct {
NewName string `json:"new_name"`
}
func (ProjectEnvironmentUpdate) Id ¶
func (p ProjectEnvironmentUpdate) Id() string
type ProjectError ¶
func (ProjectError) String ¶
func (e ProjectError) String() string
type ProjectErrorsResponse ¶
type ProjectErrorsResponse struct {
Errors []ProjectError `json:"errors"`
}
func (ProjectErrorsResponse) String ¶
func (r ProjectErrorsResponse) String() string
type ProjectGroup ¶
type ProjectGroup struct { ProjectKey string `json:"-"` Name string `json:"name"` Roles []string `json:"roles"` }
func (ProjectGroup) Id ¶
func (m ProjectGroup) Id() string
type ProjectResource ¶
type ProjectResource struct { ProviderData util.ProviderMetadata TypeName string }
func (*ProjectResource) Configure ¶
func (r *ProjectResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*ProjectResource) Create ¶
func (r *ProjectResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*ProjectResource) Delete ¶
func (r *ProjectResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*ProjectResource) ImportState ¶
func (r *ProjectResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
ImportState imports the resource into the Terraform state.
func (*ProjectResource) Metadata ¶
func (r *ProjectResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*ProjectResource) Read ¶
func (r *ProjectResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*ProjectResource) Schema ¶
func (r *ProjectResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*ProjectResource) Update ¶
func (r *ProjectResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
func (*ProjectResource) UpgradeState ¶
func (r *ProjectResource) UpgradeState(ctx context.Context) map[int64]resource.StateUpgrader
type ProjectResourceModelV1 ¶
type ProjectResourceModelV1 struct { ID types.String `tfsdk:"id"` Key types.String `tfsdk:"key"` DisplayName types.String `tfsdk:"display_name"` Description types.String `tfsdk:"description"` AdminPrivileges types.Set `tfsdk:"admin_privileges"` MaxStorageInGibibytes types.Int64 `tfsdk:"max_storage_in_gibibytes"` SoftLimit types.Bool `tfsdk:"block_deployments_on_limit"` QuotaEmailNotification types.Bool `tfsdk:"email_notification"` Members types.Set `tfsdk:"member"` Groups types.Set `tfsdk:"group"` Roles types.Set `tfsdk:"role"` Repos types.Set `tfsdk:"repos"` }
type ProjectResourceModelV2 ¶
type ProjectResourceModelV2 struct { ID types.String `tfsdk:"id"` Key types.String `tfsdk:"key"` DisplayName types.String `tfsdk:"display_name"` Description types.String `tfsdk:"description"` AdminPrivileges types.Set `tfsdk:"admin_privileges"` MaxStorageInGibibytes types.Int64 `tfsdk:"max_storage_in_gibibytes"` SoftLimit types.Bool `tfsdk:"block_deployments_on_limit"` QuotaEmailNotification types.Bool `tfsdk:"email_notification"` Members types.Set `tfsdk:"member"` Groups types.Set `tfsdk:"group"` Roles types.Set `tfsdk:"role"` Repos types.Set `tfsdk:"repos"` UseProjectRoleResource types.Bool `tfsdk:"use_project_role_resource"` }
type ProjectResourceModelV3 ¶
type ProjectResourceModelV3 struct { ID types.String `tfsdk:"id"` Key types.String `tfsdk:"key"` DisplayName types.String `tfsdk:"display_name"` Description types.String `tfsdk:"description"` AdminPrivileges types.Set `tfsdk:"admin_privileges"` MaxStorageInGibibytes types.Int64 `tfsdk:"max_storage_in_gibibytes"` SoftLimit types.Bool `tfsdk:"block_deployments_on_limit"` QuotaEmailNotification types.Bool `tfsdk:"email_notification"` Members types.Set `tfsdk:"member"` Groups types.Set `tfsdk:"group"` Roles types.Set `tfsdk:"role"` Repos types.Set `tfsdk:"repos"` UseProjectRoleResource types.Bool `tfsdk:"use_project_role_resource"` UseProjectUserResource types.Bool `tfsdk:"use_project_user_resource"` UseProjectGroupResource types.Bool `tfsdk:"use_project_group_resource"` }
type ProjectResourceModelV4 ¶
type ProjectResourceModelV4 struct { ID types.String `tfsdk:"id"` Key types.String `tfsdk:"key"` DisplayName types.String `tfsdk:"display_name"` Description types.String `tfsdk:"description"` AdminPrivileges types.Set `tfsdk:"admin_privileges"` MaxStorageInGibibytes types.Int64 `tfsdk:"max_storage_in_gibibytes"` SoftLimit types.Bool `tfsdk:"block_deployments_on_limit"` QuotaEmailNotification types.Bool `tfsdk:"email_notification"` Members types.Set `tfsdk:"member"` Groups types.Set `tfsdk:"group"` Roles types.Set `tfsdk:"role"` Repos types.Set `tfsdk:"repos"` UseProjectRoleResource types.Bool `tfsdk:"use_project_role_resource"` UseProjectUserResource types.Bool `tfsdk:"use_project_user_resource"` UseProjectGroupResource types.Bool `tfsdk:"use_project_group_resource"` UseProjectRepositoryResource types.Bool `tfsdk:"use_project_repository_resource"` }
type ProjectUser ¶
type ProjectUser struct { ProjectKey string `json:"-"` Name string `json:"name"` Roles []string `json:"roles"` IgnoreMissingUser bool `json:"-"` }
func (ProjectUser) Id ¶
func (m ProjectUser) Id() string
type Repository ¶
type Role ¶
type Set ¶
type Set[T Equatable] []T
func SetFromSlice ¶
func (Set[T]) Difference ¶
Difference returns a Set containing all the items not contained in the other set. Note this is "unidirectional", and the result is _only_ the elements in A that are not in B. Example: [1, 2, 3].Difference([2, 3, 4]) = [1].
func (Set[T]) Intersection ¶
Intersection returns a Set containing all the common items between both Sets. Example: [1, 2, 3].Intersection([2, 3, 4]) = [2, 3].