appfile

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

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

Variables

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

Functions

This section is empty.

Types

type AppFile

type AppFile struct {
	Name       string             `json:"name"`
	Version    string             `json:"version"`
	CreateTime time.Time          `json:"createTime,omitempty"`
	UpdateTime time.Time          `json:"updateTime,omitempty"`
	Services   map[string]Service `json:"services"`
	Secrets    map[string]string  `json:"secrets"`
}

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) RenderService

func (s Service) RenderService(tm template.Manager, name, ns, image string) (
	*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