Documentation ¶
Index ¶
- func NewZapLogger(logger *zap.Logger) *zapadapter.Logger
- type Config
- type FeedsRepositoryImpl
- func (repository *FeedsRepositoryImpl) Create(f *entity.Feed) error
- func (feedRepo *FeedsRepositoryImpl) Delete(publicationUUID uuid.UUID) error
- func (feedRepo *FeedsRepositoryImpl) GetAll() ([]entity.Feed, error)
- func (feedRepo *FeedsRepositoryImpl) GetByPublicationUUID(publicationUUID uuid.UUID) (*entity.Feed, error)
- func (feedRepo *FeedsRepositoryImpl) GetFeedHTTPMetadataByPublicationUUID(publicationUUID uuid.UUID) (*entity.FeedHTTPMetadata, error)
- func (feedRepo *FeedsRepositoryImpl) ProcessedItemExists(i *entity.ProcessedItem) (bool, error)
- func (feedRepo *FeedsRepositoryImpl) SaveFeedHTTPMetadata(m *entity.FeedHTTPMetadata) error
- func (feedRepo *FeedsRepositoryImpl) SaveProcessedItem(i *entity.ProcessedItem) error
- func (feedRepo *FeedsRepositoryImpl) Update(f *entity.Feed) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewZapLogger ¶
func NewZapLogger(logger *zap.Logger) *zapadapter.Logger
Types ¶
type Config ¶
type Config struct { Name string `mapstructure:"name"` Hostname string `mapstructure:"hostname"` Port string `mapstructure:"port"` Username string `mapstructure:"username"` Password string `mapstructure:"password"` SSLMode string `mapstructure:"sslmode"` LogLevel string `mapstructure:"log_level"` MinConnections int32 `mapstructure:"min_connections"` MaxConnections int32 `mapstructure:"max_connections"` }
Config defines database configuration, usable for Viper
type FeedsRepositoryImpl ¶
type FeedsRepositoryImpl struct {
// contains filtered or unexported fields
}
func New ¶
func New(databaseConfig *Config, logger pgx.Logger) (*FeedsRepositoryImpl, error)
New creates database pool configuration
func (*FeedsRepositoryImpl) Create ¶
func (repository *FeedsRepositoryImpl) Create(f *entity.Feed) error
func (*FeedsRepositoryImpl) Delete ¶
func (feedRepo *FeedsRepositoryImpl) Delete(publicationUUID uuid.UUID) error
func (*FeedsRepositoryImpl) GetAll ¶
func (feedRepo *FeedsRepositoryImpl) GetAll() ([]entity.Feed, error)
func (*FeedsRepositoryImpl) GetByPublicationUUID ¶
func (*FeedsRepositoryImpl) GetFeedHTTPMetadataByPublicationUUID ¶
func (feedRepo *FeedsRepositoryImpl) GetFeedHTTPMetadataByPublicationUUID(publicationUUID uuid.UUID) (*entity.FeedHTTPMetadata, error)
func (*FeedsRepositoryImpl) ProcessedItemExists ¶
func (feedRepo *FeedsRepositoryImpl) ProcessedItemExists(i *entity.ProcessedItem) (bool, error)
func (*FeedsRepositoryImpl) SaveFeedHTTPMetadata ¶
func (feedRepo *FeedsRepositoryImpl) SaveFeedHTTPMetadata(m *entity.FeedHTTPMetadata) error
func (*FeedsRepositoryImpl) SaveProcessedItem ¶
func (feedRepo *FeedsRepositoryImpl) SaveProcessedItem(i *entity.ProcessedItem) error
Click to show internal directories.
Click to hide internal directories.