models

package
v0.1.1-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	ID            string `json:"id"`
	CommitMessage string `json:"commit_message"`
	CommitHash    string `json:"commit_hash"`
	UploadURL     string `json:"upload_url"`
}

type Database

type Database struct {
	Name        string `json:"name"`
	Driver      string `json:"driver"`
	MinCapacity *int64 `json:"min_capacity"`
	MaxCapacity *int64 `json:"max_capacity"`
}

type Deployment

type Deployment struct {
	ID          string           `json:"id"`
	State       string           `json:"state"`
	Artifact    string           `json:"artifact"`
	Environment string           `json:"environment"`
	Count       string           `json:"count"`
	Manifest    Manifest         `json:"manifest"`
	Steps       []DeploymentStep `json:"steps"`
}

type DeploymentStep

type DeploymentStep struct {
	ID           string    `json:"id"`
	Name         string    `json:"name"`
	State        string    `json:"state"`
	Result       string    `json:"result"`
	BeforeStepID string    `json:"after_step_id"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
}

type Environment

type Environment struct {
	ID        string     `json:"id"`
	Name      string     `json:"name"`
	Projects  []Project  `json:"projects"`
	Databases []Database `json:"databases"`
	CreatedAt time.Time  `json:"created_at"`
	UpdatedAt time.Time  `json:"updated_at"`
	DeletedAt *time.Time `json:"-"`
}

type Error

type Error struct {
	Message string `json:"error"`
}

type Login

type Login struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type Manifest

type Manifest struct {
	Name         string                `json:"name" validate:"required,max=256"`
	Files        *[]string             `json:"files"`
	Trigger      string                `json:"trigger" validate:"required,oneof=gateway queue"`
	Environments []ManifestEnvironment `json:"environments" validate:"required,gt=0,dive"`
}

type ManifestDatabase

type ManifestDatabase struct {
	Name   string `json:"name" validate:"required,max=256"`
	Driver string `json:"driver" validate:"required,oneof=mysql postgresql"`
}

type ManifestEnvironment

type ManifestEnvironment struct {
	Name      string             `json:"name" validate:"required,max=256"`
	Databases []ManifestDatabase `json:"databases" validate:"dive"`
	Variables []ManifestVariable `json:"variables" validate:"dive"`
}

type ManifestPackage

type ManifestPackage struct {
	Includes *[]string `json:"includes"`
}

type ManifestVariable

type ManifestVariable struct {
	Key   string `json:"key" validate:"required,max=256"`
	Value string `json:"value" validate:"required,max=256"`
}

type Organisation

type Organisation struct {
	ID           string        `json:"id"`
	Name         string        `json:"name"`
	Environments []Environment `json:"environments"`
}

type Project

type Project struct {
	ID        string     `json:"id"`
	Name      string     `json:"name"`
	Url       string     `json:"url"`
	Variables []Variable `json:"variables"`
	Artifact  Artifact   `json:"artifact"`
	CreatedAt time.Time  `json:"created_at"`
	UpdatedAt time.Time  `json:"updated_at"`
	DeletedAt *time.Time `json:"-"`
}

type Token

type Token struct {
	Value string `json:"token"`
}

type User

type User struct {
	ID            string         `json:"id"`
	Email         string         `json:"email"`
	Organisations []Organisation `json:"organisations,omitempty"`
	CreatedAt     time.Time      `json:"created_at"`
	UpdatedAt     time.Time      `json:"updated_at"`
}

type Variable

type Variable struct {
	ID    string `json:"id"`
	Key   string `json:"key"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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