rest

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2019 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FileUrlTemplate string = "{{.RemoteRepo}}/{{.FileName}}"

var RemoteRepo string = "https://github.com/datacharmer/mysql-docker-minimal/blob/master/dbdata" var RemoteRepoRaw string = "https://raw.githubusercontent.com/datacharmer/mysql-docker-minimal/master/dbdata"

View Source
var IndexUrlTemplate string = "{{.RemoteRepo}}/{{.FileName}}"

Functions

func DownloadFile

func DownloadFile(filepath string, url string) error

DownloadFile will download a url to a local file. It's efficient because it will write as it downloads and not load the whole file into memory.

func FileUrl

func FileUrl(fileName string) string

func IndexUrl

func IndexUrl() string

Types

type RemoteFilesMap

type RemoteFilesMap = map[string][]string

func GetRemoteIndex

func GetRemoteIndex() (index RemoteFilesMap, err error)

Jump to

Keyboard shortcuts

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