util

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2018 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultServerHost = "localhost"
	DefaultServerPort = 1094
)

Variables

View Source
var AccessTokenFile string
View Source
var ConfigDir string
View Source
var ConfigFile string
View Source
var LogFile string

Functions

func GetAccessToken

func GetAccessToken() string

func GetAuthClient

func GetAuthClient() (api.AuthClient, error)

func GetContextWithAllAuths added in v0.0.2

func GetContextWithAllAuths(path string) context.Context

func GetContextWithAuth

func GetContextWithAuth() context.Context

func GetPreviewClient

func GetPreviewClient() (api.PreviewClient, error)

func GetSharingClient

func GetSharingClient() (api.ShareClient, error)

func GetStorageClient

func GetStorageClient() (api.StorageClient, error)

func LoadPublicLinkAccessToken added in v0.0.2

func LoadPublicLinkAccessToken(token string) (string, error)

func SavePublicLinkAccessToken added in v0.0.2

func SavePublicLinkAccessToken(token, accessToken string)

func SetAccessToken

func SetAccessToken(token string)

func SetConfig

func SetConfig(cfg *Config)

Types

type Config

type Config struct {
	Username  string
	Password  string
	ServerURL string
}

func GetConfig

func GetConfig() *Config

Jump to

Keyboard shortcuts

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