Documentation
¶
Index ¶
- func AddToHistory(url ShareableUrl)
- func CloseFileOrExit(file *os.File)
- func CollectResponseErrors(response cloudflare.Response) error
- func GenerateFileId() (string, error)
- func GenerateUploadToken() (string, error)
- func NewProgressReaderProvider(upstreamReader io.Reader, description string, fileSize int64) io.Reader
- func ReadHistory() map[string]*ShareableUrl
- func WriteHistory(urls []*ShareableUrl)
- type ShareableUrl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddToHistory ¶
func AddToHistory(url ShareableUrl)
func CloseFileOrExit ¶
func CollectResponseErrors ¶
func CollectResponseErrors(response cloudflare.Response) error
func GenerateFileId ¶
func GenerateUploadToken ¶
func NewProgressReaderProvider ¶
func NewProgressReaderProvider(upstreamReader io.Reader, description string, fileSize int64) io.Reader
NewProgressReaderProvider wraps the provided upstreamReader and returns a new reader that tracks the read process through a progress bar that is shown on screen.
func ReadHistory ¶
func ReadHistory() map[string]*ShareableUrl
func WriteHistory ¶
func WriteHistory(urls []*ShareableUrl)
WriteHistory rewrites the history file with the given urls.
Types ¶
type ShareableUrl ¶
type ShareableUrl struct {
}
func ParseUrl ¶
func ParseUrl(value string) (*ShareableUrl, error)
ParseUrl parses a shareable URL. If the host is missing, a default value will be inserted.
func (ShareableUrl) String ¶
func (s ShareableUrl) String() string
Click to show internal directories.
Click to hide internal directories.