context

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppContext

type AppContext struct {
	Location        string
	Config          *types.AppConfig
	ServiceContexts map[string]*ServiceContext
}

AppContext represents the exosphere application the user is running

func GetAppContext

func GetAppContext(location string) (*AppContext, error)

GetAppContext returns an AppContext for the application found at the passed location by walking up the directory tree until it finds an application.yml

func NewAppContext

func NewAppContext(location string, config *types.AppConfig) (*AppContext, error)

NewAppContext returns an AppContext with all the service contexts loaded

func (*AppContext) AddService added in v0.36.0

func (a *AppContext) AddService(serviceRole string) error

AddService adds serviceRole to the appConfig object and writes it to app.yml

func (*AppContext) GetDependencyServiceData added in v0.33.0

func (a *AppContext) GetDependencyServiceData(dependencyName string) map[string]map[string]interface{}

GetDependencyServiceData returns a map from service role to service data for the given dependency

func (*AppContext) GetDockerComposeDir added in v0.33.3

func (a *AppContext) GetDockerComposeDir() string

GetDockerComposeDir returns the file path to the directory containaing the docker compose files

func (*AppContext) GetRemoteDependencies added in v0.36.0

func (a *AppContext) GetRemoteDependencies() map[string]types.RemoteDependency

GetRemoteDependencies returns all remote dependencies

func (*AppContext) GetServiceContextByLocation

func (a *AppContext) GetServiceContextByLocation(location string) *ServiceContext

GetServiceContextByLocation returns the service context for the given location

func (*AppContext) GetSortedRemoteDependencyNames added in v0.33.3

func (a *AppContext) GetSortedRemoteDependencyNames() []string

GetSortedRemoteDependencyNames returns all remote dependency names in alphabetical order

type ServiceContext

type ServiceContext struct {
	Config     types.ServiceConfig
	AppContext *AppContext
	Source     *types.ServiceSource
	Role       string
}

ServiceContext represents the exosphere service the user is running

func (*ServiceContext) GetDependencyData added in v0.33.0

func (s *ServiceContext) GetDependencyData(dependencyName string) map[string]interface{}

GetDependencyData returns the data for the given dependency

func (*ServiceContext) ID

func (s *ServiceContext) ID() string

ID returns the identifier for the ServiceContext

type UserContext

type UserContext struct {
	AppContext        *AppContext
	ServiceContext    *ServiceContext
	HasServiceContext bool
}

UserContext represents contextual information about what application/service the user is running

Jump to

Keyboard shortcuts

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