env

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2018 License: BSD-3-Clause Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsGbProject

func IsGbProject(projectPath string) bool

func ParseAppDescriptor

func ParseAppDescriptor(appJson string) (*config.FlogoAppDescriptor, error)

ParseAppDescriptor parse the application descriptor

Types

type FlogoProject

type FlogoProject struct {
	BinDir             string
	RootDir            string
	SourceDir          string
	VendorDir          string
	VendorSrcDir       string
	CodeSourcePath     string
	AppDir             string
	FileDescriptorPath string
	DockerBuild        bool
}

func (*FlogoProject) Build

func (e *FlogoProject) Build() error

func (*FlogoProject) Create

func (e *FlogoProject) Create(createBin bool, vendorDir string) error

Create creates directories for the project

func (*FlogoProject) GetAppDir

func (e *FlogoProject) GetAppDir() string

GetAppDir returns the directory of the app

func (*FlogoProject) GetBinDir

func (e *FlogoProject) GetBinDir() string

func (*FlogoProject) GetDockerBuild

func (e *FlogoProject) GetDockerBuild() bool

func (*FlogoProject) GetRootDir

func (e *FlogoProject) GetRootDir() string

func (*FlogoProject) GetSourceDir

func (e *FlogoProject) GetSourceDir() string

func (*FlogoProject) GetVendorDir

func (e *FlogoProject) GetVendorDir() string

func (*FlogoProject) GetVendorSrcDir

func (e *FlogoProject) GetVendorSrcDir() string

func (*FlogoProject) Init

func (e *FlogoProject) Init(rootDir string) error

func (*FlogoProject) InstallDependency

func (e *FlogoProject) InstallDependency(depPath string, version string) error

Deprecated, dependency managements responsibility

func (*FlogoProject) Open

func (e *FlogoProject) Open() error

Open the project directory and validate its structure

func (*FlogoProject) SetDockerBuild

func (e *FlogoProject) SetDockerBuild()

func (*FlogoProject) UninstallDependency

func (e *FlogoProject) UninstallDependency(depPath string) error

Deprecated, dependency managements responsibility

type Gb

type Gb struct {
	BinPath        string
	SourcePath     string
	VendorPath     string
	CodeSourcePath string
}

Gb structure that contains gb project paths

func NewGb

func NewGb(codePath string) *Gb

NewGb creates a new Gb struct

func (*Gb) Build

func (e *Gb) Build() error

Build performs a 'gb build'

func (*Gb) Init

func (e *Gb) Init(createBin bool)

Init creates directories for the gb project

func (*Gb) Installed

func (e *Gb) Installed() bool

Installed indicates if gb is installed

func (*Gb) NewBinFilePath

func (e *Gb) NewBinFilePath(fileName string) string

NewBinFilepath.Join creates a new file path.Join in the bin directory

func (*Gb) VendorDelete

func (e *Gb) VendorDelete(depPath string) error

VendorDelete performs a 'gb vendor delete'

func (*Gb) VendorDeleteSilent

func (e *Gb) VendorDeleteSilent(depPath string) error

VendorDeleteSilent performs a 'gb vendor delete' silently

func (*Gb) VendorFetch

func (e *Gb) VendorFetch(depPath string, version string) error

VendorFetch performs a 'gb vendor fetch'

type GbProject

type GbProject struct {
	BinDir         string
	RootDir        string
	SourceDir      string
	VendorDir      string
	VendorSrcDir   string
	CodeSourcePath string
	DockerBuild    bool
}

func (*GbProject) Build

func (e *GbProject) Build() error

func (*GbProject) Create

func (e *GbProject) Create(createBin bool, vendorDir string) error

Init creates directories for the gb project

func (*GbProject) GetAppDir

func (e *GbProject) GetAppDir() string

func (*GbProject) GetBinDir

func (e *GbProject) GetBinDir() string

func (*GbProject) GetDockerBuild

func (e *GbProject) GetDockerBuild() bool

func (*GbProject) GetRootDir

func (e *GbProject) GetRootDir() string

func (*GbProject) GetSourceDir

func (e *GbProject) GetSourceDir() string

func (*GbProject) GetVendorDir

func (e *GbProject) GetVendorDir() string

func (*GbProject) GetVendorSrcDir

func (e *GbProject) GetVendorSrcDir() string

func (*GbProject) Init

func (e *GbProject) Init(basePath string) error

func (*GbProject) InstallDependency

func (e *GbProject) InstallDependency(depPath string, version string) error

func (*GbProject) Open

func (e *GbProject) Open() error

Open the project directory and validate its structure

func (*GbProject) SetDockerBuild

func (e *GbProject) SetDockerBuild()

func (*GbProject) UninstallDependency

func (e *GbProject) UninstallDependency(depPath string) error

type Project

type Project interface {

	// Init initializes the project settings an validates it requirements
	Init(path string) error

	// Create the project directory and its structure, optional existing vendor dir to copy
	Create(withBinDir bool, vendorDir string) error

	// Open the project directory and validate its structure
	Open() error

	// Sets whether this is a docker build or not
	SetDockerBuild()

	// GetDockerBuild returns whether this is a docker build or not
	GetDockerBuild() bool

	// GetBinDir get the bin directory of the project
	GetBinDir() string

	// GetRootDir get the root directory of the project
	GetRootDir() string

	// GetSourceDir get the source directory of the project
	GetSourceDir() string

	// GetVendorDir get the vendor directory of the project
	GetVendorDir() string

	// GetVendorSrcDir get the vendor source directory of the project
	GetVendorSrcDir() string

	// GetAppDir get the app directory of the project
	GetAppDir() string

	// Install a go dependency
	InstallDependency(path string, version string) error

	// Uninstall a go dependency
	UninstallDependency(path string) error

	// Build the project
	Build() error
}

func NewFlogoProject

func NewFlogoProject() Project

func NewGbProjectEnv

func NewGbProjectEnv() Project

Jump to

Keyboard shortcuts

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