linktype

package
v1.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const NoPermissionMatchError = "no matching permission set found"

NoPermissionMatchError is the message returned by a failed conversion

Variables

This section is empty.

Functions

func CS3ResourcePermissionsFromSharingLink(createLink libregraph.DriveItemCreateLink, info provider.ResourceType) (*provider.ResourcePermissions, error)

CS3ResourcePermissionsFromSharingLink creates a cs3 resource permissions type it returns an error when the link type is not allowed or empty

func SharingLinkTypeFromCS3Permissions

func SharingLinkTypeFromCS3Permissions(permissions *linkv1beta1.PublicSharePermissions) (*libregraph.SharingLinkType, []string)

SharingLinkTypeFromCS3Permissions creates a libregraph link type It returns a list of libregraph actions when the conversion is not possible

Types

type LinkType

type LinkType struct {
	Permissions *provider.ResourcePermissions
	// contains filtered or unexported fields
}

LinkType contains cs3 permissions and a libregraph linktype reference

func GetAvailableLinkTypes

func GetAvailableLinkTypes() []*LinkType

GetAvailableLinkTypes returns a slice of all available link types

func NewFileEditLinkPermissionSet

func NewFileEditLinkPermissionSet() *LinkType

NewFileEditLinkPermissionSet creates cs3 permissions for the file edit link type

func NewFolderDropLinkPermissionSet

func NewFolderDropLinkPermissionSet() *LinkType

NewFolderDropLinkPermissionSet creates cs3 permissions for the folder createOnly link type

func NewFolderEditLinkPermissionSet

func NewFolderEditLinkPermissionSet() *LinkType

NewFolderEditLinkPermissionSet creates cs3 permissions for the folder edit link type

func NewFolderUploadLinkPermissionSet

func NewFolderUploadLinkPermissionSet() *LinkType

NewFolderUploadLinkPermissionSet creates cs3 permissions for the folder upload link type

func NewInternalLinkPermissionSet

func NewInternalLinkPermissionSet() *LinkType

NewInternalLinkPermissionSet creates cs3 permissions for the internal link type

func NewViewLinkPermissionSet

func NewViewLinkPermissionSet() *LinkType

NewViewLinkPermissionSet creates cs3 permissions for the view link type

func (*LinkType) GetPermissions

func (l *LinkType) GetPermissions() *provider.ResourcePermissions

GetPermissions returns the cs3 permissions type

Jump to

Keyboard shortcuts

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