tinkoff

package
v0.1.29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const JobID = "tinkoff"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client = loaders.Client

type ClientFactory

type ClientFactory func(params tinkoff.ClientParams) (Client, error)

type Config

type Config struct {
	Database     database.Config         `yaml:"database" doc:"Настройки подключения к БД."`
	BatchSize    int                     `yaml:"batchSize,omitempty" doc:"Максимальный размер батчей." default:"100"`
	Overlap      time.Duration           `` /* 147-byte string literal not displayed */
	WithReceipts bool                    `yaml:"withReceipts,omitempty" doc:"Включить синхронизацию чеков." default:"true"`
	Users        map[string][]Credential `yaml:"users" doc:"Пользователи и их авторизационные данные."`
}

type Credential

type Credential struct {
	Phone    string `` /* 150-byte string literal not displayed */
	Password string `yaml:"password" doc:"Пароль от аккаунта Тинькофф."`
}

type Job

type Job struct {
	// contains filtered or unexported fields
}

func NewJob

func NewJob(ctx context.Context, params JobParams) (*Job, error)

func (*Job) Close

func (j *Job) Close() (errs error)

func (*Job) ID

func (j *Job) ID() string

func (*Job) Run

func (j *Job) Run(ctx jobs.Context, now time.Time, userID string) (errs error)

type JobParams

type JobParams struct {
	Clock         based.Clock  `validate:"required"`
	Logger        *slog.Logger `validate:"required"`
	Config        *Config      `validate:"required"`
	ClientFactory ClientFactory
	Firefly       firefly.Invoker
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL