repository

package
v0.0.0-...-ab5ebe4 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Categories

type Categories interface {
	Add(ctx context.Context, telegramChatID int64, name string) error
	Remove(ctx context.Context, telegramChatID int64, name string) error
	AddToBeRenamedToCategory(ctx context.Context, telegramChatID int64, name string) error
	Rename(ctx context.Context, telegramChatID int64, newName string) error
	List(ctx context.Context, telegramChatID int64) ([]core.Category, error)
}

type Interactions

type Interactions interface {
	Add(ctx context.Context, telegramChatID int64, interactionID int) error
	Remove(ctx context.Context, telegramChatID int64) error
	Get(ctx context.Context, telegramChatID int64) (int, error)
}

type Notes

type Notes interface {
	Add(ctx context.Context, telegramChatID int64, categoryName, content string) error
	ListInCategory(ctx context.Context, telegramChatID int64, categoryName string) ([]core.Note, error)
	Remove(ctx context.Context, telegramChatID int64, categoryName, content string) error
}

type Repository

type Repository struct {
	Categories
	Notes
	Users
	Interactions
}

func NewRepository

func NewRepository(db *mongo.Client) *Repository

type Users

type Users interface {
	CreateIfNotExists(ctx context.Context, telegramChatID int64) error
	CheckChatIDExists(ctx context.Context, telegramChatID int64) error
}

Directories

Path Synopsis
Package mock_repository is a generated GoMock package.
Package mock_repository is a generated GoMock package.

Jump to

Keyboard shortcuts

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