cli

package
v0.0.1-alpha2.0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const NogMavenHome string = "/home/nog/.m2"
View Source
const QuarkusImage string = "gruffwizard/nog-quarkus:latest"
View Source
const QuickStartURL string = "https://raw.githubusercontent.com/gruffwizard/quarkus-quickstarts/nog/nog.yml"
View Source
const TheiaImage string = "gruffwizard/nog-quarkus-theia:latest"

Variables

View Source
var Verbose bool

Functions

func CheckValidQuickStart

func CheckValidQuickStart(name string) error

func IsLocalDir

func IsLocalDir(file string) (bool, error)

func SaveQuickStarts

func SaveQuickStarts(list *QuickStartList) error

Types

type CLI

type CLI struct {
	IDEMode bool

	Action       string
	NogVersion   string
	NogCommit    string
	NogBuiltDate string
	NogBuiltBy   string
	ActiveID     string

	QuickStart     string
	QuickStartOnly bool

	SrcDir string
	SrcVol string
	MvnVol string
	MvnDir string
}

func (*CLI) CleanUp

func (cli *CLI) CleanUp() error

func (*CLI) CreateVolume

func (l *CLI) CreateVolume(name string) error

func (*CLI) ListImages

func (cli *CLI) ListImages() error

func (*CLI) ListQuickStarts

func (l *CLI) ListQuickStarts() error

func (*CLI) ListVolumes

func (cli *CLI) ListVolumes() error

func (*CLI) Run

func (l *CLI) Run(args []string) error

The heart of Nog. Creates a container with the relevent mounts, envs etc and connects to it to run the specified command

At this point there are only two images available a quarkus one which contains latest Java and Native code tools dependencies. The other is the same but with the Theia IDE added

type Config

type Config struct {
	Args []string
}

func (*Config) Display

func (l *Config) Display()

type QuickStartConfig

type QuickStartConfig struct {
	GuideURL       string                    `yaml:"guide"`
	Description    string                    `yaml:"desc"`
	SideContainers []QuickStartSideContainer `yaml:"sides"`
}

type QuickStartList

type QuickStartList struct {
	Version     string
	QuickStarts map[string]QuickStartConfig `yaml:"qs"`
}

func FetchSupportedQuickStarts

func FetchSupportedQuickStarts() (*QuickStartList, error)

func LoadQuickStarts

func LoadQuickStarts(file string) (*QuickStartList, error)

type QuickStartSideContainer

type QuickStartSideContainer struct {
	Image string
	Ports map[int]int
}

Jump to

Keyboard shortcuts

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