entity

package
v0.0.0-...-4caae3f Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunPipeline

func RunPipeline(definition *Definition) error

func RunStage

func RunStage(ctx context.Context, cli *client.Client, containerId string, stage Stage) error

func RunStages

func RunStages(ctx context.Context, cli *client.Client, containerId string, definition *Definition) error

func RunStep

func RunStep(context context.Context, cli *client.Client, containerId string, step Step) error

func StartContainer

func StartContainer(ctx context.Context, cli *client.Client, image string) (string, error)

Types

type Application

type Application struct {
	ID        uint      `json:"id" gorm:"primaryKey"`
	Name      string    `json:"name"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type Definition

type Definition struct {
	Image      string  `yaml:"image"`
	Repository string  `yaml:"repository"`
	Stages     []Stage `yaml:"stages"`
}

func NewDefinition

func NewDefinition(yamlContent []byte) (*Definition, error)

func (*Definition) GetTemplate

func (d *Definition) GetTemplate(actualStep *Step) (Step, error)

func (*Definition) GetZipTemplate

func (d *Definition) GetZipTemplate(actualStep *Step) (Step, error)

type Project

type Project struct {
	ID        uint      `json:"id" gorm:"primaryKey"`
	Name      string    `json:"name"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type Stage

type Stage struct {
	Name  string `yaml:"name"`
	Steps []Step `yaml:"steps"`
}

type Step

type Step struct {
	Name      string            `yaml:"name"`
	Template  string            `yaml:"template,omitempty"`
	Commands  []string          `yaml:"commands,omitempty"`
	Variables map[string]string `yaml:"variables,omitempty"`
}

type User

type User struct {
	ID        uint      `gorm:"primarykey"`
	Name      string    `json:"name"`
	Email     string    `json:"email"`
	Provider  string    `json:"provider"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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