jira

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: 13 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,
			},
			"roles": schema.ListAttribute{
				Computed:    true,
				ElementType: types.StringType,
			},
		},
	},
}

Functions

func AssignmentSchema

func AssignmentSchema() schema.ListNestedBlock

func RemoveAssignment

func RemoveAssignment(ctx context.Context,
	assignedRoles *jira.ObjectRoles, assignmentOrder *AssignmentOrder,
	updateUserRoles UpdateUserRolesFunc,
	updateGroupRoles UpdateGroupRolesFunc) diag.Diagnostics

Types

type Assignment

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

type AssignmentOrder

type AssignmentOrder struct {
	Roles      []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,
	updateUserRoles UpdateUserRolesFunc,
	updateGroupRoles UpdateGroupRolesFunc) (*AssignmentResult, diag.Diagnostics)

func ComputeJiraAssignment

func ComputeJiraAssignment(ctx context.Context,
	assignedRoles *jira.ObjectRoles, assignmentOrder AssignmentOrder) (*AssignmentResult, diag.Diagnostics)

func UpdateAssignment

func UpdateAssignment(ctx context.Context, actorLookupService *cloud.ActorLookupService,
	inStateAssignmentOrder AssignmentOrder,
	plannedAssignmentOrder AssignmentOrder,
	forceUpdate bool,
	updateUserRole UpdateUserRolesFunc,
	updateGroupRole UpdateGroupRolesFunc) (*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"`
	Roles []string `tfsdk:"roles"`
}

type UpdateGroupRolesFunc

type UpdateGroupRolesFunc func(group string, requestedRoles []string) error

type UpdateUserRolesFunc

type UpdateUserRolesFunc func(user string, requestedRoles []string) error

Jump to

Keyboard shortcuts

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