Documentation ¶
Index ¶
- type Repository
- func (r *Repository) Close(ctx context.Context) error
- func (r *Repository) CreateMessage(ctx context.Context, msg *models.Message) error
- func (r *Repository) GetMessage(ctx context.Context, id string) (*models.Message, error)
- func (r *Repository) GetUserByID(ctx context.Context, id int64) (*models.User, error)
- func (r *Repository) GetWhitelisted(ctx context.Context, userID int64) (bool, error)
- func (r *Repository) ListMessages(ctx context.Context, ownerID string, from, to time.Time) ([]*models.Message, error)
- func (r *Repository) SetUserID(ctx context.Context, username string, id int64) error
- func (r *Repository) SetWhitelisted(ctx context.Context, userID int64, whitelisted bool) error
- func (r *Repository) UpsertUser(ctx context.Context, user *models.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(ctx context.Context, dbs string) (*Repository, error)
func (*Repository) CreateMessage ¶
func (*Repository) GetMessage ¶
func (*Repository) GetUserByID ¶
func (*Repository) GetWhitelisted ¶
func (*Repository) ListMessages ¶
func (*Repository) SetWhitelisted ¶
func (*Repository) UpsertUser ¶
Click to show internal directories.
Click to hide internal directories.