db

package
v0.0.0-...-f01c647 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package db is a generated GoMock package.

Index

Constants

View Source
const (
	DeleteAction     string = "delete"
	ActivateAction          = "activate"
	DeactivateAction        = "deactivate"
)

Variables

This section is empty.

Functions

func Migrate

func Migrate(ctx context.Context, db *sqlx.DB) error

Migrate runs the migrations on the database.

Types

type CountryRepo

type CountryRepo interface {
	GetAll(ctx context.Context) ([]*api.Country, error)
	GetByID(ctx context.Context, id string) (*api.Country, error)
	Put(ctx context.Context, country *api.Country) (*api.Country, error)
}

func NewCountryRepo

func NewCountryRepo(db *sqlx.DB) CountryRepo

type DBColumn

type DBColumn struct {
	Name    string
	Default *string
	SQLType string
}

type HealthzRepo

type HealthzRepo interface {
	Check(ctx context.Context) error
}

func NewHealthzRepo

func NewHealthzRepo(db *sqlx.DB) HealthzRepo

type IndividualRepo

type IndividualRepo interface {
	GetAll(ctx context.Context, options api.ListIndividualsOptions) ([]*api.Individual, error)
	GetByID(ctx context.Context, id string) (*api.Individual, error)
	Put(ctx context.Context, individual *api.Individual, fields containers.StringSet) (*api.Individual, error)
	PutMany(ctx context.Context, individuals []*api.Individual, fields containers.StringSet) ([]*api.Individual, error)
	PerformAction(ctx context.Context, id string, action string) error
	PerformActionMany(ctx context.Context, ids containers.StringSet, action string) error
	FindDuplicates(ctx context.Context, df dataframe.DataFrame, deduplicationConfig deduplication.DeduplicationConfig) ([]*api.Individual, error)
}

func NewIndividualRepo

func NewIndividualRepo(db *sqlx.DB) IndividualRepo

type MockIndividualRepo

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

MockIndividualRepo is a mock of IndividualRepo interface.

func NewMockIndividualRepo

func NewMockIndividualRepo(ctrl *gomock.Controller) *MockIndividualRepo

NewMockIndividualRepo creates a new mock instance.

func (*MockIndividualRepo) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockIndividualRepo) GetAll

GetAll mocks base method.

func (*MockIndividualRepo) GetByID

func (m *MockIndividualRepo) GetByID(arg0 context.Context, arg1 string) (*api.Individual, error)

GetByID mocks base method.

func (*MockIndividualRepo) Put

func (m *MockIndividualRepo) Put(arg0 context.Context, arg1 *api.Individual, arg2 []string) (*api.Individual, error)

Put mocks base method.

func (*MockIndividualRepo) PutMany

func (m *MockIndividualRepo) PutMany(arg0 context.Context, arg1 []*api.Individual, arg2 []string) ([]*api.Individual, error)

PutMany mocks base method.

func (*MockIndividualRepo) SoftDelete

func (m *MockIndividualRepo) SoftDelete(arg0 context.Context, arg1 string) error

SoftDelete mocks base method.

type MockIndividualRepoMockRecorder

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

MockIndividualRepoMockRecorder is the mock recorder for MockIndividualRepo.

func (*MockIndividualRepoMockRecorder) GetAll

func (mr *MockIndividualRepoMockRecorder) GetAll(arg0, arg1 interface{}) *gomock.Call

GetAll indicates an expected call of GetAll.

func (*MockIndividualRepoMockRecorder) GetByID

func (mr *MockIndividualRepoMockRecorder) GetByID(arg0, arg1 interface{}) *gomock.Call

GetByID indicates an expected call of GetByID.

func (*MockIndividualRepoMockRecorder) Put

func (mr *MockIndividualRepoMockRecorder) Put(arg0, arg1, arg2 interface{}) *gomock.Call

Put indicates an expected call of Put.

func (*MockIndividualRepoMockRecorder) PutMany

func (mr *MockIndividualRepoMockRecorder) PutMany(arg0, arg1, arg2 interface{}) *gomock.Call

PutMany indicates an expected call of PutMany.

func (*MockIndividualRepoMockRecorder) SoftDelete

func (mr *MockIndividualRepoMockRecorder) SoftDelete(arg0, arg1 interface{}) *gomock.Call

SoftDelete indicates an expected call of SoftDelete.

Jump to

Keyboard shortcuts

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