badger

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationStore

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

ApplicationStore is a wrapper around a badgerhold.Store that implements the domain.ApplicationStore interface.

func NewApplicationStore

func NewApplicationStore(store *badgerhold.Store) *ApplicationStore

NewApplicationStore creates a new ApplicationStore.

func (*ApplicationStore) Add

Add adds a new application, based on the Application structure provided as argument

func (*ApplicationStore) Delete

func (as *ApplicationStore) Delete(ctx context.Context, name string) error

Delete deletes the application registered by FuseML

func (*ApplicationStore) Find

Find returns a application identified by id

func (*ApplicationStore) GetAll

func (as *ApplicationStore) GetAll(ctx context.Context, applicationType *string, applicationWorkflow *string) ([]*domain.Application, error)

GetAll returns all applications of a given type. If type is not specified, return all applications.

type ExtensionStore

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

ExtensionStore is a wrapper around a badgerhold.Store that implements the domain.ExtensionStore interface.

func NewExtensionStore

func NewExtensionStore(store *badgerhold.Store) *ExtensionStore

NewExtensionStore creates a new ExtensionStore.

func (*ExtensionStore) AddExtension

func (es *ExtensionStore) AddExtension(ctx context.Context, extension *domain.Extension) (*domain.Extension, error)

AddExtension adds a new extension to the store.

func (*ExtensionStore) AddExtensionService

func (es *ExtensionStore) AddExtensionService(ctx context.Context, extensionID string, service *domain.ExtensionService) (*domain.ExtensionService, error)

AddExtensionService adds a new extension service to an extension.

func (*ExtensionStore) AddExtensionServiceCredentials

func (es *ExtensionStore) AddExtensionServiceCredentials(ctx context.Context, extensionID string, serviceID string, credentials *domain.ExtensionServiceCredentials) (*domain.ExtensionServiceCredentials, error)

AddExtensionServiceCredentials adds a new credential to an extension service.

func (*ExtensionStore) AddExtensionServiceEndpoint

func (es *ExtensionStore) AddExtensionServiceEndpoint(ctx context.Context, extensionID string, serviceID string, endpoint *domain.ExtensionServiceEndpoint) (*domain.ExtensionServiceEndpoint, error)

AddExtensionServiceEndpoint adds a new endpoint to an extension service.

func (*ExtensionStore) DeleteExtension

func (es *ExtensionStore) DeleteExtension(ctx context.Context, extensionID string) error

DeleteExtension deletes an extension from the store.

func (*ExtensionStore) DeleteExtensionService

func (es *ExtensionStore) DeleteExtensionService(ctx context.Context, extensionID string, serviceID string) error

DeleteExtensionService deletes an extension service from an extension.

func (*ExtensionStore) DeleteExtensionServiceCredentials

func (es *ExtensionStore) DeleteExtensionServiceCredentials(ctx context.Context, extensionID string, serviceID string, credentialsID string) error

DeleteExtensionServiceCredentials deletes an extension credential from an extension service.

func (*ExtensionStore) DeleteExtensionServiceEndpoint

func (es *ExtensionStore) DeleteExtensionServiceEndpoint(ctx context.Context, extensionID string, serviceID string, endpointID string) error

DeleteExtensionServiceEndpoint deletes an extension endpoint from an extension service.

func (*ExtensionStore) GetExtension

func (es *ExtensionStore) GetExtension(ctx context.Context, extensionID string) (*domain.Extension, error)

GetExtension retrieves an extension by its ID.

func (*ExtensionStore) GetExtensionAccessDescriptors

func (es *ExtensionStore) GetExtensionAccessDescriptors(ctx context.Context, query *domain.ExtensionQuery) (result []*domain.ExtensionAccessDescriptor, err error)

GetExtensionAccessDescriptors retrieves access descriptors belonging to an extension that matches the query.

func (*ExtensionStore) GetExtensionService

func (es *ExtensionStore) GetExtensionService(ctx context.Context, extensionID string, serviceID string) (*domain.ExtensionService, error)

GetExtensionService retrieves an extension service by its ID.

func (*ExtensionStore) GetExtensionServiceCredentials

func (es *ExtensionStore) GetExtensionServiceCredentials(ctx context.Context, extensionID string, serviceID string, credentialsID string) (*domain.ExtensionServiceCredentials, error)

GetExtensionServiceCredentials retrieves an extension credential by its ID.

func (*ExtensionStore) GetExtensionServiceEndpoint

func (es *ExtensionStore) GetExtensionServiceEndpoint(ctx context.Context, extensionID string, serviceID string, endpointID string) (*domain.ExtensionServiceEndpoint, error)

GetExtensionServiceEndpoint retrieves an extension endpoint by its ID.

func (*ExtensionStore) ListExtensionServiceCredentials

