backend

package
v0.2.2-0...-eaa9271 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const GitCachePath = "data/cache/git/"

Variables

View Source
var GitCache AppCache
View Source
var GlobalSftpMutex sync.Mutex
View Source
var SftpCache AppCache

Functions

func SetSftpClient

func SetSftpClient(c *Sftp)

Types

type GDrive

type GDrive struct {
	Client *drive.Service
	Config *oauth2.Config
}

func (GDrive) Cat

func (g GDrive) Cat(path string) (io.ReadCloser, error)

func (GDrive) Init

func (g GDrive) Init(params map[string]string, app *App) (IBackend, error)

func (GDrive) LoginForm

func (g GDrive) LoginForm() Form

func (GDrive) Ls

func (g GDrive) Ls(path string) ([]os.FileInfo, error)

func (GDrive) Mkdir

func (g GDrive) Mkdir(path string) error

func (GDrive) Mv

func (g GDrive) Mv(from string, to string) error

func (GDrive) OAuthToken

func (g GDrive) OAuthToken(ctx *map[string]interface{}) error

func (GDrive) OAuthURL

func (g GDrive) OAuthURL() string

func (GDrive) Rm

func (g GDrive) Rm(path string) error

func (GDrive) Save

func (g GDrive) Save(path string, reader io.Reader) error

func (GDrive) Touch

func (g GDrive) Touch(path string) error

type GDriveMarker

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

type Git

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

func (Git) Cat

func (g Git) Cat(path string) (io.ReadCloser, error)

func (Git) Close

func (g Git) Close() error

func (Git) Init

func (git Git) Init(params map[string]string, app *App) (IBackend, error)

func (Git) LoginForm

func (g Git) LoginForm() Form

func (Git) Ls

func (g Git) Ls(path string) ([]os.FileInfo, error)

func (Git) Mkdir

func (g Git) Mkdir(path string) error

func (Git) Mv

func (g Git) Mv(from string, to string) error

func (Git) Rm

func (g Git) Rm(path string) error

func (Git) Save

func (g Git) Save(path string, file io.Reader) error

func (Git) Touch

func (g Git) Touch(path string) error

type GitLib

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

type GitParams

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

type Sftp

type Sftp struct {
	SSHClient  interface{}
	SFTPClient *sftp.Client
}
var GlobalSftp *Sftp

func GetSftpClient

func GetSftpClient() *Sftp

func (Sftp) Cat

func (b Sftp) Cat(path string) (io.ReadCloser, error)

func (Sftp) Close

func (b Sftp) Close() error

func (Sftp) Home

func (b Sftp) Home() (string, error)

func (Sftp) Init

func (b Sftp) Init(params map[string]string, app *App) (IBackend, error)

func (Sftp) LoginForm

func (b Sftp) LoginForm() Form

func (Sftp) Ls

func (b Sftp) Ls(path string) ([]os.FileInfo, error)

func (Sftp) Mkdir

func (b Sftp) Mkdir(path string) error

func (Sftp) Mv

func (b Sftp) Mv(from string, to string) error

func (Sftp) Rm

func (b Sftp) Rm(path string) error

func (Sftp) Save

func (b Sftp) Save(path string, file io.Reader) error

func (Sftp) Stat

func (b Sftp) Stat(path string) (os.FileInfo, error)

func (Sftp) Touch

func (b Sftp) Touch(path string) error

type WebDav

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

func (WebDav) Cat

func (w WebDav) Cat(path string) (io.ReadCloser, error)

func (WebDav) Init

func (w WebDav) Init(params map[string]string, app *App) (IBackend, error)

func (WebDav) LoginForm

func (w WebDav) LoginForm() Form

func (WebDav) Ls

func (w WebDav) Ls(path string) ([]os.FileInfo, error)

func (WebDav) Mkdir

func (w WebDav) Mkdir(path string) error

func (WebDav) Mv

func (w WebDav) Mv(from string, to string) error

func (WebDav) Rm

func (w WebDav) Rm(path string) error

func (WebDav) Save

func (w WebDav) Save(path string, file io.Reader) error

func (WebDav) Touch

func (w WebDav) Touch(path string) error

type WebDavParams

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

type WebDavResp

type WebDavResp struct {
	Responses []struct {
		Href  string `xml:"href"`
		Props []struct {
			Name     string   `xml:"prop>displayname,omitempty"`
			Type     xml.Name `xml:"prop>resourcetype>collection,omitempty"`
			Size     int64    `xml:"prop>getcontentlength,omitempty"`
			Modified string   `xml:"prop>getlastmodified,omitempty"`
		} `xml:"propstat"`
	} `xml:"response"`
}

Jump to

Keyboard shortcuts

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