api

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: AGPL-3.0 Imports: 16 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthHttpCtx

func AuthHttpCtx(reAuth, nonInteractive bool) *transport.HttpClientCtx

Types

type ApiCtx

type ApiCtx interface {
	Filetree() *filetree.FileTreeCtx
	FetchDocument(docId, dstPath string) error
	CreateDir(parentId, name string, notify bool) (*model.Document, error)
	UploadDocument(parentId string, sourceDocPath string, notify bool) (*model.Document, error)
	MoveEntry(src, dstDir *model.Node, name string) (*model.Node, error)
	DeleteEntry(node *model.Node) error
	SyncComplete() error
	Nuke() error
	Refresh() error
}

func CreateApiCtx

func CreateApiCtx(httpCtx *transport.HttpClientCtx, syncVerison SyncVersion) (ctx ApiCtx, err error)

CreateApiCtx initializes an instance of ApiCtx

type SyncVersion added in v0.0.23

type SyncVersion int
const (
	Version10 SyncVersion = 10
	Version15 SyncVersion = 15
)

func (SyncVersion) String added in v0.0.23

func (s SyncVersion) String() string

type UserInfo added in v0.0.23

type UserInfo struct {
	SyncVersion SyncVersion
	User        string
}

func ParseToken added in v0.0.23

func ParseToken(userToken string) (token *UserInfo, err error)

type UserToken added in v0.0.16

type UserToken struct {
	Auth0 struct {
		UserID string
		Email  string
	} `json:"auth0-profile"`
	Scopes string
	*jwt.StandardClaims
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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