MCPcopy Create free account
hub / github.com/crossjoin-io/crossjoin / GetWorkflow

Method GetWorkflow

api/workflows.go:44–56  ·  view source on GitHub ↗
(hash, id string)

Source from the content-addressed store, hash-verified

42}
43
44func (api *API) GetWorkflow(hash, id string) (*config.Workflow, error) {
45 var workflowText []byte
46 err := api.db.QueryRow(`select text from workflows where config_hash = $1 AND id = $2`, hash, id).Scan(&workflowText)
47 if err != nil {
48 return nil, err
49 }
50 workflow := &config.Workflow{}
51 err = workflow.Parse(workflowText)
52 if err != nil {
53 return nil, err
54 }
55 return workflow, nil
56}
57
58func (api *API) GetWorkflows(hash string) (map[string]config.Workflow, error) {
59 rows, err := api.db.Query("SELECT text FROM workflows WHERE config_hash = $1", hash)

Callers 2

postTasksResultMethod · 0.95
StartWorkflowMethod · 0.95

Calls 1

ParseMethod · 0.95

Tested by

no test coverage detected