sql

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, m map[string]interface{}) (share.Repository, error)

New creates a Repository with a SQL driver.

func NewFromConfig added in v1.25.0

func NewFromConfig(ctx context.Context, conf *config) (share.Repository, error)

NewFromConfig creates a Repository with a SQL driver using the given config.

Types

type AccessMethod

type AccessMethod int

AccessMethod is method granted by the sharer to access the shared resource.

const (
	// WebDAVAccessMethod indicates an access using WebDAV to the share.
	WebDAVAccessMethod AccessMethod = iota
	// WebappAccessMethod indicates an access using a collaborative
	// application to the share.
	WebappAccessMethod
	// TransferAccessMethod indicates a share for a transfer.
	TransferAccessMethod
)

type ItemType

type ItemType int

ItemType is the type of the shares resource.

const (
	// ItemTypeFile is used when the shared resource is a file.
	ItemTypeFile ItemType = iota
	// ItemTypeFolder is used when the shared resource is a folder.
	ItemTypeFolder
)

type Protocol

type Protocol int

Protocol is the protocol the recipient of the share uses to access the shared resource.

const (
	// WebDAVProtocol is the WebDav protocol.
	WebDAVProtocol Protocol = iota
	// WebappProtocol is the Webapp protocol.
	WebappProtocol
	// TransferProtocol is the Transfer protocol.
	TransferProtocol
)

type ShareState

type ShareState int

ShareState is the state of the share.

const (
	// ShareStatePending is the state for a pending share.
	ShareStatePending ShareState = iota
	// ShareStateAccepted is the share for an accepted share.
	ShareStateAccepted
	// ShareStateRejected is the share for a rejected share.
	ShareStateRejected
)

type ShareType

type ShareType int

ShareType is the type of the share.

const (
	// ShareTypeUser is used for a share to an user.
	ShareTypeUser ShareType = iota
	// ShareTypeGroup is used for a share to a group.
	ShareTypeGroup
)

Jump to

Keyboard shortcuts

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