state

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 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 Frozen

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

func (*Frozen) All

func (f *Frozen) All() ([]*FrozenEntry, error)

func (*Frozen) Del

func (f *Frozen) Del(pkgId string) error

func (*Frozen) Put

func (f *Frozen) Put(pkgId string) error

type FrozenEntry

type FrozenEntry struct {
	PkgId string `storm:"id"`
}

type FsEntry

type FsEntry struct {
	Key  string       `storm:"id"`
	Path string       `storm:"index"`
	Pkg  string       `storm:"index"`
	Type actions.Type `storm:"index"`
}

func NewFsEntry

func NewFsEntry(path string, pkg string, typ actions.Type) *FsEntry

type Objects

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

func (*Objects) All

func (o *Objects) All() ([]*FsEntry, error)

func (*Objects) Del

func (o *Objects) Del(pkg string) error

func (*Objects) Get

func (o *Objects) Get(path string) ([]*FsEntry, error)

func (*Objects) Put

func (o *Objects) Put(path string, pkg string, typ actions.Type) error

type Packages

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

func (*Packages) All

func (p *Packages) All() ([]*ops.Manifest, error)

func (*Packages) Del

func (p *Packages) Del(name string) error

func (*Packages) Get

func (p *Packages) Get(name string) (*ops.Manifest, error)

func (*Packages) Put

func (p *Packages) Put(name string, pkg *ops.Manifest) error

type PkgEntry

type PkgEntry struct {
	Name     string `storm:"id"`
	Manifest []byte
}

type State

type State struct {
	Path         string
	Frozen       *Frozen
	Packages     *Packages
	Objects      *Objects
	Transactions *Transactions
	// contains filtered or unexported fields
}

func New

func New(path string, readOnly bool) *State

func (*State) Close

func (s *State) Close()

func (*State) Touch added in v0.2.0

func (s *State) Touch() error

type TransactionEntry

type TransactionEntry struct {
	Key       string `storm:"id"`
	Id        string `storm:"index"`
	PkgId     string
	Operation string
	Date      *time.Time `storm:"index"`
}

func NewTransactionEntry

func NewTransactionEntry(id string, pkgId string, operation string, date *time.Time) *TransactionEntry

type Transactions

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

func (*Transactions) All

func (t *Transactions) All() ([]*TransactionEntry, error)

func (*Transactions) Get

func (t *Transactions) Get(id string) ([]*TransactionEntry, error)

func (*Transactions) Put

func (t *Transactions) Put(id string, pkgId string, operation string, date *time.Time) error

Jump to

Keyboard shortcuts

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