mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 20:24:21 +01:00
committed by
GitHub
parent
28db168af0
commit
0210d39866
24
asp/internal/core/domain/round_repo.go
Normal file
24
asp/internal/core/domain/round_repo.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package domain
|
||||
|
||||
import "context"
|
||||
|
||||
type RoundEventRepository interface {
|
||||
Save(ctx context.Context, events ...RoundEvent) error
|
||||
Load(ctx context.Context, id string) (*Round, error)
|
||||
}
|
||||
|
||||
type RoundRepository interface {
|
||||
AddRound(ctx context.Context, round *Round) error
|
||||
GetCurrentRound(ctx context.Context) (*Round, error)
|
||||
GetRoundWithId(ctx, id string) (*Round, error)
|
||||
GetRoundWithTxid(ctx, txid string) (*Round, error)
|
||||
UpdateRound(
|
||||
ctx context.Context, id string, updateFn func(r *Round) (*Round, error),
|
||||
) error
|
||||
}
|
||||
|
||||
type VtxoRepository interface {
|
||||
AddVtxos(ctx context.Context, vtxos []Vtxo) error
|
||||
SpendVtxos(ctx context.Context, vtxos []VtxoKey) error
|
||||
GetVtxos(ctx context.Context, vtxos []VtxoKey) ([]Vtxo, error)
|
||||
}
|
||||
Reference in New Issue
Block a user