common

package
v0.0.0-...-8a8b58e Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2018 License: Apache-2.0 Imports: 6 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blueprint

type Blueprint struct {
	NonInfra NonInfra
	Infra    Infra
	Misc     Misc
}

func ImportBlueprintYaml

func ImportBlueprintYaml(filePath string) (Blueprint, error)

func (Blueprint) ExposeYaml

func (b Blueprint) ExposeYaml(filePath string) error

type Database

type Database struct {
	Driver         string `name:"Driver" question:"What's the driver?" allow:"{mysql}"`
	Version        string `name:"Version" question:"What's the version?" allow:"{5.6, 5.7}"`
	Storage        int    `name:"Storage in GB" question:"What's the storage in GB?"`
	OriginHost     string `name:"Origin Host" question:"What's the host of the origin database?"`
	OriginName     string `name:"Origin Name" question:"What's the name of the origin database?"`
	OriginUsername string `name:"Origin Username" question:"What's the username of the origin database?"`
	OriginPassword string `name:"Origin Password" question:"What's the password of the origin database?"`
}

func (Database) ValidateField

func (d Database) ValidateField(fieldName string, input string, field *reflect.Value) error

type Framework

type Framework interface {
	DetectConfig(path string) []Database
	GetName() FrameworkName
	GetProgrammingLanguage() ProgrammingLanguage
}

type FrameworkName

type FrameworkName string

type Infra

type Infra struct {
	Size InfraSize
}

type InfraSize

type InfraSize string
const (
	SizeSmall        InfraSize = "small"
	SizeMedium       InfraSize = "medium"
	SizeLarge        InfraSize = "large"
	SizeMaximum      InfraSize = "maximum"
	UnknownInfraSize InfraSize = "unknown"
)

func ParseInfraSize

func ParseInfraSize(is string) (InfraSize, error)

type Misc

type Misc struct {
	ResourceGroupName    string `question:"What's the Azure resource group name for this Kunlun deployment?" default:"kl-test"`
	Location             string `question:"What's the Azure location for this Kunlun deployment?" default:"eastus"`
	AdminName            string `question:"What's the admin name for the jumpbox?" default:"kluser"`
	ConcurrentUserNumber int    `question:"What's your expected number of concurrent users?" default:"1000"`
}

type NonInfra

type NonInfra struct {
	ProjectSourceCodePath string
	ProgrammingLanguage   ProgrammingLanguage
	Databases             []Database
}

type PackageManager

type PackageManager interface {
	Identify(path string) bool
	DetectFramework(path string) []FrameworkName
	GetName() PackageManagerName
}

type PackageManagerName

type PackageManagerName string

type ProgrammingLanguage

type ProgrammingLanguage string
const (
	UnknownProgrammingLanguage ProgrammingLanguage = "unknown"
	PHP                        ProgrammingLanguage = "php"
)

func ParseProgrammingLanguage

func ParseProgrammingLanguage(pl string) (ProgrammingLanguage, error)

Jump to

Keyboard shortcuts

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