handler

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CantabularClient added in v0.5.0

type CantabularClient interface {
	GetDimensionsByName(ctx context.Context, req cantabular.GetDimensionsByNameRequest) (*cantabular.GetDimensionsResponse, error)
}

type DatasetAPIClient added in v0.5.0

type DatasetAPIClient interface {
	PutInstance(ctx context.Context, userAuthToken, serviceAuthToken, collectionID, instanceID string, i dataset.UpdateInstance, ifMatch string) (eTag string, err error)
	PutInstanceState(ctx context.Context, serviceAuthToken, instanceID string, state dataset.State, ifMatch string) (eTag string, err error)
}

type Error

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

Error is the handler package's error type. Is not meant to be compared as a type, but information should be extracted via the interfaces it implements with callback functions. Is not guaranteed to remain exported so shouldn't be treated as such.

func NewError added in v1.9.0

func NewError(err error, logData map[string]interface{}, instanceCompleted bool) *Error

NewError creates a new Error

func (*Error) Error

func (e *Error) Error() string

Error implements the Go standard error interface

func (*Error) InstanceCompleted added in v0.5.0

func (e *Error) InstanceCompleted() bool

InstanceCompleted implements the instanceCompleteder interface and allows you to extract the instanceCompleted flag from an error. Is specific to this application and unlikely to be found elsewhere

func (*Error) LogData

func (e *Error) LogData() map[string]interface{}

LogData implements the DataLogger interface which allows you extract embedded log.Data from an error

func (*Error) Unwrap

func (e *Error) Unwrap() error

Unwrap implements Go's error wrapping interface

type ImportAPIClient added in v1.7.0

type ImportAPIClient interface {
	UpdateImportJobState(ctx context.Context, jobID, serviceToken string, newState importapi.State) error
}

type InstanceStarted

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

InstanceStarted is the handler for the InstanceStarted event

func (*InstanceStarted) CreateUpdateInstanceRequest added in v1.9.0

func (h *InstanceStarted) CreateUpdateInstanceRequest(ctx context.Context, vars gql.Variables, e *event.InstanceStarted, r *recipe.Recipe, codelists []recipe.CodeList, edition string) dataset.UpdateInstance

func (*InstanceStarted) Handle

func (h *InstanceStarted) Handle(ctx context.Context, workerID int, msg kafka.Message) error

Handle takes a single event.

func (*InstanceStarted) TriggerImportDimensionOptions added in v1.9.0

func (h *InstanceStarted) TriggerImportDimensionOptions(r *recipe.Recipe, codelists []recipe.CodeList, e *event.InstanceStarted) []error

type RecipeAPIClient added in v0.5.0

type RecipeAPIClient interface {
	GetRecipe(ctx context.Context, userAuthToken, serviceAuthToken, recipeID string) (*recipe.Recipe, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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