query

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	ID                 string                 `json:"id"`
	Name               string                 `json:"name"`
	CleanupRequestedAt monad.Maybe[time.Time] `json:"cleanup_requested_at"`
	CreatedAt          time.Time              `json:"created_at"`
	CreatedBy          User                   `json:"created_by"`
	Environments       map[string]Deployment  `json:"environments"`
}

type AppDetail

type AppDetail struct {
	App
	Env monad.Maybe[Env]       `json:"env"`
	VCS monad.Maybe[VCSConfig] `json:"vcs"`
}

type Deployment

type Deployment struct {
	AppID            string    `json:"app_id"`
	DeploymentNumber int       `json:"deployment_number"`
	Environment      string    `json:"environment"`
	Meta             Meta      `json:"meta"`
	State            State     `json:"state"`
	RequestedAt      time.Time `json:"requested_at"`
	RequestedBy      User      `json:"requested_by"`
}

type Env

type Env map[string]map[string]map[string]string

func (*Env) Scan

func (e *Env) Scan(value any) error

type Gateway

type Gateway interface {
	GetAppByID(context.Context, string) (AppDetail, error)
	GetAllApps(context.Context) ([]App, error)
	GetAllDeploymentsByApp(context.Context, string, GetDeploymentsFilters) (storage.Paginated[Deployment], error)
	GetDeploymentByID(context.Context, string, int) (Deployment, error)
	GetDeploymentLogfileByID(context.Context, string, int) (string, error)
}

Access to the underlying storage adapter for read use cases

type GetDeploymentsFilters

type GetDeploymentsFilters struct {
	Page        monad.Maybe[int]    `form:"page"`
	Environment monad.Maybe[string] `form:"environment"`
}

type Meta

type Meta struct {
	Kind string              `json:"kind"`
	Data monad.Maybe[string] `json:"data"` // Contain trigger data only when the information is not sensitive
}

type Service

type Service struct {
	Name  string              `json:"name"`
	Image string              `json:"image"`
	Url   monad.Maybe[string] `json:"url"`
}

type Services

type Services []Service

func (*Services) Scan

func (s *Services) Scan(value any) error

type State

type State struct {
	Status     uint8                  `json:"status"`
	Services   monad.Maybe[Services]  `json:"services"`
	ErrCode    monad.Maybe[string]    `json:"error_code"`
	StartedAt  monad.Maybe[time.Time] `json:"started_at"`
	FinishedAt monad.Maybe[time.Time] `json:"finished_at"`
}

type User

type User struct {
	ID    string `json:"id"`
	Email string `json:"email"`
}

type VCSConfig

type VCSConfig struct {
	Url   string                          `json:"url"`
	Token monad.Maybe[query.SecretString] `json:"token"`
}

Jump to

Keyboard shortcuts

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