repository

package
v0.0.0-...-c308e5d Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountRepository

type AccountRepository interface {
	Create(account *model.Account) (*model.Account, error)
	FetchByDomainId(domainId string) (*model.Account, error)
	FetchAllActiveAccounts() ([]model.Account, error)
	Update(account *model.Account) (*model.Account, error)
	DeleteByDomainId(domainId string) error
}

type AccountRepositoryMongo

type AccountRepositoryMongo struct {
	Db *mongo.Database
}

func NewAccountRepositoryMongo

func NewAccountRepositoryMongo(db *mongo.Database) *AccountRepositoryMongo

func (*AccountRepositoryMongo) Create

func (repo *AccountRepositoryMongo) Create(account *model.Account) (*model.Account, error)

func (*AccountRepositoryMongo) DeleteByDomainId

func (repo *AccountRepositoryMongo) DeleteByDomainId(domainId string) error

func (*AccountRepositoryMongo) FetchAllActiveAccounts

func (repo *AccountRepositoryMongo) FetchAllActiveAccounts() ([]model.Account, error)

func (*AccountRepositoryMongo) FetchByDomainId

func (repo *AccountRepositoryMongo) FetchByDomainId(domainId string) (*model.Account, error)

func (*AccountRepositoryMongo) Update

func (repo *AccountRepositoryMongo) Update(account *model.Account) (*model.Account, error)

type ErrAccountNotFound

type ErrAccountNotFound struct {
	DomainId string
}

func (ErrAccountNotFound) Error

func (err ErrAccountNotFound) Error() string

Jump to

Keyboard shortcuts

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