integrations

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(userstorer storage.UserStorer, uid string) (*messages.IntegrationsResponse, error)

List lists the integrations

Types

type DropBox

type DropBox struct {
	// contains filtered or unexported fields
}

func (*DropBox) Download

func (d *DropBox) Download(fileID string) (io.ReadCloser, error)

func (*DropBox) List

func (d *DropBox) List(folderID string, depth int) (*messages.IntegrationFolder, error)

func (*DropBox) Upload

func (d *DropBox) Upload(folderID, name, fileType string, reader io.ReadCloser) (string, error)

type IntegrationProvider

type IntegrationProvider interface {
	List(folderID string, depth int) (result *messages.IntegrationFolder, err error)
	Download(fileID string) (io.ReadCloser, error)
	Upload(folderID, name, fileType string, reader io.ReadCloser) (string, error)
}

IntegrationProvider abstracts 3rd party integrations

func GetIntegrationProvider

func GetIntegrationProvider(storer storage.UserStorer, uid, integrationid string) (IntegrationProvider, error)

GetIntegrationProvider finds the integration provider for the user

type WebDavIntegration

type WebDavIntegration struct {
	// contains filtered or unexported fields
}

WebDavIntegration webdav support

func (*WebDavIntegration) Download

func (w *WebDavIntegration) Download(fileID string) (io.ReadCloser, error)

Download downloads

func (*WebDavIntegration) List

func (w *WebDavIntegration) List(folder string, depth int) (*messages.IntegrationFolder, error)

List populates the response

func (*WebDavIntegration) Upload

func (w *WebDavIntegration) Upload(folderID, name, fileType string, reader io.ReadCloser) (id string, err error)

Upload uploads a file

Jump to

Keyboard shortcuts

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