reffs

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReflogReader

func NewReflogReader(r io.ReadSeekCloser) (ref.ReflogReader, error)

Types

type Store

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

func NewStore

func NewStore(rootDir string) *Store

func (*Store) Copy

func (s *Store) Copy(srcKey, dstKey string) (err error)

func (*Store) Delete

func (s *Store) Delete(key string) error

func (*Store) DeleteTransaction added in v0.10.1

func (s *Store) DeleteTransaction(id uuid.UUID) error

func (*Store) Filter

func (s *Store) Filter(prefixes, notPrefixes []string) (m map[string][]byte, err error)

func (*Store) FilterKey

func (s *Store) FilterKey(prefixes, notPrefixes []string) (keys []string, err error)

func (*Store) GCTransactions added in v0.10.1

func (s *Store) GCTransactions(txTTL time.Duration) (ids []uuid.UUID, err error)

func (*Store) Get

func (s *Store) Get(key string) (val []byte, err error)

func (*Store) GetTransaction added in v0.10.1

func (s *Store) GetTransaction(id uuid.UUID) (*ref.Transaction, error)

func (*Store) GetTransactionLogs added in v0.10.1

func (s *Store) GetTransactionLogs(txid uuid.UUID) (logs map[string]*ref.Reflog, err error)

func (*Store) ListTransactions added in v0.10.1

func (s *Store) ListTransactions(offset, limit int) (txs []*ref.Transaction, err error)

func (*Store) LogReader

func (s *Store) LogReader(key string) (ref.ReflogReader, error)

func (*Store) NewTransaction added in v0.10.1

func (s *Store) NewTransaction(tx *ref.Transaction) (*uuid.UUID, error)

func (*Store) Rename

func (s *Store) Rename(oldKey, newKey string) (err error)

func (*Store) Set

func (s *Store) Set(key string, val []byte) error

func (*Store) SetWithLog

func (s *Store) SetWithLog(key string, val []byte, log *ref.Reflog) error

func (*Store) UpdateTransaction added in v0.10.1

func (s *Store) UpdateTransaction(tx *ref.Transaction) error

Jump to

Keyboard shortcuts

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