appfile

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2020 License: Apache-2.0 Imports: 24 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultAppfilePath = "./vela.yaml"
View Source
const DefaultWorkloadType = "webservice"

Variables

View Source
var (
	ErrImageNotDefined = errors.New("image not defined")
)

Functions

func FormatDefaultHealthScopeName added in v0.0.9

func FormatDefaultHealthScopeName(appName string) string

Types

type AppFile

type AppFile struct {
	Name       string             `json:"name"`
	CreateTime time.Time          `json:"createTime,omitempty"`
	UpdateTime time.Time          `json:"updateTime,omitempty"`
	Services   map[string]Service `json:"services"`
	Secrets    map[string]string  `json:"secrets,omitempty"`
	// contains filtered or unexported fields
}

func Load

func Load() (*AppFile, error)

func LoadFromFile

func LoadFromFile(filename string) (*AppFile, error)

func NewAppFile

func NewAppFile() *AppFile

func (*AppFile) BuildOAM

BuildOAM renders Appfile into AppConfig, Components. It also builds images for services if defined.

func (*AppFile) GetServices

func (af *AppFile) GetServices() map[string]Service

func (*AppFile) RenderOAM

RenderOAM renders Appfile into AppConfig, Components.

type Build

type Build struct {
	Push   Push   `json:"push,omitempty"`
	Docker Docker `json:"docker,omitempty"`
}

func (*Build) BuildImage

func (b *Build) BuildImage(io cmdutil.IOStreams, image string) error

type Docker

type Docker struct {
	File    string `json:"file"`
	Context string `json:"context"`
}

type Push

type Push struct {
	Local    string `json:"local,omitempty"`
	Registry string `json:"registry,omitempty"`
}

type Service

type Service map[string]interface{}

func (Service) GetBuild

func (s Service) GetBuild() *Build

func (Service) GetConfig

func (s Service) GetConfig() map[string]interface{}

func (Service) GetType

func (s Service) GetType() string

func (Service) GetUserConfigName added in v0.0.9

func (s Service) GetUserConfigName() string

func (Service) RenderService

func (s Service) RenderService(tm template.Manager, name, ns string, cg configGetter) (*v1alpha2.ApplicationConfigurationComponent, *v1alpha2.Component, error)

RenderService render all capabilities of a service to CUE values of a Component. It outputs a Component which will be marshaled as standalone Component and also returned AppConfig Component section.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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