interfaces

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BigQuery

type BigQuery interface {
	Query(ctx context.Context, query string) (BigQueryIterator, error)
	NewStream(ctx context.Context, datasetID types.BQDatasetID, tableID types.BQTableID, schema bigquery.Schema) (BigQueryStream, error)

	GetMetadata(ctx context.Context, dataset types.BQDatasetID, table types.BQTableID) (*bigquery.TableMetadata, error)
	UpdateTable(ctx context.Context, dataset types.BQDatasetID, table types.BQTableID, md bigquery.TableMetadataToUpdate, eTag string) error
	CreateTable(ctx context.Context, dataset types.BQDatasetID, table types.BQTableID, md *bigquery.TableMetadata) error
}

type BigQueryIterator

type BigQueryIterator interface {
	Next(dst interface{}) error
}

type BigQueryStream added in v0.1.2

type BigQueryStream interface {
	Insert(ctx context.Context, data []any) error
	Close() error
}

type CSObjectIterator

type CSObjectIterator interface {
	Next() (*storage.ObjectAttrs, error)
}

type CloudStorage

type CloudStorage interface {
	Open(ctx context.Context, obj model.CloudStorageObject) (io.ReadCloser, error)
	Attrs(ctx context.Context, obj model.CloudStorageObject) (*storage.ObjectAttrs, error)
	List(ctx context.Context, bucket types.CSBucket, query *storage.Query) CSObjectIterator
}

type Database added in v0.1.0

type Database interface {
	GetOrCreateState(ctx context.Context, msgType types.MsgType, input *model.State) (*model.State, bool, error)
	GetState(ctx context.Context, msgType types.MsgType, id string) (*model.State, error)
	UpdateState(ctx context.Context, msgType types.MsgType, id string, state types.MsgState, now time.Time) error
}

type PubSub added in v0.0.5

type PubSub interface {
	Publish(ctx context.Context, data []byte) (types.PubSubMessageID, error)
}

type UseCase

type UseCase interface {
	ObjectToSources(ctx context.Context, obj model.Object) ([]*model.Source, error)
	Load(ctx context.Context, requests []*model.LoadRequest) error
	Enqueue(ctx context.Context, req *model.EnqueueRequest) (*model.EnqueueResponse, error)
	Authorize(ctx context.Context, input *model.AuthPolicyInput) error

	GetOrCreateState(ctx context.Context, msgType types.MsgType, id string) (*model.State, bool, error)
	UpdateState(ctx context.Context, msgType types.MsgType, id string, state types.MsgState) error
	WaitState(ctx context.Context, msgType types.MsgType, id string, expiresAt time.Time) error
}

Jump to

Keyboard shortcuts

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