accounts

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: MIT Imports: 4 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 {
	model.GORMBase
	Document string `json:"document_number" gorm:"type:varchar(11);unique_index;not null"`
}

func (Account) TableName

func (Account) TableName() string

type AccountRepository

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

func (*AccountRepository) Create

func (a *AccountRepository) Create(account *Account) error

func (*AccountRepository) Find

func (a *AccountRepository) Find(id int) (*Account, error)

type AccountService

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

func (*AccountService) Create

func (a *AccountService) Create(account *Account) (*Account, error)

func (*AccountService) Find

func (a *AccountService) Find(id int) (*Account, error)

type IAccountRepository

type IAccountRepository interface {
	Create(account *Account) error
	Find(id int) (*Account, error)
}

func NewAccountRepository

func NewAccountRepository(db *gorm.DB) IAccountRepository

type IAccountService

type IAccountService interface {
	Find(id int) (*Account, error)
	Create(account *Account) (*Account, error)
}

func NewAccountService

func NewAccountService(repo IAccountRepository) IAccountService

Jump to

Keyboard shortcuts

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