mongo

package
v0.0.0-...-b01a591 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrorRepoKeyErrorDbAlreadyExist s is the error message for the error when RepoKey is already exist
	ErrorRepoKeyErrorDbAlreadyExist = apperrors.ErrorDbAlreadyExist + ":RepoKey"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RepoKeyMongoRepository

type RepoKeyMongoRepository struct {
	db.KeyRepository
	// contains filtered or unexported fields
}

RepoKeyMongoRepository implementations of db.KeyRepository for MongoDb repo

func NewKeyMongoRepository

func NewKeyMongoRepository(logger logger.Logger, db *intMongo.Db) *RepoKeyMongoRepository

NewKeyMongoRepository creates new instance of RepoKeyMongoRepository

func (*RepoKeyMongoRepository) Create

func (store *RepoKeyMongoRepository) Create(ctx context.Context, obj data.RepoKey) error

Create persist new data.Object in database

func (*RepoKeyMongoRepository) Exists

func (store *RepoKeyMongoRepository) Exists(ctx context.Context, repoID data.RepoID, keyID data.KeyID) (bool, error)

Exists checks if data.RepoKey exists in database

func (*RepoKeyMongoRepository) FindByKeyID

func (store *RepoKeyMongoRepository) FindByKeyID(ctx context.Context, repoID data.RepoID, keyID data.KeyID) (*data.RepoKey, error)

FindByKeyID returns data.RepoKey by keyID

func (*RepoKeyMongoRepository) FindByRepoId

func (store *RepoKeyMongoRepository) FindByRepoId(ctx context.Context, repoID data.RepoID) ([]data.RepoKey, error)

FindByRepoId returns data.RepoKey by repoId

Jump to

Keyboard shortcuts

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