Documentation ¶
Overview ¶
Package document is a generated GoMock package.
Index ¶
- Constants
- Variables
- func ProvideDocumentRepository(db *gorm.DB, logger *log.Logger) (*database.Repository[*Model], error)
- type DateResolver
- type DateResolverInterface
- type Downloader
- type DownloaderInterface
- type MockDownloaderInterface
- type MockDownloaderInterfaceMockRecorder
- type Model
- type ModelBuilder
- type ModelBuilderInterface
- type RepositoryInterface
Constants ¶
View Source
const (
DownloaderTimeFormat = "2006-01"
)
View Source
const ResolverTimeFormat = "02.01.2006"
Variables ¶
View Source
var DefaultSet = wire.NewSet( NewModelBuilder, NewDownloader, NewDateResolver, ProvideDocumentRepository, wire.Bind(new(ModelBuilderInterface), new(ModelBuilder)), wire.Bind(new(DownloaderInterface), new(Downloader)), wire.Bind(new(DateResolverInterface), new(DateResolver)), wire.Bind(new(RepositoryInterface), new(*database.Repository[*Model])), )
View Source
var ErrDocumentExists = errors.New("document exists")
Functions ¶
Types ¶
type DateResolver ¶
type DateResolver struct {
// contains filtered or unexported fields
}
func NewDateResolver ¶
func NewDateResolver(logger *log.Logger) DateResolver
type DateResolverInterface ¶
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
func NewDownloader ¶
func NewDownloader(logger *log.Logger) Downloader
type DownloaderInterface ¶
type MockDownloaderInterface ¶
type MockDownloaderInterface struct {
// contains filtered or unexported fields
}
MockDownloaderInterface is a mock of DownloaderInterface interface.
func NewMockDownloaderInterface ¶
func NewMockDownloaderInterface(ctrl *gomock.Controller) *MockDownloaderInterface
NewMockDownloaderInterface creates a new mock instance.
func (*MockDownloaderInterface) Download ¶
func (m *MockDownloaderInterface) Download(baseDir string, document Model) error
Download mocks base method.
func (*MockDownloaderInterface) EXPECT ¶
func (m *MockDownloaderInterface) EXPECT() *MockDownloaderInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockDownloaderInterfaceMockRecorder ¶
type MockDownloaderInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockDownloaderInterfaceMockRecorder is the mock recorder for MockDownloaderInterface.
type Model ¶
type ModelBuilder ¶
type ModelBuilder struct {
// contains filtered or unexported fields
}
func NewModelBuilder ¶
func NewModelBuilder(dateResolver DateResolverInterface, logger *log.Logger) ModelBuilder
func (ModelBuilder) Build ¶
func (b ModelBuilder) Build( parentUUID string, parentTimestamp time.Time, response details.NormalizedResponse, ) ([]Model, error)
type ModelBuilderInterface ¶
type RepositoryInterface ¶
type RepositoryInterface interface { database.RepositoryInterface[*Model] }
Click to show internal directories.
Click to hide internal directories.