storage

package
v0.0.0-...-f767cfc Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: MIT Imports: 2 Imported by: 0

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`.

Directories

Path Synopsis
Package mongo provides a MongoDB database repository implementation.
Package mongo provides a MongoDB database repository implementation.

Jump to

Keyboard shortcuts

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