apps

package
v0.0.0-...-ce96b73 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2021 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(as database.AppStore) http.HandlerFunc

func Delete

func Delete(store appsDeleter) http.HandlerFunc

func List

func NewHandler

func NewHandler(
	db *sql.DB,
	apps database.AppStore,
	components database.ComponentStore,
	deployments database.DeploymentStore,
	envs database.EnvStore,
	platforms database.PlatformStore,
) *handler

func UpdateComponents

func UpdateComponents(as database.AppStore) http.HandlerFunc

Types

type App

type App struct {
	Id         string       `json:"id"`
	Name       string       `json:"name,omitempty"`
	Created    *epoch.Epoch `json:"created,omitempty"`
	ValidFrom  *epoch.Epoch `json:"validFrom,omitempty"`
	ValidUntil *epoch.Epoch `json:"validUntil,omitempty"`
	Components []Component  `json:"components"`
}

type Component

type Component struct {
	Id       string       `json:"id"`
	Name     string       `json:"name,omitempty"`
	Image    string       `json:"image,omitempty"`
	Artifact string       `json:"artifact,omitempty"`
	Platform string       `json:"-"`
	Deployed *epoch.Epoch `json:"deployed,omitempty"`
}

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

type Repository

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

func NewRepository

func NewRepository(db *sql.DB) *Repository

func (*Repository) CurrentView

func (h *Repository) CurrentView(id, envId string) (*App, error)

func (*Repository) History

func (h *Repository) History(id, envId string, before *time.Time) (*App, error)

Jump to

Keyboard shortcuts

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