yaml

package
v0.0.0-...-16b8249 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists() bool

func Lint

func Lint(path string) error

func Save

func Save(def *Definition) error

func Validate

func Validate(t Definition) error

func Write

func Write(path string, def Definition) error

Types

type Definition

type Definition struct {
	Syntax   string    `yaml:"syntax"validate:"required,syntax"`
	Builder  string    `yaml:"builder,omitempty"`
	Services []Service `yaml:"services"validate:"dive"`
}

Definition describe the configuration yaml file

func Load

func Load() (*Definition, error)

func New

func New() *Definition

func Read

func Read(path string) (*Definition, error)

type Out

type Out struct {
	Path     string `yaml:"path"validate:"required"`
	Language string `yaml:"language"validate:"required,language"`
}

func (*Out) Equals

func (a *Out) Equals(b *Out) bool

type Service

type Service struct {
	Repo  string `yaml:"repo,omitempty"`
	Proto string `yaml:"proto"validate:"required"`
	Ref   string `yaml:"ref,omitempty"`
	Out   []Out  `yaml:"out"validate:"required,dive"`
}

func (*Service) Equals

func (a *Service) Equals(b *Service) bool

Jump to

Keyboard shortcuts

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