Documentation ¶
Overview ¶
Package storage provides storage implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RepositoryProvider ¶
type RepositoryProvider struct {
MongoNoteRepository *storagemongo.NoteRepository
}
RepositoryProvider is a provider for the note repository.
func NewRepositoryProvider ¶
func NewRepositoryProvider(options ...RepositoryProviderOption) *RepositoryProvider
NewRepositoryProvider creates a new instance of the RepositoryProvider. It takes one or more options that can be used to configure the provider.
type RepositoryProviderOption ¶
type RepositoryProviderOption func(rp *RepositoryProvider)
RepositoryProviderOption is a functional option for the RepositoryProvider.
func WithMongoNoteRepository ¶
func WithMongoNoteRepository(db *mongo.Database) RepositoryProviderOption
WithMongoNoteRepository is a functional option that sets the MongoNoteRepository of the RepositoryProvider to a new instance of `mongo.NoteRepository`.
Click to show internal directories.
Click to hide internal directories.