password

package
v0.0.0-...-f98d395 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Postgres

type Postgres struct {
}

Postgres implements the Repository interface for PostgreSQL.

func NewPostgres

func NewPostgres() *Postgres

NewPostgres returns a new instance of Postgres.

type Repository

type Repository interface {
	Create(req *models.Password) error
	// GetByUserID returns a slice of passwords for the given user ID.
	// sorted by created_at field in descending order.
	GetByUserID(userID string) ([]*models.Password, error)
	// returns last 100 passwords.
	GetByID(id string) (*models.Password, error)
}

Repository represents a repository for managing passwords.

Jump to

Keyboard shortcuts

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