kratos

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 10 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultSkip added in v0.0.7

func DefaultSkip() func(ctx context.Context, req interface{}) bool

func Uow

func Uow(um uow.Manager, opts ...Option) middleware.Middleware

Uow server unit of work middleware

Types

type Option

type Option func(*option)

func WithForceSkipOp added in v0.0.7

func WithForceSkipOp(ops ...string) Option

WithForceSkipOp use selector.Server to skip operation

func WithSkip

func WithSkip(f SkipFunc) Option

WithSkip change the skip unit of work function.

default request will skip operation method prefixed by "get" and "list" (case-insensitive) default http request will skip safeMethods like "GET", "HEAD", "OPTIONS", "TRACE"

func WithTxOpt

func WithTxOpt(txOpt ...*sql.TxOptions) Option

type SkipFunc

type SkipFunc func(ctx context.Context, req interface{}) bool

SkipFunc identity whether a request should skip run into unit of work

Jump to

Keyboard shortcuts

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