file

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: GPL-3.0 Imports: 8 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

This section is empty.

Functions

func Download

func Download(revOrURL RevOrURL) error

Download downloads the docker-compose.yml file from the given revision or URL. The file is set 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