store

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deployment

type Deployment struct {
	Slug        string  `json:"slug"`
	ContainerID string  `json:"containerId"`
	Name        string  `json:"name"`
	Image       string  `json:"image"`
	Status      string  `json:"status"`
	Runtime     string  `json:"runtime"`
	CPUPercent  float64 `json:"cpuPercent"`
	MemoryMB    float64 `json:"memoryMb"`
	CreatedAt   string  `json:"createdAt"`
	UpdatedAt   string  `json:"updatedAt"`
}

type EarningsRecord

type EarningsRecord struct {
	Platform  string  `json:"platform"`
	Balance   float64 `json:"balance"`
	Currency  string  `json:"currency"`
	Error     string  `json:"error,omitempty"`
	CreatedAt string  `json:"createdAt"`
}

type Store

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

func Open

func Open(dataDir string) (*Store, error)

func (*Store) Close

func (s *Store) Close() error

func (*Store) DeleteDeployment

func (s *Store) DeleteDeployment(slug string) error

func (*Store) GetCredentials

func (s *Store) GetCredentials(slug string) (map[string]string, error)

func (*Store) GetDeployment

func (s *Store) GetDeployment(slug string) (Deployment, bool, error)

func (*Store) ListDeployments

func (s *Store) ListDeployments() []Deployment

func (*Store) ListLatestEarnings

func (s *Store) ListLatestEarnings() []EarningsRecord

func (*Store) RecordEvent

func (s *Store) RecordEvent(slug, event, detail string)

func (*Store) SaveCredentials

func (s *Store) SaveCredentials(slug string, values map[string]string) error

func (*Store) SaveEarnings

func (s *Store) SaveEarnings(record EarningsRecord) (EarningsRecord, error)

func (*Store) UpsertDeployment

func (s *Store) UpsertDeployment(dep Deployment) error

Jump to

Keyboard shortcuts

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