serviceAst

package
v1.22.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Format = "json"

Functions

This section is empty.

Types

type ServiceAst

type ServiceAst struct {
	SpecDir     string // the base path, like specDir or dependencies/x.y.com/specDir
	Path        string // relative path of spec file to SpecDir
	FileName    string
	ServiceSpec specSpec.Service
}

func (ServiceAst) Save

func (ast ServiceAst) Save(specDir string)

save

func (*ServiceAst) ToJson

func (a *ServiceAst) ToJson() (d []byte, err error)

func (*ServiceAst) ToJsonFlat

func (a *ServiceAst) ToJsonFlat() (d []byte, err error)

returns unindented json

func (*ServiceAst) ToYaml

func (a *ServiceAst) ToYaml() (d []byte, err error)

func (ServiceAst) UpdateImports

func (ast ServiceAst) UpdateImports(typelist *typeAst.Typelist)

type Servicelist

type Servicelist struct {
	ServicesByName          map[string]*ServiceAst // this are the ones from the spec dir
	InstalledServicesByName map[string]*ServiceAst
	SpecDir                 string
}

func (*Servicelist) DeleteService

func (l *Servicelist) DeleteService(servicename string)

Deletes the spec from disk and removes the element from List

func (*Servicelist) LoadInstalledServiceSpecsFromDir

func (l *Servicelist) LoadInstalledServiceSpecsFromDir(specDir ...string)

loads a spec directory and installed specs to the servicelist

func (*Servicelist) LoadServiceSpecsFromDir

func (l *Servicelist) LoadServiceSpecsFromDir(specDir string)

loads a spec directory and installed specs to the servicelist

func (*Servicelist) SaveAllServiceSpecsToDir

func (l *Servicelist) SaveAllServiceSpecsToDir(specDir string)

func (Servicelist) UpdateAllImports

func (l Servicelist) UpdateAllImports(typelist *typeAst.Typelist)

check and updates the imports against a typlelistAst

Jump to

Keyboard shortcuts

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