repositories

package
v0.0.0-...-e9ad91d Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 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 InvestigationRepository

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

func NewInvestigationRepository

func NewInvestigationRepository(readWriteDB *sqlx.DB, readDB *sqlx.DB, logger *slog.Logger) *InvestigationRepository

func (*InvestigationRepository) FinishCompletion

func (r *InvestigationRepository) FinishCompletion(ctx context.Context, investigationTargetID string, userID []byte, question string, answer string) (*models.Completion, error)

func (*InvestigationRepository) Get

func (r *InvestigationRepository) Get(ctx context.Context, investigationTargetID string, userID []byte) (*models.Investigation, error)

type UserRepository

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

func NewUserRepository

func NewUserRepository(readWriteDB *sqlx.DB, readDB *sqlx.DB, logger *slog.Logger) *UserRepository

func (*UserRepository) Exists

func (r *UserRepository) Exists(id []byte) (bool, error)

func (*UserRepository) Get

func (r *UserRepository) Get(id []byte) (*models.User, error)

func (*UserRepository) Upsert

func (r *UserRepository) Upsert(ctx context.Context, user *models.User) error

Jump to

Keyboard shortcuts

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