usecase

package
v0.0.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

type Mock struct {
	MockLoadData        func(ctx context.Context, req []*model.LoadRequest) error
	MockAuthorize       func(ctx context.Context, input *model.AuthPolicyInput) error
	MockObjectToSources func(ctx context.Context, obj model.Object) ([]*model.Source, error)
	MockEnqueue         func(ctx context.Context, req *model.EnqueueRequest) (*model.EnqueueResponse, error)
}

func (Mock) Authorize

func (x Mock) Authorize(ctx context.Context, input *model.AuthPolicyInput) error

func (Mock) Enqueue added in v0.0.5

func (*Mock) Load

func (x *Mock) Load(ctx context.Context, req []*model.LoadRequest) error

func (Mock) ObjectToSources

func (x Mock) ObjectToSources(ctx context.Context, obj model.Object) ([]*model.Source, error)

type Option

type Option func(*UseCase)

func WithMetadata

func WithMetadata(metadata *model.MetadataConfig) Option

type UseCase

type UseCase struct {
	// contains filtered or unexported fields
}

func New

func New(clients *infra.Clients, options ...Option) *UseCase

func (*UseCase) ApplyInferredSchema

func (x *UseCase) ApplyInferredSchema(ctx context.Context, urls []types.CSUrl) error

func (*UseCase) Authorize

func (x *UseCase) Authorize(ctx context.Context, input *model.AuthPolicyInput) error

UseCase is a usecase of authorization for HTTP access. It uses policy engine to evaluate the access control.

func (*UseCase) Enqueue added in v0.0.5

func (*UseCase) Load

func (x *UseCase) Load(ctx context.Context, requests []*model.LoadRequest) error

func (*UseCase) LoadDataByObject

func (x *UseCase) LoadDataByObject(ctx context.Context, url types.CSUrl) error

func (*UseCase) ObjectToSources

func (x *UseCase) ObjectToSources(ctx context.Context, obj model.Object) ([]*model.Source, error)

Jump to

Keyboard shortcuts

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