postgresql

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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 (feedRepo *FeedsRepositoryImpl) GetByPublicationUUID(publicationUUID uuid.UUID) (*entity.Feed, error)

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

func (*FeedsRepositoryImpl) Update

func (feedRepo *FeedsRepositoryImpl) Update(f *entity.Feed) error

Jump to

Keyboard shortcuts

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