Documentation
¶
Index ¶
- type ApplicationStore
- func (as *ApplicationStore) Add(ctx context.Context, a *domain.Application) (*domain.Application, error)
- func (as *ApplicationStore) Delete(ctx context.Context, name string) error
- func (as *ApplicationStore) Find(ctx context.Context, name string) *domain.Application
- func (as *ApplicationStore) GetAll(ctx context.Context, applicationType *string, applicationWorkflow *string) ([]*domain.Application, error)
- type GitAdmin
- type GitCodesetStore
- func (cs *GitCodesetStore) Add(ctx context.Context, c *domain.Codeset) (*domain.Codeset, *string, *string, error)
- func (cs *GitCodesetStore) CreateWebhook(ctx context.Context, c *domain.Codeset, listenerURL string) (*int64, error)
- func (cs *GitCodesetStore) Delete(ctx context.Context, project, name string) error
- func (cs *GitCodesetStore) DeleteWebhook(ctx context.Context, c *domain.Codeset, hookID *int64) error
- func (cs *GitCodesetStore) Find(ctx context.Context, project, name string) (*domain.Codeset, error)
- func (cs *GitCodesetStore) GetAll(ctx context.Context, project, label *string) ([]*domain.Codeset, error)
- type RunnableStore
- func (s *RunnableStore) Find(ctx context.Context, id string, kind string, labels map[string]string) (res []*domain.Runnable, err error)
- func (s *RunnableStore) Get(ctx context.Context, id string) (res *domain.Runnable, err error)
- func (s *RunnableStore) Register(ctx context.Context, r *domain.Runnable) (res *domain.Runnable, err error)
- type WorkflowStore
- func (ws *WorkflowStore) AddCodesetAssignment(ctx context.Context, workflowName string, ...) []*domain.AssignedCodeset
- func (ws *WorkflowStore) AddWorkflow(ctx context.Context, w *workflow.Workflow) (*workflow.Workflow, error)
- func (ws *WorkflowStore) DeleteCodesetAssignment(ctx context.Context, workflowName string, codeset *domain.Codeset) []*domain.AssignedCodeset
- func (ws *WorkflowStore) DeleteWorkflow(ctx context.Context, name string) error
- func (ws *WorkflowStore) GetAssignedCodeset(ctx context.Context, workflowName string, codeset *domain.Codeset) *domain.AssignedCodeset
- func (ws *WorkflowStore) GetAssignedCodesets(ctx context.Context, workflowName string) []*domain.AssignedCodeset
- func (ws *WorkflowStore) GetAssignments(ctx context.Context, workflowName *string) (result map[string][]*domain.AssignedCodeset)
- func (ws *WorkflowStore) GetWorkflow(ctx context.Context, name string) *workflow.Workflow
- func (ws *WorkflowStore) GetWorkflows(ctx context.Context, name *string) (result []*workflow.Workflow)
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 describes in memory store for applications
func NewApplicationStore ¶
func NewApplicationStore() *ApplicationStore
NewApplicationStore returns an in-memory application store instance
func (*ApplicationStore) Add ¶
func (as *ApplicationStore) Add(ctx context.Context, a *domain.Application) (*domain.Application, error)
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 ¶
func (as *ApplicationStore) Find(ctx context.Context, name string) *domain.Application
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 GitAdmin ¶
type GitAdmin interface {
PrepareRepository(*domain.Codeset, *string) (*string, *string, error)
CreateRepoWebhook(string, string, *string) (*int64, error)
DeleteRepoWebhook(string, string, *int64) error
GetRepositories(org, label *string) ([]*domain.Codeset, error)
GetRepository(org, name string) (*domain.Codeset, error)
DeleteRepository(org, name string) error
}
GitAdmin is an inteface to git administration clients
type GitCodesetStore ¶
type GitCodesetStore struct {
// contains filtered or unexported fields
}
GitCodesetStore describes a stucture that accesses codeset store implemented in git
func NewGitCodesetStore ¶
func NewGitCodesetStore(gitAdmin GitAdmin) *GitCodesetStore
NewGitCodesetStore returns codeset store instance
func (*GitCodesetStore) Add ¶
func (cs *GitCodesetStore) Add(ctx context.Context, c *domain.Codeset) (*domain.Codeset, *string, *string, error)
Add creates new codeset
func (*GitCodesetStore) CreateWebhook ¶
func (cs *GitCodesetStore) CreateWebhook(ctx context.Context, c *domain.Codeset, listenerURL string) (*int64, error)
CreateWebhook adds a new webhook to a codeset
func (*GitCodesetStore) Delete ¶
func (cs *GitCodesetStore) Delete(ctx context.Context, project, name string) error
Delete removes a codeset identified by project and name
func (*GitCodesetStore) DeleteWebhook ¶ added in v0.1.0
func (cs *GitCodesetStore) DeleteWebhook(ctx context.Context, c *domain.Codeset, hookID *int64) error
DeleteWebhook deletes a webhook from a codeset
type RunnableStore ¶
type RunnableStore struct {
// contains filtered or unexported fields
}
RunnableStore describes in memory store for runnables
func NewRunnableStore ¶
func NewRunnableStore() *RunnableStore
NewRunnableStore creates and returns an in-memory runnable store instance
func (*RunnableStore) Find ¶
func (s *RunnableStore) Find(ctx context.Context, id string, kind string, labels map[string]string) (res []*domain.Runnable, err error)
Find returns a list of runnables matching the input query. Runnables may be matched by id, kind or labels. Only runnables that match all the supplied criteria will be returned.
type WorkflowStore ¶
type WorkflowStore struct {
// contains filtered or unexported fields
}
WorkflowStore describes in memory store for workflows
func NewWorkflowStore ¶
func NewWorkflowStore() *WorkflowStore
NewWorkflowStore returns an in-memory workflow store instance
func (*WorkflowStore) AddCodesetAssignment ¶ added in v0.0.2
func (ws *WorkflowStore) AddCodesetAssignment(ctx context.Context, workflowName string, assignedCodeset *domain.AssignedCodeset) []*domain.AssignedCodeset
AddCodesetAssignment adds a codeset to the list of assigned codesets of a workflow if it does not already exists
func (*WorkflowStore) AddWorkflow ¶ added in v0.0.2
func (ws *WorkflowStore) AddWorkflow(ctx context.Context, w *workflow.Workflow) (*workflow.Workflow, error)
AddWorkflow adds a new workflow based on the Workflow structure provided as argument
func (*WorkflowStore) DeleteCodesetAssignment ¶ added in v0.1.0
func (ws *WorkflowStore) DeleteCodesetAssignment(ctx context.Context, workflowName string, codeset *domain.Codeset) []*domain.AssignedCodeset
DeleteCodesetAssignment deletes a codeset from the list of assigned codesets of a workflow if it exists
func (*WorkflowStore) DeleteWorkflow ¶ added in v0.1.0
func (ws *WorkflowStore) DeleteWorkflow(ctx context.Context, name string) error
DeleteWorkflow deletes the workflow from the store
func (*WorkflowStore) GetAssignedCodeset ¶ added in v0.1.0
func (ws *WorkflowStore) GetAssignedCodeset(ctx context.Context, workflowName string, codeset *domain.Codeset) *domain.AssignedCodeset
GetAssignedCodeset returns a AssignedCodeset for the Workflow and Codeset
func (*WorkflowStore) GetAssignedCodesets ¶ added in v0.0.2
func (ws *WorkflowStore) GetAssignedCodesets(ctx context.Context, workflowName string) []*domain.AssignedCodeset
GetAssignedCodesets returns a list of codesets assigned to the specified workflow
func (*WorkflowStore) GetAssignments ¶ added in v0.0.2
func (ws *WorkflowStore) GetAssignments(ctx context.Context, workflowName *string) (result map[string][]*domain.AssignedCodeset)
GetAssignments returns a map of workflows and its assigned codesets
func (*WorkflowStore) GetWorkflow ¶ added in v0.0.2
GetWorkflow returns a workflow identified by its name
func (*WorkflowStore) GetWorkflows ¶ added in v0.1.0
func (ws *WorkflowStore) GetWorkflows(ctx context.Context, name *string) (result []*workflow.Workflow)
GetWorkflows returns all workflows or the one that matches a given name.