Documentation
¶
Index ¶
- Variables
- type ReflogReader
- type Store
- func (s *Store) Copy(srcKey, dstKey string) (err error)
- func (s *Store) CountTransactions() (int, error)
- func (s *Store) Delete(key string) error
- func (s *Store) DeleteTransaction(id uuid.UUID) error
- func (s *Store) Filter(prefixes []string, notPrefixes []string) (m map[string][]byte, err error)
- func (s *Store) FilterKey(prefixes []string, notPrefixes []string) (keys []string, err error)
- func (s *Store) GCTransactions(txTTL time.Duration) (ids []uuid.UUID, err error)
- func (s *Store) Get(key string) ([]byte, error)
- func (s *Store) GetTransaction(id uuid.UUID) (*ref.Transaction, error)
- func (s *Store) GetTransactionLogs(txid uuid.UUID) (logs map[string]*ref.Reflog, err error)
- func (s *Store) ListTransactions(offset, limit int) (txs []*ref.Transaction, err error)
- func (s *Store) LogReader(key string) (ref.ReflogReader, error)
- func (s *Store) NewTransaction(tx *ref.Transaction) (*uuid.UUID, error)
- func (s *Store) Rename(oldKey, newKey string) (err error)
- func (s *Store) Set(key string, sum []byte) error
- func (s *Store) SetWithLog(key string, sum []byte, rl *ref.Reflog) error
- func (s *Store) UpdateTransaction(tx *ref.Transaction) error
Constants ¶
This section is empty.
Variables ¶
View Source
var CreateTableStmts = []string{
`CREATE TABLE refs (
name TEXT NOT NULL PRIMARY KEY,
sum BLOB NOT NULL
)`,
`CREATE TABLE transactions (
id BLOB NOT NULL PRIMARY KEY,
status TEXT NOT NULL,
begin DATETIME NOT NULL,
end DATETIME
)`,
`CREATE TABLE reflogs (
ref TEXT NOT NULL,
ordinal INTEGER NOT NULL,
oldoid BLOB,
newoid BLOB NOT NULL,
authorname TEXT NOT NULL DEFAULT '',
authoremail TEXT NOT NULL DEFAULT '',
time DATETIME NOT NULL,
action TEXT NOT NULL DEFAULT '',
message TEXT NOT NULL DEFAULT '',
txid BLOB,
PRIMARY KEY (ref, ordinal),
FOREIGN KEY (ref) REFERENCES refs(name),
FOREIGN KEY (txid) REFERENCES transactions(id)
)`,
}
Functions ¶
This section is empty.
Types ¶
type ReflogReader ¶
type ReflogReader struct {
// contains filtered or unexported fields
}
func (*ReflogReader) Close ¶
func (l *ReflogReader) Close() error
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) CountTransactions ¶
func (*Store) GCTransactions ¶
func (*Store) GetTransaction ¶
func (*Store) GetTransactionLogs ¶
func (*Store) ListTransactions ¶
func (s *Store) ListTransactions(offset, limit int) (txs []*ref.Transaction, err error)
func (*Store) NewTransaction ¶
func (*Store) UpdateTransaction ¶
func (s *Store) UpdateTransaction(tx *ref.Transaction) error
Click to show internal directories.
Click to hide internal directories.