usercontext

package
v1.0.0-alpha-124 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrServiceInProjectRoot = errors.New("Service and project definition files at the same directory level")

ErrServiceInProjectRoot happens when a project.json and wedeploy.json is found at the same directory level

Functions

func GetProjectRootDirectory

func GetProjectRootDirectory(delimiter string) (string, error)

GetProjectRootDirectory returns project dir for the current scope

func GetServiceRootDirectory

func GetServiceRootDirectory(delimiter string) (string, error)

GetServiceRootDirectory returns service dir for the current scope

Types

type Context

type Context struct {
	Scope                Scope
	ProjectRoot          string
	ServiceRoot          string
	Remote               string
	Infrastructure       string
	InfrastructureDomain string
	ServiceDomain        string
	Username             string
	Password             string
	Token                string
}

Context structure

func (*Context) Load

func (cx *Context) Load() error

Load a Context object with the current scope

type Scope

type Scope string

Scope is the type for the current mode of the CLI tool (based on current working directory)

const (
	// GlobalScope is the scope when no service on project or project is active
	GlobalScope Scope = "global"

	// ProjectScope is the scope for when a project is active, but no service is active
	ProjectScope Scope = "project"

	// ServiceScope is the scope for when a service on a project is active
	ServiceScope Scope = "service"
)

Jump to

Keyboard shortcuts

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