-
Notifications
You must be signed in to change notification settings - Fork 0
/
loaders.go
28 lines (23 loc) · 1.16 KB
/
loaders.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package loaders
import (
"context"
"github.com/jfk9w-go/tinkoff-api"
"gorm.io/gorm/schema"
"github.com/jfk9w/hoarder/internal/database"
"github.com/jfk9w/hoarder/internal/jobs"
)
type Client interface {
AccountsLightIb(ctx context.Context) (tinkoff.AccountsLightIbOut, error)
AccountRequisites(ctx context.Context, in *tinkoff.AccountRequisitesIn) (*tinkoff.AccountRequisitesOut, error)
Statements(ctx context.Context, in *tinkoff.StatementsIn) (tinkoff.StatementsOut, error)
Operations(ctx context.Context, in *tinkoff.OperationsIn) (tinkoff.OperationsOut, error)
ShoppingReceipt(ctx context.Context, in *tinkoff.ShoppingReceiptIn) (*tinkoff.ShoppingReceiptOut, error)
ClientOfferEssences(ctx context.Context) (tinkoff.ClientOfferEssencesOut, error)
InvestOperationTypes(ctx context.Context) (*tinkoff.InvestOperationTypesOut, error)
InvestAccounts(ctx context.Context, in *tinkoff.InvestAccountsIn) (*tinkoff.InvestAccountsOut, error)
InvestOperations(ctx context.Context, in *tinkoff.InvestOperationsIn) (*tinkoff.InvestOperationsOut, error)
}
type Interface interface {
schema.Tabler
Load(ctx jobs.Context, client Client, db database.DB) ([]Interface, error)
}