repository

package
v0.0.0-...-fa04af2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSqlite3DB

func NewSqlite3DB(cfg Config) (*sqlx.DB, error)

NewSqlite3DB - open connect and ping trying

Types

type Account

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

Account

func NewAccount

func NewAccount(db *sqlx.DB) *Account

NewAccount - constructor

func (*Account) CreateAccount

func (r *Account) CreateAccount(account domain.Account) error

CreateAccount

func (*Account) DeleteAccount

func (r *Account) DeleteAccount(accountPublicId string) error

DeleteAccount

func (*Account) GetAccount

func (r *Account) GetAccount(publicId string) (domain.Account, error)

GetAccount

func (*Account) GetByCredentials

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

GetByCredentials

func (*Account) UpdateAccountInfo

func (r *Account) UpdateAccountInfo(input domain.UpdateAccountInput) error

UpdateAccountInfo

func (*Account) UpdateAccountRole

func (r *Account) UpdateAccountRole(input domain.UpdateAccountRoleInput) error

UpdateAccountRole

type Accounter

type Accounter interface {
	CreateAccount(account domain.Account) error
	GetAccount(publicId string) (domain.Account, error)
	UpdateAccountInfo(input domain.UpdateAccountInput) error
	UpdateAccountRole(input domain.UpdateAccountRoleInput) error
	DeleteAccount(accountPublicId string) error
	GetByCredentials(email, password string) (domain.Account, error)
}

Accounter - repository interface

type Config

type Config struct {
	Driver string
}

Config - db

type Repository

type Repository struct {
	Accounter
}

Repository - repo

func NewRepository

func NewRepository(db *sqlx.DB) *Repository

NewRepository - constructor

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