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

runci

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: AGPL-3.0 Imports: 32 Imported by: 0

Documentation

Overview

Package runci provides a tools to run and check migrations in CI.

Package runci provides a tools to run and check migrations in CI.

Index

Constants

View Source
const (
	PasswordLength     = 16
	PasswordMinDigits  = 4
	PasswordMinSymbols = 0
)

Constants for autogenerated passwords.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Host              string `yaml:"host"`
	Port              uint   `yaml:"port"`
	VerificationToken string `yaml:"verificationToken"`
	Debug             bool   `yaml:"debug"`
}

App defines a general configuration of the application.

type Config

type Config struct {
	App      App             `yaml:"app"`
	DLE      DLE             `yaml:"dle"`
	Platform platform.Config `yaml:"platform"`
	Source   source.Config   `yaml:"source"`
	Runner   Runner          `yaml:"runner"`
}

Config contains a runner configuration.

type DLE

type DLE struct {
	VerificationToken string `yaml:"verificationToken"`
	URL               string `yaml:"url"`
	DBName            string `yaml:"dbName"`
	Container         string `yaml:"container"`
}

DLE describes the configuration of the Database Lab Engine server.

type MigrationResult

type MigrationResult struct {
	CloneID string            `json:"clone_id"`
	Session *observer.Session `json:"session"`
}

MigrationResult provides the results of the executed migration.

type Runner

type Runner struct {
	Image string `yaml:"image"`
}

Runner defines runner configuration.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server defines an HTTP server of the CI Migration Checker.

func NewServer

func NewServer(cfg *Config, dle *dblabapi.Client, platform *platform.Service, code source.Provider, docker *client.Client,
	networkID string) *Server

NewServer initializes a new runner Server instance.

func (*Server) Run

func (s *Server) Run() error

Run starts HTTP server on specified port in configuration.

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Shutdown gracefully shuts down the server without interrupting any active connections.

type StartMigrationRequest

type StartMigrationRequest struct {
	Source            source.Opts        `json:"source"`
	Username          string             `json:"username"`
	UsernameFull      string             `json:"username_full"`
	UsernameLink      string             `json:"username_link"`
	DBName            string             `json:"db_name"`
	Commands          []string           `json:"commands"`
	MigrationEnvs     []string           `json:"migration_envs"`
	ObservationConfig dblab_types.Config `json:"observation_config"`
	KeepClone         bool               `json:"keep_clone"`
}

StartMigrationRequest defines a request to start migration check.

Directories

Path Synopsis
Package source provides a tools to use version control systems.
Package source provides a tools to use version control systems.

Jump to

Keyboard shortcuts

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