confluence

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ComputedAssignmentSchema = schema.ListNestedAttribute{
	Computed: true,
	NestedObject: schema.NestedAttributeObject{
		Attributes: map[string]schema.Attribute{
			"name": schema.StringAttribute{
				Computed: true,
			},
			"permissions": schema.ListAttribute{
				Computed:    true,
				ElementType: types.StringType,
			},
		},
	},
}

Functions

func AssignmentSchema

func AssignmentSchema() schema.ListNestedBlock

func RemoveAssignment

func RemoveAssignment(ctx context.Context,
	assignedPermissions *confluence.ObjectPermissions, assignmentOrder *AssignmentOrder,
	updateUserPermissions UpdateUserPermissionsFunc,
	updateGroupPermissions UpdateGroupPermissionsFunc) diag.Diagnostics

Types

type Assignment

type Assignment struct {
	Users       []string `tfsdk:"users"`
	Groups      []string `tfsdk:"groups"`
	Permissions []string `tfsdk:"permissions"`
	Priority    int64    `tfsdk:"priority"`
}

type AssignmentOrder

type AssignmentOrder struct {
	Permissions []string
	Users       map[string][]string
	UserNames   []string
	Groups      map[string][]string
	GroupNames  []string
}

type AssignmentResult

type AssignmentResult struct {
	ComputedUsers  types.List
	ComputedGroups types.List
}

func ApplyNewAssignmentSet

func ApplyNewAssignmentSet(ctx context.Context, actorLookupService *cloud.ActorLookupService,
	assignmentOrder AssignmentOrder,
	updateUserPermissions UpdateUserPermissionsFunc,
	updateGroupPermissions UpdateGroupPermissionsFunc) (*AssignmentResult, diag.Diagnostics)

func ComputePermissionAssignments

func ComputePermissionAssignments(ctx context.Context,
	assignedPermissions *confluence.ObjectPermissions, assignmentOrder AssignmentOrder) (*AssignmentResult, diag.Diagnostics)

func UpdateAssignment

func UpdateAssignment(ctx context.Context, actorLookupService *cloud.ActorLookupService,
	inStateAssignmentOrder AssignmentOrder,
	plannedAssignmentOrder AssignmentOrder,
	forceUpdate bool,
	updateUserPermission UpdateUserPermissionsFunc,
	updateGroupPermission UpdateGroupPermissionsFunc) (*AssignmentResult, diag.Diagnostics)

type Assignments

type Assignments []Assignment

func (Assignments) CreateAssignmentOrder

func (assignments Assignments) CreateAssignmentOrder(ctx context.Context) (*AssignmentOrder, diag.Diagnostics)

type ComputedAssignment

type ComputedAssignment struct {
	Name        string   `tfsdk:"name"`
	Permissions []string `tfsdk:"permissions"`
}

type UpdateGroupPermissionsFunc

type UpdateGroupPermissionsFunc func(group string, requestedPermissions []string) error

type UpdateUserPermissionsFunc

type UpdateUserPermissionsFunc func(user string, requestedPermissions []string) error

Jump to

Keyboard shortcuts

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