Documentation ¶
Index ¶
- Constants
- Variables
- func ContainsService(s []types.ServiceConfig, e string) bool
- func CreateBind(source string, target string) types.ServiceVolumeConfig
- func ExtractFile(path, fileName string, content []byte) error
- func GetTestAPIKey(satelliteID string) (string, error)
- func IsRegularFile(path string) error
- func LoadComposeFromBytes(composeBytes []byte) (*types.Project, error)
- func LoadComposeFromFile(dir string, filename string) (*types.Project, error)
- func ParseArgumentsWithSelector(args []string, argNo int) ([]string, []string, error)
- func ResolveBuilds(services []string) (map[string]string, error)
- func ResolveServices(selectors []string) ([]string, error)
- func WriteComposeFile(dir string, compose *types.Project) error
- func WriteComposeFileNoHistory(dir string, compose *types.Project) error
- type ComposeFile
Constants ¶
const (
// ComposeFileName filename used for the docker compose file.
ComposeFileName = "docker-compose.yaml"
)
Variables ¶
var BuildDict = map[string]string{
"authservice": "app-edge",
"gateway-mt": "app-edge",
"linksharing": "app-edge",
"satellite-admin": "app-storj",
"satellite-api": "app-storj",
"satellite-core": "app-storj",
"storagenode": "app-storj",
"uplink": "app-storj",
"versioncontrol": "app-storj",
}
BuildDict stores the name of the container to build for Storj services.
var Satellite0Identity = "12whfK1EDvHJtajBiAUeajQLYcWqxcQmdYQU5zX5cCf6bAxfgu4"
Satellite0Identity is a standard test identity included in our compose files.
var Store = composedb.ComposeHistory{DB: composedb.FileDatabase{}}
Store is the VersionStore used for compose file history.
Functions ¶
func ContainsService ¶
func ContainsService(s []types.ServiceConfig, e string) bool
ContainsService check if the service is included in the list.
func CreateBind ¶
func CreateBind(source string, target string) types.ServiceVolumeConfig
CreateBind can create a new volume binding object.
func ExtractFile ¶
ExtractFile extract embedded file, if doesn't exist.
func GetTestAPIKey ¶
GetTestAPIKey can calculate an access grant for the predefined test users/project.
func IsRegularFile ¶
IsRegularFile checks to see there is a regular file at the given path and returns an error otherwise.
func LoadComposeFromBytes ¶
LoadComposeFromBytes loads docker-compose definition from bytes.
func LoadComposeFromFile ¶
LoadComposeFromFile parses docker-compose file from the current directory.
func ParseArgumentsWithSelector ¶
ParseArgumentsWithSelector separate the selector and real arguments from os args.
func ResolveBuilds ¶
ResolveBuilds returns with the required docker images to build (as keys in the maps).
func ResolveServices ¶
ResolveServices replaces group definition with exact services in the list.
func WriteComposeFile ¶
WriteComposeFile persists current docker-compose project to docker-compose.yaml.
Types ¶
type ComposeFile ¶
type ComposeFile struct { Version string // used for compatibility with Compose V1 Services types.Services }
ComposeFile is the simplified structure of one compose file.