Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { IsDebugMode bool Logger Logger Host string Port string Password string DBName string User string SSLMode string }
Configuration contains setting for connection to message's repository
type Logger ¶
type Logger interface { Debug(msg ...interface{}) Info(msg ...interface{}) Warn(msg ...interface{}) Error(msg ...interface{}) Fatal(msg ...interface{}) }
Logger ...
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository represents message's repository
func NewMessageRepository ¶
func NewMessageRepository(ctx context.Context, conf Configuration) (*Repository, error)
NewMessageRepository creates new instance of message's repository
func (*Repository) Close ¶
func (r *Repository) Close(ctx context.Context) error
Close close connection to message's repository
func (*Repository) GetMessages ¶
func (r *Repository) GetMessages(ctx context.Context, input models.GetMessagesInput) ([]*models.Message, error)
GetMessages returns message by given time range
func (*Repository) SaveMessage ¶
SaveMessage save message in `messages` table
Click to show internal directories.
Click to hide internal directories.