file

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package file provides functions to manage docker compose files inside the $HOME/.sourced/compose-files directory

Index

Constants

This section is empty.

Variables

View Source
var ErrConfigActivation = goerrors.NewKind("docker-compose.yml could not be set as active")

ErrConfigActivation is returned when docker-compose.yml could not be set as active

View Source
var ErrConfigDownload = goerrors.NewKind("docker-compose.yml config file could not be downloaded")

ErrConfigDownload is returned when docker-compose.yml could not be downloaded

Functions

func ActivateFromRemote added in v0.17.0

func ActivateFromRemote(revOrURL RevOrURL) (err error)

ActivateFromRemote downloads the docker-compose.yml file from the given revision or URL, and sets it as the active compose file.

func InitDefault

func InitDefault() (string, error)

InitDefault checks if there is an active docker compose file, and if there isn't the file for this release is downloaded. The current build version must be set with SetVersion. It returns the absolute path to the active docker-compose.yml file

func InitDefaultOverride

func InitDefaultOverride() (string, error)

InitDefaultOverride returns the path of the default docker-compose.override.yml file, if it does not exists, it is created.

func SetActive

func SetActive(revOrURL RevOrURL) error

SetActive makes a symlink from $HOME/.sourced/compose-files/__active__/docker-compose.yml to the compose file for the given revision or URL.

func SetVersion

func SetVersion(v string)

SetVersion sets the version rewritten by the CI build

Types

type RevOrURL

type RevOrURL = string

RevOrURL is a revision (tag name, full sha1) or a valid URL to a docker-compose.yml file

func Active

func Active() (RevOrURL, error)

Active returns the revision (tag name, full sha1) or the URL of the active docker compose file

func List

func List() ([]RevOrURL, error)

List returns a list of installed docker compose files. Each name is the revision (tag name, full sha1) or the URL

Jump to

Keyboard shortcuts

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