repository
import "budget-tracker-api-v2/internal/repository"
Index
- type CardCollectionInterface
- type CardRepoInterface
- type HealthCollectionInterface
- type TransactionCollectionInterface
- type TransactionRepoInterface
- type UserCollectionInterface
- type UserRepoInterface
type CardCollectionInterface
CardCollectionInterface defines a mongodb collection API to be posteriorly mocked
type CardCollectionInterface interface {
CreateIndexes(ctx context.Context, indexes []string) error
InsertOne(ctx context.Context, document interface{}) (id string, err error)
FindOne(ctx context.Context, id string) (*model.Card, error)
FindOneByFilter(ctx context.Context, filter bson.M) (*model.Card, error)
DeleteOne(ctx context.Context, id string) (int64, error)
}
type CardRepoInterface
CardRepoInterface defines Card CRUD operations
type CardRepoInterface interface {
Insert(ctx context.Context, emp *model.Card) (*model.Card, error)
FindByID(ctx context.Context, empID string) (*model.Card, error)
FindByFilter(ctx context.Context, filter bson.M) (*model.Card, error)
Delete(ctx context.Context, id string) (int64, error)
}
type HealthCollectionInterface
UserCollectionInterface defines a mongodb collection API to be posteriorly mocked
type HealthCollectionInterface interface {
Ping(ctx context.Context) (bool, error)
}
type TransactionCollectionInterface
TransactionCollectionInterface defines a mongodb collection API to be posteriorly mocked
type TransactionCollectionInterface interface {
CreateIndexes(ctx context.Context, indexes []string) error
InsertOne(ctx context.Context, t *model.Transaction) (transaction *model.Transaction, err error)
FindOne(ctx context.Context, id string) (*model.Transaction, error)
DeleteOne(ctx context.Context, id string) (int64, error)
}
type TransactionRepoInterface
TransactionRepoInterface defines Card CRUD operations
type TransactionRepoInterface interface {
Insert(ctx context.Context, emp *model.Transaction) (*model.Transaction, error)
FindByID(ctx context.Context, empID string) (*model.Transaction, error)
Delete(ctx context.Context, id string) (int64, error)
}
type UserCollectionInterface
UserCollectionInterface defines a mongodb collection API to be posteriorly mocked
type UserCollectionInterface interface {
CreateIndexes(ctx context.Context, indexes []string) error
InsertOne(ctx context.Context, document interface{}) (id string, err error)
FindOne(ctx context.Context, id string) (*model.User, error)
FindOneBy(ctx context.Context, login string) (*model.User, error)
DeleteOne(ctx context.Context, id string) (int64, error)
}
type UserRepoInterface
UserRepoInterface defines User CRUD operations
type UserRepoInterface interface {
Insert(ctx context.Context, emp *model.User) (*model.User, error)
FindByID(ctx context.Context, empID string) (*model.User, error)
Delete(ctx context.Context, id string) (int64, error)
}
Generated by gomarkdoc