account

package
v0.0.0-...-b84fcc7 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountCreatedEvent

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

func (*AccountCreatedEvent) ID

func (event *AccountCreatedEvent) ID() string

func (*AccountCreatedEvent) Name

func (event *AccountCreatedEvent) Name() string

func (*AccountCreatedEvent) OccurredAt

func (event *AccountCreatedEvent) OccurredAt() time.Time

func (*AccountCreatedEvent) ToJson

func (event *AccountCreatedEvent) ToJson() (string, error)

type AccountCreatedEventHandler

type AccountCreatedEventHandler struct {
}

AccountCreatedEventHandler triggered once new account created

func (*AccountCreatedEventHandler) Notify

func (handler *AccountCreatedEventHandler) Notify(event event.IBaseDomainEvent) error

type AccountModel

type AccountModel struct {
	model.BaseModel
	AccountName string `gorm:"column:account_name;unique"`
}

type AccountRepository

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

func NewAccountRepository

func NewAccountRepository(db *gorm.DB) *AccountRepository

func (*AccountRepository) Create

func (repo *AccountRepository) Create(dataModel AccountModel) error

Create creates new account

func (*AccountRepository) FindById

func (repo *AccountRepository) FindById(id uint) (AccountModel, error)

FindById query account by it's identity

func (*AccountRepository) GetAll

func (repo *AccountRepository) GetAll() ([]AccountModel, error)

GetAll returns all accounts in the table

Jump to

Keyboard shortcuts

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