users

package
v0.0.0-...-3133c99 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string `yaml:"host" validate:"required"`
	Port     string `yaml:"port" validate:"required"`
	User     string `yaml:"user" validate:"required"`
	Password string `yaml:"password" validate:"required"`
	Name     string `yaml:"name" validate:"required"`
}

Config contains configuration options for Repository.

type Repository

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

Repository implements component that access users database.

func New

func New(c Config) (*Repository, error)

New creates new users repository.

func (*Repository) AddUser

func (r *Repository) AddUser(ctx context.Context, user model.User) (string, error)

func (*Repository) ListUsers

func (r *Repository) ListUsers(ctx context.Context) ([]model.User, error)

func (*Repository) RemoveUser

func (r *Repository) RemoveUser(ctx context.Context, id string) error

Jump to

Keyboard shortcuts

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