Help us shape the future of Go! Take the 2026 Go Developer Survey

state

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const SwapTransactionSchemaVersion = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func New

func New(root string) (*Store, error)

func (*Store) AcquireRead added in v0.9.0

func (s *Store) AcquireRead(ctx context.Context, skill string) (func(), error)

func (*Store) AcquireWrite added in v0.9.0

func (s *Store) AcquireWrite(ctx context.Context, skill string) (func(), error)

func (*Store) DeleteSwapTransaction added in v0.9.0

func (s *Store) DeleteSwapTransaction(skill string) error

func (*Store) EnsureLayout

func (s *Store) EnsureLayout() error

func (*Store) IsInstalled

func (s *Store) IsInstalled(skill string) (bool, error)

func (*Store) ListSkills

func (s *Store) ListSkills() ([]string, error)

func (*Store) ListSwapTransactions added in v0.9.0

func (s *Store) ListSwapTransactions() ([]SwapTransaction, error)

func (*Store) LoadSwapTransaction added in v0.9.0

func (s *Store) LoadSwapTransaction(skill string) (SwapTransaction, error)

func (*Store) Resolve

func (s *Store) Resolve(skill string) (string, error)

func (*Store) Root

func (s *Store) Root() string

func (*Store) SaveSwapTransaction added in v0.9.0

func (s *Store) SaveSwapTransaction(transaction SwapTransaction) error

func (*Store) SkillPath added in v0.9.0

func (s *Store) SkillPath(skill string) (string, error)

func (*Store) SwapBackupPath added in v0.9.0

func (s *Store) SwapBackupPath(skill string) (string, error)

func (*Store) TempPath

func (s *Store) TempPath(prefix string) (string, error)

type SwapTransaction added in v0.9.0

type SwapTransaction struct {
	SchemaVersion   int       `json:"schema_version"`
	Skill           string    `json:"skill"`
	Phase           string    `json:"phase"`
	PreviousDigest  string    `json:"previous_digest"`
	CandidateDigest string    `json:"candidate_digest"`
	CreatedAt       time.Time `json:"created_at"`
}

Jump to

Keyboard shortcuts

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