repository

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 9 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)
	FetchByAccountId(accountId string) (*model.Account, error)
	FetchByDomainIdEnvironment(domainId string, environment string) (*model.Account, error)
	FetchAllByDomainId(domainId string) []model.Account
	FetchAllAccounts() []model.Account
	Update(account *model.Account) (*model.Account, error)
	DeleteByAccountId(accountId string) error
	DeleteByDomainIdEnvironment(domainId string, environment 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) DeleteByAccountId

func (repo *AccountRepositoryMongo) DeleteByAccountId(accountId string) error

func (*AccountRepositoryMongo) DeleteByDomainIdEnvironment

func (repo *AccountRepositoryMongo) DeleteByDomainIdEnvironment(domainId string, environment string) error

func (*AccountRepositoryMongo) FetchAllAccounts

func (repo *AccountRepositoryMongo) FetchAllAccounts() []model.Account

func (*AccountRepositoryMongo) FetchAllByDomainId

func (repo *AccountRepositoryMongo) FetchAllByDomainId(domainId string) []model.Account

func (*AccountRepositoryMongo) FetchByAccountId

func (repo *AccountRepositoryMongo) FetchByAccountId(accountId string) (*model.Account, error)

func (*AccountRepositoryMongo) FetchByDomainIdEnvironment

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

func (*AccountRepositoryMongo) Update

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

Jump to

Keyboard shortcuts

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