document

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package document is a generated GoMock package.

Index

Constants

View Source
const (
	DownloaderTimeFormat = "2006-01"
)
View Source
const ResolverTimeFormat = "02.01.2006"

Variables

View Source
var ErrDocumentExists = errors.New("document exists")

Functions

This section is empty.

Types

type DateResolver added in v0.8.0

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

func NewDateResolver added in v0.8.0

func NewDateResolver(logger *log.Logger) DateResolver

func (DateResolver) Resolve added in v0.8.0

func (r DateResolver) Resolve(parentTimestamp time.Time, documentDate string) time.Time

type DateResolverInterface added in v0.8.0

type DateResolverInterface interface {
	Resolve(parentTimestamp time.Time, documentDate string) time.Time
}

type Downloader

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

func NewDownloader

func NewDownloader(logger *log.Logger) Downloader

func (Downloader) Download

func (d Downloader) Download(baseDir string, document Model) error

type DownloaderInterface

type DownloaderInterface interface {
	Download(baseDir string, document Model) error
}

type MockDownloaderInterface added in v0.6.0

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

MockDownloaderInterface is a mock of DownloaderInterface interface.

func NewMockDownloaderInterface added in v0.6.0

func NewMockDownloaderInterface(ctrl *gomock.Controller) *MockDownloaderInterface

NewMockDownloaderInterface creates a new mock instance.

func (*MockDownloaderInterface) Download added in v0.6.0

func (m *MockDownloaderInterface) Download(baseDir string, document Model) error

Download mocks base method.

func (*MockDownloaderInterface) EXPECT added in v0.6.0

EXPECT returns an object that allows the caller to indicate expected use.

type MockDownloaderInterfaceMockRecorder added in v0.6.0

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

MockDownloaderInterfaceMockRecorder is the mock recorder for MockDownloaderInterface.

func (*MockDownloaderInterfaceMockRecorder) Download added in v0.6.0

func (mr *MockDownloaderInterfaceMockRecorder) Download(baseDir, document any) *gomock.Call

Download indicates an expected call of Download.

type Model

type Model struct {
	TransactionUUID string `gorm:"foreignKey:UUID"`
	ID              string `gorm:"primaryKey"`
	URL             string `gorm:"-"`
	Detail          string
	Title           string
	Filepath        string
}

func NewModel

func NewModel(transactionUUID, id, url, detail, title, filename string) Model

func (Model) TableName added in v0.8.0

func (Model) TableName() string

type ModelBuilder added in v0.8.0

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

func NewModelBuilder added in v0.8.0

func NewModelBuilder(dateResolver DateResolverInterface, logger *log.Logger) ModelBuilder

func (ModelBuilder) Build added in v0.8.0

func (b ModelBuilder) Build(
	parentUUID string,
	parentTimestamp time.Time,
	response details.Response,
) ([]Model, error)

type ModelBuilderInterface added in v0.8.0

type ModelBuilderInterface interface {
	Build(transactionUUID string, parentTimestamp time.Time, response details.Response) ([]Model, error)
}

type RepositoryInterface added in v0.8.0

type RepositoryInterface interface {
	database.RepositoryInterface[*Model]
}

Jump to

Keyboard shortcuts

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