Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
 - func DownloadFile(filepath string, url string, progress bool, progressStep int64) error
 - func DownloadFileWithRetry(filepath string, url string, progress bool, ...) error
 - func FileUrl(fileName string) string
 - func IndexUrl() string
 - type DbdeployerRelease
 - type PassThru
 - type ReleaseUser
 - type RemoteFilesMap
 
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 ¶
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 DownloadFileWithRetry ¶ added in v1.68.0
func DownloadFileWithRetry(filepath string, url string, progress bool, progressStep, retriesOnFailure int64) error
DownloadFileWithRetry 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.
Types ¶
type DbdeployerRelease ¶ added in v1.36.0
type DbdeployerRelease struct {
	Assets []struct {
		BrowserDownloadURL string      `json:"browser_download_url"`
		ContentType        string      `json:"content_type"`
		CreatedAt          string      `json:"created_at"`
		DownloadCount      int64       `json:"download_count"`
		Name               string      `json:"name"`
		Size               int64       `json:"size"`
		State              string      `json:"state"`
		Uploader           ReleaseUser `json:"uploader"`
		URL                string      `json:"url"`
	} `json:"assets"`
	Author          ReleaseUser `json:"author"`
	Body            string      `json:"body"`
	CreatedAt       string      `json:"created_at"`
	Draft           bool        `json:"draft"`
	HTMLURL         string      `json:"html_url"`
	Name            string      `json:"name"`
	Prerelease      bool        `json:"prerelease"`
	PublishedAt     string      `json:"published_at"`
	TagName         string      `json:"tag_name"`
	TarballURL      string      `json:"tarball_url"`
	TargetCommitish string      `json:"target_commitish"`
	ZipballURL      string      `json:"zipball_url"`
}
    func GetLatestRelease ¶ added in v1.36.0
func GetLatestRelease(tag string) (DbdeployerRelease, error)
func GetReleases ¶ added in v1.36.0
func GetReleases() ([]DbdeployerRelease, error)
type ReleaseUser ¶ added in v1.36.0
type RemoteFilesMap ¶
func GetRemoteIndex ¶
func GetRemoteIndex() (index RemoteFilesMap, err error)
 Click to show internal directories. 
   Click to hide internal directories.