migrations

package
v6.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const V5VersionEvery = "every"
View Source
const V5VersionLatest = "latest"

Variables

This section is empty.

Functions

func NewMigrations

func NewMigrations(db *sql.DB, es encryption.Strategy) *migrations

Types

type GroupConfig

type GroupConfig struct {
	Name string   `json:"name"`
	Jobs []string `json:"jobs,omitempty"`
}

type GroupConfigs

type GroupConfigs []GroupConfig

type Params

type Params map[string]interface{}

type Pipeline

type Pipeline struct {
	ID     int
	Groups GroupConfigs
}

type ResourceConfig

type ResourceConfig struct {
	Name         string   `json:"name"`
	Public       bool     `json:"public,omitempty"`
	WebhookToken string   `json:"webhook_token,omitempty"`
	Type         string   `json:"type"`
	Source       Source   `json:"source"`
	CheckEvery   string   `json:"check_every,omitempty"`
	CheckTimeout string   `json:"check_timeout,omitempty"`
	Tags         []string `json:"tags,omitempty"`
	Version      Version  `json:"version,omitempty"`
}

type Source

type Source map[string]interface{}

type V5InParallelConfig

type V5InParallelConfig struct {
	Steps    V5PlanSequence `json:"steps,omitempty"`
	Limit    int            `json:"limit,omitempty"`
	FailFast bool           `json:"fail_fast,omitempty"`
}

type V5JobConfig

type V5JobConfig struct {
	Name                 string   `json:"name"`
	Public               bool     `json:"public,omitempty"`
	DisableManualTrigger bool     `json:"disable_manual_trigger,omitempty"`
	Serial               bool     `json:"serial,omitempty"`
	SerialGroups         []string `json:"serial_groups,omitempty"`
	RawMaxInFlight       int      `json:"max_in_flight,omitempty"`

	Abort   *V5PlanConfig `json:"on_abort,omitempty"`
	Error   *V5PlanConfig `json:"on_error,omitempty"`
	Failure *V5PlanConfig `json:"on_failure,omitempty"`
	Ensure  *V5PlanConfig `json:"ensure,omitempty"`
	Success *V5PlanConfig `json:"on_success,omitempty"`

	Plan V5PlanSequence `json:"plan"`
}

func (V5JobConfig) MaxInFlight

func (config V5JobConfig) MaxInFlight() int

func (V5JobConfig) Plans

func (config V5JobConfig) Plans() []V5PlanConfig

type V5JobConfigs

type V5JobConfigs []V5JobConfig

type V5PlanConfig

type V5PlanConfig struct {
	Do         *V5PlanSequence     `json:"do,omitempty"`
	Aggregate  *V5PlanSequence     `json:"aggregate,omitempty"`
	InParallel *V5InParallelConfig `json:"in_parallel,omitempty"`
	Get        string              `json:"get,omitempty"`
	Passed     []string            `json:"passed,omitempty"`
	Trigger    bool                `json:"trigger,omitempty"`
	Put        string              `json:"put,omitempty"`
	Resource   string              `json:"resource,omitempty"`
	Abort      *V5PlanConfig       `json:"on_abort,omitempty"`
	Error      *V5PlanConfig       `json:"on_error,omitempty"`
	Failure    *V5PlanConfig       `json:"on_failure,omitempty"`
	Ensure     *V5PlanConfig       `json:"ensure,omitempty"`
	Success    *V5PlanConfig       `json:"on_success,omitempty"`
	Try        *V5PlanConfig       `json:"try,omitempty"`
	Version    *V5VersionConfig    `json:"version,omitempty"`
}

type V5PlanSequence

type V5PlanSequence []V5PlanConfig

type V5VersionConfig

type V5VersionConfig struct {
	Every  bool
	Latest bool
	Pinned Version
}

func (*V5VersionConfig) MarshalJSON

func (c *V5VersionConfig) MarshalJSON() ([]byte, error)

func (*V5VersionConfig) UnmarshalJSON

func (c *V5VersionConfig) UnmarshalJSON(version []byte) error

type V6ResourceConfigVersion

type V6ResourceConfigVersion struct {
	Name    string            `json:"name"`
	Version map[string]string `json:"version,omitempty"`
}

type Version

type Version map[string]string

Jump to

Keyboard shortcuts

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