atom

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Atom

type Atom interface {
	WithDatabase(*gorm.DB) Atom
	List(*ListRequest) (models.Atoms, error)
	Get(uuid.UUID) (*models.Atom, error)
	Create(*CreateRequest) (*models.Atom, error)
	Delete(uuid.UUID) error
}

func Service

func Service(ctx context.Context) Atom

func ServiceWithDB

func ServiceWithDB(ctx context.Context, conn *gorm.DB) Atom

ServiceWithDB creates an Atom service backed by the supplied database connection, bypassing the global db.Connection() singleton. This is used by the local runner to avoid initialising the production database.

type CreateRequest

type CreateRequest struct {
	Engine  string         `json:"engine"`
	Image   string         `json:"image"`
	Command []string       `json:"command"`
	Spec    container.Spec `json:"spec"`
}

func (*CreateRequest) CommandString

func (r *CreateRequest) CommandString() (string, error)

func (*CreateRequest) SpecJSON

func (r *CreateRequest) SpecJSON() (datatypes.JSON, error)

type ListRequest

type ListRequest struct {
	Limit   uint64
	Offset  uint64
	OrderBy []string
	Engine  string
}

Jump to

Keyboard shortcuts

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