Documentation
¶
Index ¶
- func Module(module common.Module)
- type ChainLink
- type ChainRecord
- type ChainService
- type Hash
- type KV
- type KVStore
- type ObjectRecord
- type ObjectService
- type RefRecord
- type RefService
- type Repository
- func (repo *Repository) FindChain(tx *sql.Tx, localId string, hash Hash) (*ChainRecord, error)
- func (repo *Repository) FindObject(tx *sql.Tx, localId string, hash Hash) (*ObjectRecord, error)
- func (repo *Repository) FindRef(tx *sql.Tx, localId string, name string) (*RefRecord, error)
- func (repo *Repository) HasObject(tx *sql.Tx, localId string, hash Hash) (bool, error)
- func (repo *Repository) PutChain(tx *sql.Tx, localId string, record *ChainRecord) error
- func (repo *Repository) PutObject(tx *sql.Tx, localId string, record *ObjectRecord) error
- func (repo *Repository) PutRef(tx *sql.Tx, localId string, record *RefRecord) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChainRecord ¶
type ChainService ¶
type ChainService interface {
Put(local *common.Ulid, head *ChainLink) (Hash, error)
Get(local *common.Ulid, hash Hash) (*ChainLink, error)
Chain(local *common.Ulid, head Hash) iter.Seq[common.ErrorOr[*ChainLink]]
}
func NewChainService ¶
func NewChainService(repo *Repository) ChainService
type ObjectRecord ¶
type ObjectService ¶
type ObjectService interface {
Put(localId *common.Ulid, object []byte) (hash Hash, err error)
Get(localId *common.Ulid, hash Hash) ([]byte, error)
}
func NewObjectService ¶
func NewObjectService(repo *Repository) ObjectService
type RefService ¶
type RefService interface {
Put(local *common.Ulid, name string, link Hash) error
Get(local *common.Ulid, name string) (Hash, error)
}
func NewRefService ¶
func NewRefService(repo *Repository) RefService
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(proxy database.Proxy) *Repository
func (*Repository) FindChain ¶
func (repo *Repository) FindChain(tx *sql.Tx, localId string, hash Hash) (*ChainRecord, error)
func (*Repository) FindObject ¶
func (repo *Repository) FindObject(tx *sql.Tx, localId string, hash Hash) (*ObjectRecord, error)
func (*Repository) PutChain ¶
func (repo *Repository) PutChain(tx *sql.Tx, localId string, record *ChainRecord) error
func (*Repository) PutObject ¶
func (repo *Repository) PutObject(tx *sql.Tx, localId string, record *ObjectRecord) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.