utils

package
v0.0.0-...-f72fa72 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildImage

func BuildImage(tag string) string

BuildImage builds and tags Docker image. Tag must be given as input argument, for example 'ahojukka5/anecdotes'. Returns id of image built.

func Download

func Download(filepath string, url string) error

Download 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 GetVersion

func GetVersion()

GetVersion return version information of Docker Engine

func PushImage

func PushImage(name string, XRA string)

PushImage pushes image to container registry.

`repo` is the name of the image, e.g. (ahojukka5/anecdotes)
`XRA` is base64 encoded X-Registry-Auth

func TagImage

func TagImage(name string, repo string)

TagImage tags image with `name` with `repo`.

Example: TagImage("9e7244cf5587", "ahojukka5/anecdotes")

func Unzip

func Unzip(src string, dest string) ([]string, error)

Unzip will decompress a zip archive, moving all files and folders within the zip file (parameter 1) to an output directory (parameter 2).

Types

type Aux

type Aux struct {
	Aux ID `json:"aux"`
}

Aux struct

type ID

type ID struct {
	ID string `json:"ID"`
}

ID struct

type Stream

type Stream struct {
	Stream string `json:"stream"`
}

Stream struct

Jump to

Keyboard shortcuts

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