parser

package
v0.0.0-...-54d1b5e Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Type    string            `yaml:"type"`
	Image   string            `yaml:"image"`
	Env     map[string]string `yaml:"environment"`
	Cmd     string            `yaml:"command"`
	Timeout time.Duration     `yaml:"timeout"`
	NetName string            `yaml:"network_name"`

	Dir  string   `yaml:"dir"`
	Tool string   `yaml:"tool"`
	Args []string `yaml:"args"`
}

type ComposeFile

type ComposeFile struct {
	Version  string             `yaml:"version"`
	Services map[string]Service `yaml:"services"`
}

func (ComposeFile) AsGraph

func (c ComposeFile) AsGraph(filePath string) (g graph.Graph, err error)

type ComposeParser

type ComposeParser struct {
	Fs    afero.Fs
	Files []string
}

func (*ComposeParser) ParseAsGraph

func (p *ComposeParser) ParseAsGraph() (gres *graph.Graph, err error)

type ConfigFile

type ConfigFile struct {
	Services map[string]ConfigService `yaml:"services"`
}

type ConfigParser

type ConfigParser struct {
	Fs   afero.Fs
	File string
}

func (*ConfigParser) Parse

func (p *ConfigParser) Parse() (cf ConfigFile, err error)

type ConfigService

type ConfigService struct {
	Name     string    `yaml:"name"`
	Commands []Command `yaml:"commands"`
	AfterRun []Command `yaml:"after_run"`
}

type Service

type Service struct {
	Image     string   `yaml:"image"`
	Ports     []string `yaml:"ports"`
	Networks  []string `yaml:"networks"`
	DependsOn []string `yaml:"depends_on"`
	Links     []string `yaml:"links"`
}

Jump to

Keyboard shortcuts

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