repository

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const FALSE = "false"
View Source
const INDEX_FIELD = "Index"
View Source
const INPUT_INDEX = "InputIndex"
View Source
const WHERE = "WHERE "

Variables

This section is empty.

Functions

func GetTransaction added in v1.3.0

func GetTransaction(ctx context.Context) (*sqlx.Tx, bool)

func StartTransaction added in v1.3.0

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

Types

type DBExecutor added in v1.3.0

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

func (*DBExecutor) ExecContext added in v1.3.0

func (c *DBExecutor) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)

type InputRepository added in v1.3.0

type InputRepository struct {
	Db sqlx.DB
}

func (*InputRepository) Count added in v1.3.0

func (c *InputRepository) Count(
	ctx context.Context,
	filter []*model.ConvenienceFilter,
) (uint64, error)

func (*InputRepository) Create added in v1.3.0

func (*InputRepository) CreateTables added in v1.3.0

func (r *InputRepository) CreateTables() error

func (*InputRepository) FindAll added in v1.3.0

func (c *InputRepository) FindAll(
	ctx context.Context,
	first *int,
	last *int,
	after *string,
	before *string,
	filter []*model.ConvenienceFilter,
) (*commons.PageResult[model.AdvanceInput], error)

func (*InputRepository) FindByIndex added in v1.3.0

func (r *InputRepository) FindByIndex(ctx context.Context, index int) (*model.AdvanceInput, error)

func (*InputRepository) FindByStatus added in v1.3.0

func (r *InputRepository) FindByStatus(ctx context.Context, status model.CompletionStatus) (*model.AdvanceInput, error)

func (*InputRepository) FindByStatusNeDesc added in v1.3.0

func (r *InputRepository) FindByStatusNeDesc(ctx context.Context, status model.CompletionStatus) (*model.AdvanceInput, error)

func (*InputRepository) Update added in v1.3.0

type NoticeRepository

type NoticeRepository struct {
	Db sqlx.DB
}

func (*NoticeRepository) Count

func (c *NoticeRepository) Count(
	ctx context.Context,
	filter []*model.ConvenienceFilter,
) (uint64, error)

func (*NoticeRepository) Create

func (*NoticeRepository) CreateTables

func (c *NoticeRepository) CreateTables() error

func (*NoticeRepository) FindAllNotices

func (c *NoticeRepository) FindAllNotices(
	ctx context.Context,
	first *int,
	last *int,
	after *string,
	before *string,
	filter []*model.ConvenienceFilter,
) (*commons.PageResult[model.ConvenienceNotice], error)

func (*NoticeRepository) FindByInputAndOutputIndex

func (c *NoticeRepository) FindByInputAndOutputIndex(
	ctx context.Context, inputIndex uint64, outputIndex uint64,
) (*model.ConvenienceNotice, error)

func (*NoticeRepository) Update added in v1.0.1

type ReportRepository added in v1.3.0

type ReportRepository struct {
	Db *sqlx.DB
}

func (*ReportRepository) Count added in v1.3.0

func (c *ReportRepository) Count(
	ctx context.Context,
	filter []*cModel.ConvenienceFilter,
) (uint64, error)

func (*ReportRepository) Create added in v1.3.0

func (r *ReportRepository) Create(ctx context.Context, report cModel.Report) (cModel.Report, error)

func (*ReportRepository) CreateTables added in v1.3.0

func (r *ReportRepository) CreateTables() error

func (*ReportRepository) FindAll added in v1.3.0

func (c *ReportRepository) FindAll(
	ctx context.Context,
	first *int,
	last *int,
	after *string,
	before *string,
	filter []*cModel.ConvenienceFilter,
) (*commons.PageResult[cModel.Report], error)

func (*ReportRepository) FindAllByInputIndex added in v1.3.0

func (c *ReportRepository) FindAllByInputIndex(
	ctx context.Context,
	first *int,
	last *int,
	after *string,
	before *string,
	inputIndex *int,
) (*commons.PageResult[cModel.Report], error)

func (*ReportRepository) FindByInputAndOutputIndex added in v1.3.0

func (r *ReportRepository) FindByInputAndOutputIndex(
	ctx context.Context,
	inputIndex uint64,
	outputIndex uint64,
) (*cModel.Report, error)

func (*ReportRepository) Update added in v1.3.0

func (r *ReportRepository) Update(ctx context.Context, report cModel.Report) (*cModel.Report, error)

type SynchronizerRepository

type SynchronizerRepository struct {
	Db sqlx.DB
}

func (*SynchronizerRepository) Count

func (c *SynchronizerRepository) Count(
	ctx context.Context,
) (uint64, error)

func (*SynchronizerRepository) Create

func (*SynchronizerRepository) CreateTables

func (c *SynchronizerRepository) CreateTables() error

func (*SynchronizerRepository) GetDB added in v1.3.0

func (c *SynchronizerRepository) GetDB() *sqlx.DB

func (*SynchronizerRepository) GetLastFetched

func (c *SynchronizerRepository) GetLastFetched(
	ctx context.Context,
) (*model.SynchronizerFetch, error)

func (*SynchronizerRepository) PurgeData added in v1.3.0

func (c *SynchronizerRepository) PurgeData(
	ctx context.Context, timestampBefore uint64,
) error

type VoucherRepository

type VoucherRepository struct {
	Db sqlx.DB
}

func (*VoucherRepository) Count

func (c *VoucherRepository) Count(
	ctx context.Context,
	filter []*model.ConvenienceFilter,
) (uint64, error)

func (*VoucherRepository) CreateTables

func (c *VoucherRepository) CreateTables() error

func (*VoucherRepository) CreateVoucher

func (c *VoucherRepository) CreateVoucher(
	ctx context.Context, voucher *model.ConvenienceVoucher,
) (*model.ConvenienceVoucher, error)

func (*VoucherRepository) FindAllVouchers

func (c *VoucherRepository) FindAllVouchers(
	ctx context.Context,
	first *int,
	last *int,
	after *string,
	before *string,
	filter []*model.ConvenienceFilter,
) (*commons.PageResult[model.ConvenienceVoucher], error)

func (*VoucherRepository) FindVoucherByInputAndOutputIndex

func (c *VoucherRepository) FindVoucherByInputAndOutputIndex(
	ctx context.Context, inputIndex uint64, outputIndex uint64,
) (*model.ConvenienceVoucher, error)

func (*VoucherRepository) UpdateExecuted

func (c *VoucherRepository) UpdateExecuted(
	ctx context.Context, inputIndex uint64, outputIndex uint64,
	executedValue bool,
) error

func (*VoucherRepository) UpdateVoucher

func (c *VoucherRepository) UpdateVoucher(
	ctx context.Context, voucher *model.ConvenienceVoucher,
) (*model.ConvenienceVoucher, error)

func (*VoucherRepository) VoucherCount

func (c *VoucherRepository) VoucherCount(
	ctx context.Context,
) (uint64, error)

Jump to

Keyboard shortcuts

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