imgupload

package
v0.40.3 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorCouldNotLogIn = "could not log in"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PTPIMGResponse added in v0.19.2

type PTPIMGResponse struct {
	Code string `json:"code"`
	Ext  string `json:"ext"`
}

type PTPIMGUploader

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

func NewWithAPIKey

func NewWithAPIKey(key string) (*PTPIMGUploader, error)

func NewWithLogin

func NewWithLogin(user, password string) (*PTPIMGUploader, error)

func (*PTPIMGUploader) Login

func (p *PTPIMGUploader) Login(username, password string) error

func (*PTPIMGUploader) UploadLocalFile

func (p *PTPIMGUploader) UploadLocalFile(image string) (string, error)

func (*PTPIMGUploader) UploadLocalFileWithContext added in v0.39.8

func (p *PTPIMGUploader) UploadLocalFileWithContext(ctx context.Context, image string) (string, error)

func (*PTPIMGUploader) UploadLocalFiles added in v0.19.2

func (p *PTPIMGUploader) UploadLocalFiles(images []string) ([]string, error)

func (*PTPIMGUploader) UploadURL

func (p *PTPIMGUploader) UploadURL(url string) (string, error)

func (*PTPIMGUploader) UploadURLWithContext added in v0.39.7

func (p *PTPIMGUploader) UploadURLWithContext(ctx context.Context, url string) (string, error)

func (*PTPIMGUploader) UploadURLs added in v0.19.2

func (p *PTPIMGUploader) UploadURLs(urls []string) ([]string, error)

Jump to

Keyboard shortcuts

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