domain

package
v0.0.0-...-a56cac9 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	AccountId   string
	CustomerId  string
	AccountType string
	Amount      float64
	OpeningDate string
}

func (Account) ToDto

func (a Account) ToDto() dto.NewAccountResponse

type AccountRepository

type AccountRepository interface {
	Save(Account) (*Account, *errors.AppError)
}

type AccountRepositoryDb

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

func NewAccountRepositoryDb

func NewAccountRepositoryDb(dbClient *sqlx.DB) *AccountRepositoryDb

func (*AccountRepositoryDb) Save

func (d *AccountRepositoryDb) Save(account Account) (*Account, *errors.AppError)

type AuthRepository

type AuthRepository interface {
	IsAuthorized(string, string, map[string]string) bool
}

type Customer

type Customer struct {
	Id   string `db:"customer_id"`
	Name string
}

func (Customer) ToDto

func (c Customer) ToDto() dto.CustomerResponse

type CustomerRepository

type CustomerRepository interface {
	FindAll() ([]Customer, *errors.AppError)
	ById(id string) (*Customer, *errors.AppError)
}

type CustomerRepositoryDb

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

func NewCustomerRepositoryDb

func NewCustomerRepositoryDb(sqlClient *sqlx.DB) *CustomerRepositoryDb

func (*CustomerRepositoryDb) ById

func (*CustomerRepositoryDb) FindAll

func (d *CustomerRepositoryDb) FindAll() ([]Customer, *errors.AppError)

type CustomerRepositoryStub

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

func NewCustomerRepositoryStub

func NewCustomerRepositoryStub() CustomerRepositoryStub

func (CustomerRepositoryStub) FindAll

func (s CustomerRepositoryStub) FindAll() ([]Customer, error)

type RemoteAuthRepository

type RemoteAuthRepository struct {
}

func NewAuthRepository

func NewAuthRepository() RemoteAuthRepository

func (RemoteAuthRepository) IsAuthorized

func (r RemoteAuthRepository) IsAuthorized(token string, routeName string, vars map[string]string) bool

Jump to

Keyboard shortcuts

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