Documentation
¶
Index ¶
- func A1_Branch(ctx context.Context, pool Pool, isBonus bool) error
- func A2_Reassignment(ctx context.Context, pool Pool) error
- func A3_Alias(ctx context.Context, pool Pool) error
- func A5_NestedFunction(ctx context.Context, pool Pool) error
- func A7_HelperNoIso(ctx context.Context, pool Pool, h Helper) error
- func A8_NonDBWithTxHelper_MustBeSafe(ctx context.Context, svc OrderService) error
- func A9_WorkerPoolBegin_MustBeSafe(wp WorkerPool) error
- func A10_FakeDBProxy_MustBeSafe(ctx context.Context, fp FakePool) error
- func A11_FakeSearchProxy_MustBeSafe(ctx context.Context, sp FakeSearchPool) error
- func A12_FakeTxSpoofing_MustBeSafe(ctx context.Context, fp FakeTxPool) error
- type FakeDBProxy
- type FakePool
- type FakeSearchPool
- type FakeSearchProxy
- type FakeTx
- type FakeTxPool
- type Helper
- type OrderService
- type Pool
- type TxOptions
- type TxService
- type WalletRepo
- type WorkerPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func A1_Branch ¶
A1: Branch — conditional write to critical table inside branch without strong isolation.
func A2_Reassignment ¶
A2: Reassignment — query variable reassigned to critical table update.
func A5_NestedFunction ¶
A5: Nested Function — closure modifying critical table.
func A7_HelperNoIso ¶
A7: Interface / Helper — dynamic WithTx helper invocation without isolation level.
func A8_NonDBWithTxHelper_MustBeSafe ¶ added in v1.2.0
func A8_NonDBWithTxHelper_MustBeSafe(ctx context.Context, svc OrderService) error
func A9_WorkerPoolBegin_MustBeSafe ¶ added in v1.2.0
func A9_WorkerPoolBegin_MustBeSafe(wp WorkerPool) error
func A10_FakeDBProxy_MustBeSafe ¶ added in v1.2.0
func A11_FakeSearchProxy_MustBeSafe ¶ added in v1.2.0
func A11_FakeSearchProxy_MustBeSafe(ctx context.Context, sp FakeSearchPool) error
func A12_FakeTxSpoofing_MustBeSafe ¶ added in v1.2.0
func A12_FakeTxSpoofing_MustBeSafe(ctx context.Context, fp FakeTxPool) error
Types ¶
type FakeDBProxy ¶ added in v1.2.0
type FakeDBProxy struct{}
A10: Fake DB Proxy — single-method Exec proxy without Query or lifecycle capability must NOT trigger false positive.
type FakeSearchPool ¶ added in v1.2.0
type FakeSearchPool struct{}
func (FakeSearchPool) Begin ¶ added in v1.2.0
func (FakeSearchPool) Begin(ctx context.Context) (FakeSearchProxy, error)
type FakeSearchProxy ¶ added in v1.2.0
type FakeSearchProxy struct{}
A11: Fake Search Proxy — single-method Query proxy without Exec or lifecycle capability must NOT trigger false positive.
type FakeTx ¶ added in v1.2.0
A12: Fake Tx Spoofing — custom non-DB interface resembling transaction must NOT trigger violation.
type FakeTxPool ¶ added in v1.2.0
type OrderService ¶ added in v1.2.0
type OrderService struct{}
A8: Non-DB WithTx Helper — orderService.WithTx is a non-DB helper and must NOT trigger false positive.
type TxService ¶
type TxService[T any] struct { // contains filtered or unexported fields }
A6: Generic — generic transaction service modifying critical table without isolation options.
type WalletRepo ¶
type WalletRepo struct {
// contains filtered or unexported fields
}
A4: Wrapper — repository struct method with default Begin on critical table.
type WorkerPool ¶ added in v1.2.0
type WorkerPool struct {
Workers []int
}
A9: Non-DB WorkerPool — workerPool.Begin is not a database transaction and must NOT trigger false positive.
func (WorkerPool) Begin ¶ added in v1.2.0
func (WorkerPool) Begin() error