mirror of https://github.com/lightninglabs/loop
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
927 B
Go
34 lines
927 B
Go
1 year ago
|
package reservation
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
ErrReservationAlreadyExists = fmt.Errorf("reservation already exists")
|
||
|
ErrReservationNotFound = fmt.Errorf("reservation not found")
|
||
|
)
|
||
|
|
||
|
const (
|
||
|
KeyFamily = int32(42068)
|
||
|
DefaultConfTarget = int32(3)
|
||
|
IdLength = 32
|
||
|
)
|
||
|
|
||
|
// Store is the interface that stores the reservations.
|
||
|
type Store interface {
|
||
|
// CreateReservation stores the reservation in the database.
|
||
|
CreateReservation(ctx context.Context, reservation *Reservation) error
|
||
|
|
||
|
// UpdateReservation updates the reservation in the database.
|
||
|
UpdateReservation(ctx context.Context, reservation *Reservation) error
|
||
|
|
||
|
// GetReservation retrieves the reservation from the database.
|
||
|
GetReservation(ctx context.Context, id ID) (*Reservation, error)
|
||
|
|
||
|
// ListReservations lists all existing reservations the client has ever
|
||
|
// made.
|
||
|
ListReservations(ctx context.Context) ([]*Reservation, error)
|
||
|
}
|