gen

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Drivers = []string{"MYSQL", "POSTGRESQL", "MARIADB", "SQLITE", "SQLSERVER", "CLICKHOUSE"}
)

Functions

func Generate

func Generate(cfg *Config) ([]byte, error)

Generate the content of the atlas ci lint yaml.

Types

type Config

type Config struct {
	Flow             string
	From             string
	To               string
	Path             string
	DirName          string
	SecretName       string
	DefaultBranch    string
	Driver           string
	Env              Env
	SchemaScope      bool
	CloudRepo        string
	SetupSchemaApply bool
}

Config passed to template parser

type Env added in v0.3.0

type Env struct {
	Name string
	// HasDevURL is true if the env block has dev attribute
	HasDevURL bool
	// HasURL is true if the env block has url attribute
	HasURL bool
	// Path is the path of the file containing the env block
	Path string
	// HasSchemaSrc is true if the env block has schema.src attribute
	HasSchemaSrc bool
	// HasRepoName is true if the schema block has repo.name attribute
	HasRepoName bool
}

Jump to

Keyboard shortcuts

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