17 lines
827 B
Go
17 lines
827 B
Go
package helicopter
|
|
|
|
import "context"
|
|
|
|
type Repository interface {
|
|
Create(ctx context.Context, helicopter *Helicopter) error
|
|
Update(ctx context.Context, helicopter *Helicopter) error
|
|
ExistsByIdentifier(ctx context.Context, identifier string, excludeID []byte) (bool, error)
|
|
Delete(ctx context.Context, id []byte) error
|
|
GetByID(ctx context.Context, id []byte) (*Helicopter, error)
|
|
List(ctx context.Context, filter string, statuses []string, sort string, limit, offset int, groundedIDs [][]byte) ([]Helicopter, int64, error)
|
|
NextReportNumber(ctx context.Context, id []byte) (string, int, error)
|
|
IsInUse(ctx context.Context, id []byte) (bool, error)
|
|
InUseByAircraftIDs(ctx context.Context, ids [][]byte) (map[string]bool, error)
|
|
ActiveFlightIDByAircraftIDs(ctx context.Context, ids [][]byte) (map[string][]byte, error)
|
|
}
|