store

package
v0.0.0-...-b55064f Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignResp

type AssignResp struct {
	Fid       string `json:"fid"`
	URL       string `json:"url"`
	PublicURL string `json:"publicUrl"`
	Count     int    `json:"count"`
	Error     string `json:"error"`
}

func Assign

func Assign(weedAddr string) (*AssignResp, error)

Assign gets the designated url to store the media

type UploadResp

type UploadResp struct {
	Name  int    `json:"name"`
	Size  int    `json:"size"`
	ETag  string `json:"eTag"`
	Error string `json:"error"`
}

func Upload

func Upload(url string, form map[string]io.Reader) (*UploadResp, error)

Upload sends the form to the URL courtesy of https://stackoverflow.com/a/20397167/6056991

Jump to

Keyboard shortcuts

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