acl

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SharedWithModelAttrTypes = map[string]attr.Type{
	"user_id":      types.StringType,
	"group_id":     types.StringType,
	"access_level": types.StringType,
	"subject_name": types.StringType,
}

Functions

func SuperSchema added in v0.2.0

func SuperSchema(readOnly bool) map[string]superschema.Attribute

SuperSchema is the superschema for ACL.

If readOnly is false, returns ACL attributes with 3 rights : "ReadOnly", "Change", "FullControl". If readOnly is true, returns ACL attributes with only "ReadOnly".

Types

type SharedWithModel

type SharedWithModel struct {
	UserID      types.String `tfsdk:"user_id"`
	GroupID     types.String `tfsdk:"group_id"`
	AccessLevel types.String `tfsdk:"access_level"`
	SubjectName types.String `tfsdk:"subject_name"`
}

func AccessControlListToSharedSet

func AccessControlListToSharedSet(input []*govcdtypes.AccessSetting) ([]SharedWithModel, error)

func SharedSetToAccessControl

func SharedSetToAccessControl(_ *govcd.VCDClient, org *govcd.AdminOrg, input []SharedWithModel) ([]*govcdtypes.AccessSetting, []*SharedWithModel, error)

Jump to

Keyboard shortcuts

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