command

package
v0.101.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute - execute the root command

Types

type Endpoint

type Endpoint struct {
	Name      string `yaml:"name" json:"name"`
	Arguments string `yaml:"arguments" json:"arguments"`
	Returns   string `yaml:"returns" json:"returns"`
}

Endpoint of a service

type EventReaction

type EventReaction struct {
	Condition string     `json:"condition" yaml:"condition"`
	Reaction  []Reaction `json:"reactions" yaml:"reactions"`
}

EventReaction maps condition to reactions

type Metadata

type Metadata struct {
	Name string `json:"name" yaml:"name"`
}

Metadata of pipeline

type Pipeline

type Pipeline struct {
	Metadata       Metadata          `json:"metadata" yaml:"metadata"`
	Services       []PipelineService `json:"services" yaml:"services"`
	EventReactions []EventReaction   `json:"eventReactions" yaml:"eventReactions"`
}

Pipeline structure to generate pipeline code

func LoadFromPath

func LoadFromPath(location string, log logger.Logger) (*Pipeline, error)

LoadFromPath loads pipeline from filesystem

func UnmarshalPipeline

func UnmarshalPipeline(data []byte) (r *Pipeline, err error)

UnmarshalPipeline unmarshals json into pipeline

func (*Pipeline) Marshal

func (r *Pipeline) Marshal() ([]byte, error)

Marshal marshals pipeline into json

type PipelineService

type PipelineService struct {
	Name    string `json:"name" yaml:"name"`
	As      string `json:"as" yaml:"as"`
	Version string `json:"version" yaml:"version"`
}

PipelineService represents dependency service

type Reaction

type Reaction struct {
	Name    string `json:"name" yaml:"name"`
	Command string `json:"command" yaml:"command"`
}

Reaction on oi.engine event

type Service

type Service struct {
	Name      string              `yaml:"name" json:"name"`
	Project   string              `yaml:"project" json:"project"`
	Version   string              `yaml:"version" json:"version"`
	Endpoints map[string]Endpoint `yaml:"endpoints" json:"endpoints"`
	Types     []string            `yaml:"types" json:"types"`
}

Service structure to generate service code

func UnmarshalService

func UnmarshalService(data []byte) (Service, error)

UnmarshalService unmarshals json into Service

func (*Service) Marshal

func (r *Service) Marshal() ([]byte, error)

Marshal service into json

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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