interfaces

package
v1.9.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactRepo

type ArtifactRepo interface {
	Create(ctx context.Context, in models.Artifact) error
	Get(ctx context.Context, in models.ArtifactKey) (models.Artifact, error)
	List(ctx context.Context, datasetKey models.DatasetKey, in models.ListModelsInput) ([]models.Artifact, error)
	Update(ctx context.Context, artifact models.Artifact) error
}

type DataCatalogRepo

type DataCatalogRepo interface {
	DatasetRepo() DatasetRepo
	ArtifactRepo() ArtifactRepo
	TagRepo() TagRepo
	ReservationRepo() ReservationRepo
}

type DatasetRepo

type DatasetRepo interface {
	Create(ctx context.Context, in models.Dataset) error
	Get(ctx context.Context, in models.DatasetKey) (models.Dataset, error)
	List(ctx context.Context, in models.ListModelsInput) ([]models.Dataset, error)
}

type PartitionRepo

type PartitionRepo interface {
	Create(ctx context.Context, in models.Partition) error
}

type ReservationRepo

type ReservationRepo interface {

	// Create a new reservation if the reservation does not already exist
	Create(ctx context.Context, reservation models.Reservation, now time.Time) error

	// Delete a reservation if it exists
	Delete(ctx context.Context, reservation models.ReservationKey, ownerID string) error

	// Get reservation
	Get(ctx context.Context, reservationKey models.ReservationKey) (models.Reservation, error)

	// Update an existing reservation. If called by the current owner, we update the
	// expiresAt timestamp. If called by a new owner and the current reservation has
	// expired, we attempt to take over the reservation.
	Update(ctx context.Context, reservation models.Reservation, now time.Time) error
}

Interface to interact with Reservation Table

type TagRepo

type TagRepo interface {
	Create(ctx context.Context, in models.Tag) error
	Get(ctx context.Context, in models.TagKey) (models.Tag, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL