repo

package
v0.0.0-...-d67b91f Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GophKeeperRepo

type GophKeeperRepo struct {
	// contains filtered or unexported fields
}

GophKeeper - Repo.

func New

func New(dsn string, l *logger.Logger) *GophKeeperRepo

New -.

func (*GophKeeperRepo) AddBinary

func (r *GophKeeperRepo) AddBinary(ctx context.Context, binary *entity.Binary, userID uuid.UUID) error

func (*GophKeeperRepo) AddBinaryMeta

func (r *GophKeeperRepo) AddBinaryMeta(
	ctx context.Context,
	currentUser *entity.User,
	binaryUUID uuid.UUID,
	meta []entity.Meta,
) (*entity.Binary, error)

func (*GophKeeperRepo) AddCard

func (r *GophKeeperRepo) AddCard(ctx context.Context, card *entity.Card, userID uuid.UUID) error

func (*GophKeeperRepo) AddLogin

func (r *GophKeeperRepo) AddLogin(ctx context.Context, login *entity.Login, userID uuid.UUID) error

func (*GophKeeperRepo) AddNote

func (r *GophKeeperRepo) AddNote(ctx context.Context, note *entity.SecretNote, userID uuid.UUID) error

func (*GophKeeperRepo) AddUser

func (r *GophKeeperRepo) AddUser(ctx context.Context, email, hashedPassword string) (user entity.User, err error)

func (*GophKeeperRepo) DBHealthCheck

func (r *GophKeeperRepo) DBHealthCheck() error

func (*GophKeeperRepo) DelCard

func (r *GophKeeperRepo) DelCard(ctx context.Context, cardUUID, userID uuid.UUID) error

func (*GophKeeperRepo) DelLogin

func (r *GophKeeperRepo) DelLogin(ctx context.Context, loginID, userID uuid.UUID) error

func (*GophKeeperRepo) DelNote

func (r *GophKeeperRepo) DelNote(ctx context.Context, noteID, userID uuid.UUID) error

func (*GophKeeperRepo) DelUserBinary

func (r *GophKeeperRepo) DelUserBinary(ctx context.Context, currentUser *entity.User, binaryUUID uuid.UUID) error

func (*GophKeeperRepo) GetBinaries

func (r *GophKeeperRepo) GetBinaries(ctx context.Context, user entity.User) ([]entity.Binary, error)

func (*GophKeeperRepo) GetBinary

func (r *GophKeeperRepo) GetBinary(ctx context.Context, binaryID, userID uuid.UUID) (*entity.Binary, error)

func (*GophKeeperRepo) GetCards

func (r *GophKeeperRepo) GetCards(ctx context.Context, user entity.User) ([]entity.Card, error)

func (*GophKeeperRepo) GetLogins

func (r *GophKeeperRepo) GetLogins(ctx context.Context, user entity.User) (logins []entity.Login, err error)

func (*GophKeeperRepo) GetNotes

func (r *GophKeeperRepo) GetNotes(ctx context.Context, user entity.User) ([]entity.SecretNote, error)

func (*GophKeeperRepo) GetSecretNotes

func (r *GophKeeperRepo) GetSecretNotes(ctx context.Context, user entity.User) (notes []entity.SecretNote, err error)

func (*GophKeeperRepo) GetUserByEmail

func (r *GophKeeperRepo) GetUserByEmail(ctx context.Context, email, hashedPassword string) (user entity.User, err error)

func (*GophKeeperRepo) GetUserByID

func (r *GophKeeperRepo) GetUserByID(ctx context.Context, id string) (user entity.User, err error)

func (*GophKeeperRepo) IsCardOwner

func (r *GophKeeperRepo) IsCardOwner(ctx context.Context, cardUUID, userID uuid.UUID) bool

func (*GophKeeperRepo) IsLoginOwner

func (r *GophKeeperRepo) IsLoginOwner(ctx context.Context, loginID, userID uuid.UUID) bool

func (*GophKeeperRepo) IsNoteOwner

func (r *GophKeeperRepo) IsNoteOwner(ctx context.Context, noteID, userID uuid.UUID) bool

func (*GophKeeperRepo) Migrate

func (r *GophKeeperRepo) Migrate()

func (*GophKeeperRepo) ShutDown

func (r *GophKeeperRepo) ShutDown()

func (*GophKeeperRepo) UpdateCard

func (r *GophKeeperRepo) UpdateCard(ctx context.Context, card *entity.Card, userID uuid.UUID) error

func (*GophKeeperRepo) UpdateLogin

func (r *GophKeeperRepo) UpdateLogin(ctx context.Context, login *entity.Login, userID uuid.UUID) error

func (*GophKeeperRepo) UpdateNote

func (r *GophKeeperRepo) UpdateNote(ctx context.Context, note *entity.SecretNote, userID uuid.UUID) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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