uc_teamfolder

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAdminWorkGroupName = "watermint-toolbox-admin"
)

Variables

View Source
var (
	ErrorUnableToIdentifyFolder = errors.New("unable to identify folder")
	ErrorNotAMember             = errors.New("not a member")
)

Functions

This section is empty.

Types

type AccessType

type AccessType string
const (
	AccessTypeOwner           AccessType = "owner"
	AccessTypeEditor          AccessType = "editor"
	AccessTypeViewer          AccessType = "viewer"
	AccessTypeViewerNoComment AccessType = "viewer_no_comment"
)

type TeamContent

type TeamContent interface {
	// Get or create a team folder with the name.
	GetOrCreateTeamFolder(name string) (teamfolder TeamFolder, err error)

	// Get a team folder with the name.
	GetTeamFolder(name string) (teamfolder TeamFolder, err error)
}

func New

func New(ctx dbx_context.Context, adminGroupName string) (tc TeamContent, err error)

type TeamFolder

type TeamFolder interface {
	// Add a member to the folder.
	// Nothing happens if a user already have access to the folder with given access type.
	// Returns an  error when failed to add a member to the folder.
	MemberAddUser(path mo_path.DropboxPath, accessType AccessType, memberEmail string) (err error)

	// Add a group to the folder.
	// Nothing happens if a group already have access to the folder with given access type.
	// Returns an  error when failed to add a group to the folder.
	MemberAddGroup(path mo_path.DropboxPath, accessType AccessType, groupName string) (err error)

	// Remove a member from the folder.
	// Nothing happens if a user is not in the folder.
	MemberRemoveUser(path mo_path.DropboxPath, memberEmail string) (err error)

	// Remove a group from the folder.
	// Nothing happens if a group is not in the folder.
	MemberRemoveGroup(path mo_path.DropboxPath, groupName string) (err error)

	// Update access inheritance setting for the folder.
	UpdateInheritance(path mo_path.DropboxPath, inherit bool) (folder *mo_sharedfolder.SharedFolder, err error)
}

Jump to

Keyboard shortcuts

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