mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
- go.mod module path + all self-imports: github.com/formancehq/payments -> github.com/hanzo-fi/payments (1590 .go files / 3152 refs; 20 modules: root, pkg/client, pkg/domain, 18 ce/plugins). External dep kept: formancehq/go-libs. - plugins: each ce/plugins/* consumed a *published* pkg/domain; added local 'replace .../pkg/domain => ../../../pkg/domain' (consistent with root) so every standalone plugin module builds in-monorepo. compile-plugin.sh MOD var rebranded too. - branding: README, LICENSE (dual MIT+EE; upstream copyright retained + Hanzo added), goreleaser (release images -> registry.hanzo.ai/hanzo-fi, OCI labels, homepage), proto go_package, renovate, speakeasy gen.yaml, connector-template *.gotpl. - CI: removed Numary/Formance workflows + composite action; added canonical hanzo.yml + cicd.yml (hanzoai/ci, gated HANZO_CI_ENABLED) + secretless ci.yml (go build/vet). - kept as data/compat keys: wire capability enums ALLOW_FORMANCE_*, generated SDK type client.Formance, domain field FormanceRedirectURL, OTEL_SERVICE_NAME, upstream base image. - verified: go build ./... (default + -tags ee) + all 20 nested modules green.
82 lines
2.7 KiB
Plaintext
82 lines
2.7 KiB
Plaintext
package {{.Connector}}
|
|
|
|
import "github.com/hanzo-fi/payments/pkg/domain/models"
|
|
|
|
func workflow() models.ConnectorTasksTree {
|
|
// In here, you will have to define how you want your connector's data
|
|
// to be polled. If there is any data that depends on another type of data
|
|
// already being polled (eg. you cannot fetch a balance without a related account
|
|
// ID), the dependency tree can be defined below
|
|
//
|
|
// Example 1: accounts is the parent node to all other data types
|
|
// In this example, the FetchNextAccounts method will be called first and
|
|
// then periodically.
|
|
// For each accounts returned by this method, FetchNextBalances,
|
|
// FetchNextPayments and FetchNextExternalAccounts will then be called
|
|
// with the related account in the request's FromPayload field and then
|
|
// periodically.
|
|
// return []models.ConnectorTaskTree{
|
|
// {
|
|
// TaskType: models.TASK_FETCH_ACCOUNTS,
|
|
// Name: "fetch_accounts",
|
|
// Periodically: true,
|
|
// NextTasks: []models.ConnectorTaskTree{
|
|
// {
|
|
// TaskType: models.TASK_FETCH_BALANCES,
|
|
// Name: "fetch_balances",
|
|
// Periodically: true,
|
|
// NextTasks: []models.ConnectorTaskTree{},
|
|
// },
|
|
// {
|
|
// TaskType: models.TASK_FETCH_PAYMENTS,
|
|
// Name: "fetch_payments",
|
|
// Periodically: true,
|
|
// NextTasks: []models.ConnectorTaskTree{},
|
|
// },
|
|
// {
|
|
// TaskType: models.TASK_FETCH_EXTERNAL_ACCOUNTS,
|
|
// Name: "fetch_recipients",
|
|
// Periodically: true,
|
|
// NextTasks: []models.ConnectorTaskTree{},
|
|
// },
|
|
// },
|
|
// },
|
|
// }
|
|
//
|
|
// Example 2: accounts is the parent of balances only; other data types will
|
|
// be fetched irrespective of any accounts being found
|
|
// In this example, FetchNextAccounts, FetchNextPayments and
|
|
// FetchNextExternalAccounts will be called in parallel and periodically.
|
|
// For every accounts returned in FetchNextAccounts, the child FetchNextBalances
|
|
// method will be called periodically.
|
|
// return []models.ConnectorTaskTree{
|
|
// {
|
|
//
|
|
// TaskType: models.TASK_FETCH_ACCOUNTS,
|
|
// Name: "fetch_accounts",
|
|
// Periodically: true,
|
|
// NextTasks: []models.ConnectorTaskTree{
|
|
// {
|
|
// TaskType: models.TASK_FETCH_BALANCES,
|
|
// Name: "fetch_balances",
|
|
// Periodically: true,
|
|
// NextTasks: []models.ConnectorTaskTree{},
|
|
// },
|
|
// },
|
|
// },
|
|
// {
|
|
// TaskType: models.TASK_FETCH_PAYMENTS,
|
|
// Name: "fetch_payments",
|
|
// NextTasks: []models.ConnectorTaskTree{},
|
|
// },
|
|
//
|
|
// {
|
|
// TaskType: models.TASK_FETCH_EXTERNAL_ACCOUNTS,
|
|
// Name: "fetch_external_accounts",
|
|
// Periodically: true,
|
|
// NextTasks: []models.ConnectorTaskTree{},
|
|
// },
|
|
// }
|
|
|
|
return []models.ConnectorTaskTree{}
|
|
} |