gorm

package
v0.0.0-...-32d14c1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: MIT Imports: 6 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 struct {
	// contains filtered or unexported fields
}

AccountRepository represents the client to its persistent repository

func NewAccountRepository

func NewAccountRepository(db *gorm.DB) *AccountRepository

NewAccountRepository instantiates an instance for data persistence

func (*AccountRepository) Create

func (a *AccountRepository) Create(ctx context.Context, account *account.Account, user *user.User) error

Create creates an account with an associated and newly created user

func (*AccountRepository) Delete

func (a *AccountRepository) Delete(ctx context.Context, accountID uuid.UUID) error

func (*AccountRepository) Find

func (a *AccountRepository) Find(ctx context.Context, username string) (account.Account, error)

func (*AccountRepository) List

func (*AccountRepository) Update

func (a *AccountRepository) Update(ctx context.Context, account *account.Account) error

Jump to

Keyboard shortcuts

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