integrations

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WebhookProvider = "webhook"
	SlackProvider   = "slack"
	FtpProvider     = "ftp"
	WebdavProvider  = "webdav"
	DropboxProvider = "dropbox"
	GoogleProvider  = "google"
	LocalfsProvider = "localfs"
)

Variables

This section is empty.

Functions

func List

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

List lists the integrations

func ProviderType added in v0.0.25

func ProviderType(n string) string

Types

type DropBox

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

func (*DropBox) Download

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

func (*DropBox) GetMetadata added in v0.0.20

func (d *DropBox) GetMetadata(fileID string) (*messages.IntegrationMetadata, 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 FTPIntegration added in v0.0.20

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

func (*FTPIntegration) Download added in v0.0.20

func (g *FTPIntegration) Download(fileID string) (io.ReadCloser, int64, error)

func (*FTPIntegration) GetMetadata added in v0.0.20

func (g *FTPIntegration) GetMetadata(fileID string) (*messages.IntegrationMetadata, error)

func (*FTPIntegration) List added in v0.0.20

func (g *FTPIntegration) List(folder string, depth int) (*messages.IntegrationFolder, error)

func (*FTPIntegration) Upload added in v0.0.20

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

type IntegrationProvider

type IntegrationProvider interface{}

type MessagingIntegrationProvider added in v0.0.25

type MessagingIntegrationProvider interface {
	IntegrationProvider
	SendMessage(data messages.IntegrationMessageData, img image.Image) (string, error)
}

MessagingIntegrationProvider abstracts 3rd party integrations

func GetMessagingIntegrationProvider added in v0.0.25

func GetMessagingIntegrationProvider(storer storage.UserStorer, uid, integrationid string) (MessagingIntegrationProvider, error)

type StorageIntegrationProvider added in v0.0.25

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

StorageIntegrationProvider abstracts 3rd party integrations

func GetStorageIntegrationProvider added in v0.0.25

func GetStorageIntegrationProvider(storer storage.UserStorer, uid, integrationid string) (StorageIntegrationProvider, error)

type WebDavIntegration

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

WebDavIntegration webdav support

func (*WebDavIntegration) Download

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

Download downloads

func (*WebDavIntegration) GetMetadata added in v0.0.20

func (w *WebDavIntegration) GetMetadata(fileID string) (*messages.IntegrationMetadata, error)

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

type Webhook added in v0.0.25

type Webhook struct {
	Endpoint string
}

func (*Webhook) SendMessage added in v0.0.25

func (i *Webhook) SendMessage(data messages.IntegrationMessageData, img image.Image) (string, error)

Jump to

Keyboard shortcuts

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