From 0a518fd31ac474003473fd37a670abd8204863e5 Mon Sep 17 00:00:00 2001 From: Steven Polley Date: Mon, 13 Nov 2023 17:40:13 -0700 Subject: [PATCH] add README.md for providers --- providers/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 providers/README.md diff --git a/providers/README.md b/providers/README.md new file mode 100644 index 0000000..c1e10c6 --- /dev/null +++ b/providers/README.md @@ -0,0 +1,21 @@ +# Provider Packages + +Provider packages are used for any integration and are found in their own sub directories. Providers must adhere to the interface speficied in accountProviders.go. + +```golang +// AccountProvider is the base set of requirements to be implemented for any integration +type AccountProvider interface { + Name() string // Returns the name of the provider + Configure() error // Configures the provider for first use - if an error is returned the provider is not used + GetBalances() ([]int, []string, error) // A slice of balances, and an index mapped slice of ynab account IDs this provider handles is returned +} +``` + +By convention, these methods are implemented in a file called providerImpl.go in each of the provider packages. + +The following providers are currently available: + +* bitcoin +* questrade +* staticjsonFinnhub +* staticjsonYahooFinance \ No newline at end of file