func (es *ExtensionStore) ListExtensionServiceCredentials(ctx context.Context, extensionID string, serviceID string) ([]*domain.ExtensionServiceCredentials, error)

ListExtensionServiceCredentials retrieves all credentials belonging to an extension service.

func (*ExtensionStore) ListExtensionServiceEndpoints

func (es *ExtensionStore) ListExtensionServiceEndpoints(ctx context.Context, extensionID string, serviceID string) ([]*domain.ExtensionServiceEndpoint, error)

ListExtensionServiceEndpoints retrieves all endpoints belonging to an extension service.

func (*ExtensionStore) ListExtensionServices

func (es *ExtensionStore) ListExtensionServices(ctx context.Context, extensionID string) ([]*domain.ExtensionService, error)

ListExtensionServices retrieves all services belonging to an extension.

func (*ExtensionStore) ListExtensions

func (es *ExtensionStore) ListExtensions(ctx context.Context, query *domain.ExtensionQuery) (result []*domain.Extension)

ListExtensions retrieves all stored extensions.

func (*ExtensionStore) UpdateExtension

func (es *ExtensionStore) UpdateExtension(ctx context.Context, newExtension *domain.Extension) error

UpdateExtension updates an existing extension.

func (*ExtensionStore) UpdateExtensionService

func (es *ExtensionStore) UpdateExtensionService(ctx context.Context, extensionID string, newService *domain.ExtensionService) error

UpdateExtensionService updates a service belonging to an extension.

func (*ExtensionStore) UpdateExtensionServiceCredentials

func (es *ExtensionStore) UpdateExtensionServiceCredentials(ctx context.Context, extensionID string, serviceID string, newCredentials *domain.ExtensionServiceCredentials) error

UpdateExtensionServiceCredentials updates an extension credential.

func (*ExtensionStore) UpdateExtensionServiceEndpoint

func (es *ExtensionStore) UpdateExtensionServiceEndpoint(ctx context.Context, extensionID string, serviceID string, newEndpoint *domain.ExtensionServiceEndpoint) error

UpdateExtensionServiceEndpoint updates an endpoint belonging to an extension service.

type WorkflowStore

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

WorkflowStore is a wrapper around a badgerhold.Store that implements the domain.WorkflowStore interface.

func NewWorkflowStore

func NewWorkflowStore(store *badgerhold.Store) *WorkflowStore

NewWorkflowStore creates a new WorkflowStore.

func (*WorkflowStore) AddCodesetAssignment

func (ws *WorkflowStore) AddCodesetAssignment(ctx context.Context, workflowName string, codeset *domain.Codeset,
	webhookID *int64) ([]*domain.CodesetAssignment, error)

AddCodesetAssignment adds a codeset to the list of assigned codesets of a workflow if it does not already exists.

func (*WorkflowStore) AddWorkflow

func (ws *WorkflowStore) AddWorkflow(ctx context.Context, w *domain.Workflow) (*domain.Workflow, error)

AddWorkflow adds a new workflow based on the Workflow structure provided as argument.

func (*WorkflowStore) DeleteCodesetAssignment

func (ws *WorkflowStore) DeleteCodesetAssignment(ctx context.Context, workflowName string, codeset *domain.Codeset) ([]*domain.CodesetAssignment, error)

DeleteCodesetAssignment deletes a codeset from the list of assigned codesets of a workflow if it exists.

func (*WorkflowStore) DeleteWorkflow

func (ws *WorkflowStore) DeleteWorkflow(ctx context.Context, name string) error

DeleteWorkflow deletes the workflow from the store.

func (*WorkflowStore) GetAllCodesetAssignments

func (ws *WorkflowStore) GetAllCodesetAssignments(ctx context.Context, workflowName *string) (result map[string][]*domain.CodesetAssignment)

GetAllCodesetAssignments returns a map of workflows and its assigned codesets.

func (*WorkflowStore) GetCodesetAssignment

func (ws *WorkflowStore) GetCodesetAssignment(ctx context.Context, workflowName string, codeset *domain.Codeset) (*domain.CodesetAssignment, error)

GetCodesetAssignment returns a list of codesets assigned to the specified workflow.

func (*WorkflowStore) GetCodesetAssignments

func (ws *WorkflowStore) GetCodesetAssignments(ctx context.Context, workflowName string) []*domain.CodesetAssignment

GetCodesetAssignments returns a AssignedCodeset for the Workflow and Codeset.

func (*WorkflowStore) GetWorkflow

func (ws *WorkflowStore) GetWorkflow(ctx context.Context, name string) (*domain.Workflow, error)

GetWorkflow returns a workflow identified by its name.

func (*WorkflowStore) GetWorkflows

func (ws *WorkflowStore) GetWorkflows(ctx context.Context, name *string) []*domain.Workflow

GetWorkflows returns all workflows or the one that matches a given name.

Jump to

Keyboard shortcuts

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