repository

package
v0.0.0-...-e61a738 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPostgresDB

func NewPostgresDB(cfg config.Db) (*bun.DB, error)

Types

type Auth

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

Auth

func NewAuth

func NewAuth(db *bun.DB) *Auth

Auth - constructor

func (*Auth) CreateAccount

func (r *Auth) CreateAccount(input domain.SignUpInput) error

CreateAccount

func (*Auth) GetAccountById

func (r *Auth) GetAccountById(id int) (domain.Account, error)

GetAccount

func (*Auth) GetByCredentials

func (r *Auth) GetByCredentials(email, password string) (domain.Account, error)

GetByCredentials

type Auther

type Auther interface {
	CreateAccount(account domain.SignUpInput) error
	GetAccountById(id int) (domain.Account, error)
	GetByCredentials(email, password string) (domain.Account, error)
}

Auther - auth repository interface

type Repository

type Repository struct {
	Auther
}

func NewRepository

func NewRepository(db *bun.DB) *Repository

Directories

Path Synopsis
Package repository is a generated GoMock package.
Package repository is a generated GoMock package.

Jump to

Keyboard shortcuts

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