client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const AccessTokenHeaderName = "X-Access-Token"

AccessTokenHeaderName _

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(url string) (io.ReadCloser, error)

DownloadFile _

func DownloadFileToPath

func DownloadFileToPath(filepath, url string) error

DownloadFileToPath _

Types

type Config

type Config struct {
	Host        string
	AccessToken string
}

Config _

type File

type File struct {
	URL      string `json:"url"`
	Size     int    `json:"size"`
	Checksum string `json:"checksum"`
	MimeType string `json:"mime_type"`
}

File _

type IdemploaderAPI

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

IdemploaderAPI _

func New

func New(cfg Config) *IdemploaderAPI

New _

func (*IdemploaderAPI) GetFileInfo

func (ia *IdemploaderAPI) GetFileInfo(checksum string) (*File, error)

GetFileInfo _

func (*IdemploaderAPI) UploadFromFile

func (ia *IdemploaderAPI) UploadFromFile(filepath string) (*File, error)

UploadFromFile _

Jump to

Keyboard shortcuts

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