Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const SchemaID = "https://github.com/ambrdk/cutship/releases/latest/download/cutship.schema.json"

Variables

This section is empty.

Functions

func Load

func Load(path string) (Config, []Problem)

func Parse

func Parse(data []byte) (Config, []Problem)

func Schema

func Schema() ([]byte, error)

func SchemaDocument

func SchemaDocument() *jsonschema.Schema

Types

type App

type App struct {
	Name      string `yaml:"name" json:"name"`
	Image     string `yaml:"image" json:"image"`
	TagPrefix string `yaml:"tag_prefix,omitempty" json:"tag_prefix,omitempty"`
	Pin       Pin    `yaml:"pin" json:"pin"`
}

func (App) JSONSchemaExtend

func (App) JSONSchemaExtend(s *jsonschema.Schema)

type Config

type Config struct {
	Version      int        `yaml:"version" json:"version"`
	Forge        Forge      `yaml:"forge" json:"forge"`
	DeployRepo   string     `yaml:"deploy_repo" json:"deploy_repo"`
	Environments []string   `yaml:"environments,omitempty" json:"environments,omitempty"`
	Apps         []App      `yaml:"apps" json:"apps"`
	Release      Release    `yaml:"release,omitempty" json:"release,omitempty"`
	Lanes        Lanes      `yaml:"lanes,omitempty" json:"lanes,omitempty"`
	Notify       []Notifier `yaml:"notify,omitempty" json:"notify,omitempty"`
}

func (Config) App

func (c Config) App(name string) (App, bool)

func (Config) JSONSchemaExtend

func (Config) JSONSchemaExtend(s *jsonschema.Schema)

type Forge

type Forge struct {
	Type string `yaml:"type" json:"type"`
	URL  string `yaml:"url,omitempty" json:"url,omitempty"`
}

func (Forge) JSONSchemaExtend

func (Forge) JSONSchemaExtend(s *jsonschema.Schema)

type Lanes

type Lanes struct {
	RequiredCheck string `yaml:"required_check,omitempty" json:"required_check,omitempty"`
	CIWorkflow    string `yaml:"ci_workflow,omitempty" json:"ci_workflow,omitempty"`
}

func (Lanes) JSONSchemaExtend

func (Lanes) JSONSchemaExtend(s *jsonschema.Schema)

type Notifier

type Notifier struct {
	Type    string `yaml:"type" json:"type"`
	Mode    string `yaml:"mode,omitempty" json:"mode,omitempty"`
	ChatID  string `yaml:"chat_id,omitempty" json:"chat_id,omitempty"`
	TopicID int64  `yaml:"topic_id,omitempty" json:"topic_id,omitempty"`
	Channel string `yaml:"channel,omitempty" json:"channel,omitempty"`
}

func (Notifier) JSONSchemaExtend

func (Notifier) JSONSchemaExtend(s *jsonschema.Schema)

type Pin

type Pin struct {
	Preset string `yaml:"preset,omitempty" json:"preset,omitempty"`
	File   string `yaml:"file,omitempty" json:"file,omitempty"`
	Path   string `yaml:"path,omitempty" json:"path,omitempty"`
}

func (Pin) JSONSchemaExtend

func (Pin) JSONSchemaExtend(s *jsonschema.Schema)

type Problem

type Problem struct {
	Path    string
	Line    int
	Message string
}

func (Problem) Error

func (p Problem) Error() string

type Release

type Release struct {
	Versioning       string `yaml:"versioning,omitempty" json:"versioning,omitempty"`
	TagFormat        string `yaml:"tag_format,omitempty" json:"tag_format,omitempty"`
	BumpBranchPrefix string `yaml:"bump_branch_prefix,omitempty" json:"bump_branch_prefix,omitempty"`
	BumpTitle        string `yaml:"bump_title,omitempty" json:"bump_title,omitempty"`
}

func (Release) JSONSchemaExtend

func (Release) JSONSchemaExtend(s *jsonschema.Schema)

func (Release) Tag

func (r Release) Tag(version string) string

func (Release) Version

func (r Release) Version(tag string) (string, bool)

Jump to

Keyboard shortcuts

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