config

package
v0.0.0-...-e5cb1a4 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2016 License: MIT, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoReleaseServiceID string = "NoReleaseServiceID"
)
View Source
const SpickSpanConfigFile = "spickspan.json"

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudProvider

type CloudProvider struct {
	Url      string `json:"url"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type Model

type Model struct {
	Version       string             `json:"version"`
	CloudProvider CloudProvider      `json:"cloud_provider"`
	Services      map[string]Service `json:"services"`
}

func CreateApiGatewayConfigModel

func CreateApiGatewayConfigModel() Model

func CreateTestConfigModel

func CreateTestConfigModel() (Model, error)

func GetConfig

func GetConfig() (Model, error)

func ParseConfigFile

func ParseConfigFile(filename string) (Model, error)

func (*Model) GetServiceAndConfig

func (m *Model) GetServiceAndConfig(serviceName string) (model.Service, Service, error)

type Service

type Service struct {
	ServiceName    string `json:"service_name"`
	Port           int    `json:"port"`
	Protocol       string `json:"protocol"`
	ProjectSrcRoot string `json:"project_src_root"` //source service only
	ContainerImage string `json:"container_image"`  //built service only
	IP             string `json:"ip"`               //deployed service only
}

There are three kinds of services: source, built and deployed services.

func (Service) IsSourceProject

func (s Service) IsSourceProject() bool

Jump to

Keyboard shortcuts

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