store

package
v0.4.3-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package store provides concrete persistence implementations backing the persistence interfaces defined in pkg/store (currently SQLite).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeploymentStore

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

func NewDeploymentStore

func NewDeploymentStore(db *sql.DB) *DeploymentStore

func (DeploymentStore) CreateDeployment

func (ds DeploymentStore) CreateDeployment(ctx context.Context, deployment *store.Deployment) error

func (DeploymentStore) GetDeployment

func (ds DeploymentStore) GetDeployment(ctx context.Context, id string) (*store.Deployment, error)

func (DeploymentStore) ListDeployments

func (ds DeploymentStore) ListDeployments(ctx context.Context, limit, offset int) ([]*store.Deployment, error)

func (DeploymentStore) UpdateDeploymentStatus

func (ds DeploymentStore) UpdateDeploymentStatus(ctx context.Context, id, status string) error

type InstanceStore

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

InstanceStore provides DB-backed access to the single local instance record.

func NewInstanceStore

func NewInstanceStore(db *sql.DB) *InstanceStore

func (*InstanceStore) GetAccessToken

func (s *InstanceStore) GetAccessToken(ctx context.Context) (string, error)

func (*InstanceStore) GetBootstrapToken

func (s *InstanceStore) GetBootstrapToken(ctx context.Context) (string, error)

func (*InstanceStore) GetInstance

func (s *InstanceStore) GetInstance(ctx context.Context) (*store.Instance, error)

func (*InstanceStore) RegisterInstance

func (s *InstanceStore) RegisterInstance(ctx context.Context, i *store.Instance) error

func (*InstanceStore) SetAccessToken

func (s *InstanceStore) SetAccessToken(ctx context.Context, token string) error

func (*InstanceStore) SetBootstrapToken

func (s *InstanceStore) SetBootstrapToken(ctx context.Context, token string) error

func (*InstanceStore) UpdateLastInstalledAt

func (s *InstanceStore) UpdateLastInstalledAt(ctx context.Context) error

type ServiceStore

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

func NewServiceStore

func NewServiceStore(db *sql.DB, ds *DeploymentStore) *ServiceStore

func (ServiceStore) CreateService

func (s ServiceStore) CreateService(ctx context.Context, svc *store.Service) (*store.Service, error)

func (ServiceStore) GetService

func (s ServiceStore) GetService(ctx context.Context, id string) (*store.Service, error)

func (ServiceStore) ListServices

func (s ServiceStore) ListServices(ctx context.Context, limit, offset int) ([]*store.Service, error)

func (ServiceStore) UpdateService

func (s ServiceStore) UpdateService(ctx context.Context, svc *store.Service) error

type TaskResultStore

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

TaskResultStore implements store.TaskResultStore using SQLite.

func NewTaskResultStore

func NewTaskResultStore(db *sql.DB) *TaskResultStore

func (*TaskResultStore) ListUnsent

func (s *TaskResultStore) ListUnsent(ctx context.Context) ([]*store.TaskResult, error)

func (*TaskResultStore) MarkSynced

func (s *TaskResultStore) MarkSynced(ctx context.Context, ids []string) error

func (*TaskResultStore) SaveResults

func (s *TaskResultStore) SaveResults(ctx context.Context, results []*store.TaskResult) error

Jump to

Keyboard shortcuts

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