Documentation
¶
Index ¶
- type Repository
- func (r *Repository) AssociateUserWithChat(ctx context.Context, userID, chatID string) error
- func (r *Repository) Get(ctx context.Context, id string) (*model.Notification, error)
- func (r *Repository) List(ctx context.Context, chatID string) ([]*model.Notification, error)
- func (r *Repository) ListChats(ctx context.Context, userID string) ([]string, error)
- func (r *Repository) ListUsers(ctx context.Context, chatID string) ([]string, error)
- func (r *Repository) Post(ctx context.Context, chatID string, n *model.Notification) (int, 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
}
Repository defines a sql notification repository
func (*Repository) AssociateUserWithChat ¶
func (r *Repository) AssociateUserWithChat(ctx context.Context, userID, chatID string) error
AssociateUserWithChat associates a user with a chat
func (*Repository) Get ¶
func (r *Repository) Get(ctx context.Context, id string) (*model.Notification, error)
Get notification by id
func (*Repository) List ¶
func (r *Repository) List(ctx context.Context, chatID string) ([]*model.Notification, error)
List notification by user chatID
func (*Repository) Post ¶
func (r *Repository) Post(ctx context.Context, chatID string, n *model.Notification) (int, error)
Post adds a new notification
Click to show internal directories.
Click to hide internal directories.