dao

package
v0.0.0-...-535fc81 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetTransaction

func SetTransaction(d TransactionDao)

Types

type BranchDao

type BranchDao interface {
	CreateBatches(ctx context.Context, list entity.BranchList) error
	GetBranches(ctx context.Context, gid string) (entity.BranchList, error)
	UpdateBranchStateByGid(ctx context.Context, branchId string,
		state consts.BranchState, errMsg string) (int64, error)
}

type GlobalDao

type GlobalDao interface {
	FindProcessingList(ctx context.Context, limit, maxTimes int) (list []*entity.Global, err error)
	IncrTryTimes(ctx context.Context, gid string, nextCronTime int) error
	CreateGlobal(ctx context.Context, global *entity.Global) error
	GetGlobal(ctx context.Context, gid string) (entity.Global, error)
	UpdateGlobalStateByGid(ctx context.Context, gid string,
		state consts.GlobalState) (int64, error)
}

type TransactionDao

type TransactionDao interface {
	BranchDao
	GlobalDao
}

func GetTransaction

func GetTransaction() TransactionDao

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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