Documentation ¶
Index ¶
- func DumpGRPC(t *testing.T, ctx context.Context, opts ...GRPCOption) context.Context
- func DumpHTTP(t *testing.T, w *http.Response, r *http.Request, opts ...HTTPOption)
- func DumpHTTPHandler(t *testing.T, r *http.Request, handler http.HandlerFunc, opts ...HTTPOption)
- func DumpJSON[T any](t *testing.T, v T, opts ...JSONOption)
- func DumpMySQL(t *testing.T, dump *SQL, opts ...SQLOption)
- func DumpPostgres(t *testing.T, dump *SQL, opts ...SQLOption)
- func DumpText(t *testing.T, s string, opts ...TextOption)
- func DumpYAML[T any](t *testing.T, v T, opts ...YAMLOption)
- func IgnoreArgs(fields ...string) *sqlCmpOption
- func IgnoreBodyFields(fields ...string) *httpCmpOption
- func IgnoreFields(fields ...string) ignoreFields
- func IgnoreHeaders(headers ...string) *httpCmpOption
- func IgnoreMessageFields(fields ...string) *grpcCmpOption
- func IgnoreMetadata(headers ...string) *grpcCmpOption
- func IgnoreResultFields(fields ...string) *sqlCmpOption
- func IgnoreTrailers(headers ...string) *httpCmpOption
- func IgnoreVars(fields ...string) *sqlCmpOption
- func InspectGRPC(hook func(snapshot, received *GRPCDump) error) *grpcHookOption
- func InspectHTTP(hook func(snapshot, received *HTTPDump) error) *httpHookOption
- func InspectSQL(hook func(snapshot, received *SQL) error) *sqlHookOption
- func InterceptGRPC(hook func(dump *GRPCDump) (*GRPCDump, error)) *grpcHookOption
- func InterceptHTTP(hook func(dump *HTTPDump) (*HTTPDump, error)) *httpHookOption
- func InterceptSQL(hook func(t *SQL) (*SQL, error)) *sqlHookOption
- func MaskFields(fields ...string) maskFields
- func MaskMessage(fields ...string) *grpcHookOption
- func MaskMetadata(headers ...string) *grpcHookOption
- func MaskRequestBody(fields ...string) *httpHookOption
- func MaskRequestHeaders(headers ...string) *httpHookOption
- func MaskResponseBody(fields ...string) *httpHookOption
- func MaskResponseHeaders(headers ...string) *httpHookOption
- type CmpOption
- type FileName
- type GRPCDump
- type GRPCHook
- type GRPCOption
- type HTTPDump
- type HTTPHook
- type HTTPOption
- type JSONOption
- type Path
- type RoundTripper
- type SQL
- type SQLCall
- type SQLDumper
- func (r *SQLDumper) Calls() int
- func (r *SQLDumper) Exec(query string, args ...any) (sql.Result, error)
- func (r *SQLDumper) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
- func (r *SQLDumper) Options(i int) []SQLOption
- func (r *SQLDumper) Prepare(query string) (*sql.Stmt, error)
- func (r *SQLDumper) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
- func (r *SQLDumper) Query(query string, args ...any) (*sql.Rows, error)
- func (r *SQLDumper) QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
- func (r *SQLDumper) QueryRow(query string, args ...any) *sql.Row
- func (r *SQLDumper) QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
- func (r *SQLDumper) SetCallOptions(i int, optsByCall ...SQLOption)
- func (r *SQLDumper) SetDB(db db)
- func (r *SQLDumper) SetDriverName(driverName string)
- func (r *SQLDumper) SetResult(v any)
- type SQLOption
- type TextOption
- type YAMLOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpHTTPHandler ¶
func DumpHTTPHandler(t *testing.T, r *http.Request, handler http.HandlerFunc, opts ...HTTPOption)
func IgnoreArgs ¶
func IgnoreArgs(fields ...string) *sqlCmpOption
func IgnoreBodyFields ¶
func IgnoreBodyFields(fields ...string) *httpCmpOption
func IgnoreFields ¶
func IgnoreFields(fields ...string) ignoreFields
func IgnoreHeaders ¶
func IgnoreHeaders(headers ...string) *httpCmpOption
func IgnoreMessageFields ¶
func IgnoreMessageFields(fields ...string) *grpcCmpOption
func IgnoreMetadata ¶
func IgnoreMetadata(headers ...string) *grpcCmpOption
func IgnoreResultFields ¶
func IgnoreResultFields(fields ...string) *sqlCmpOption
func IgnoreTrailers ¶
func IgnoreTrailers(headers ...string) *httpCmpOption
func IgnoreVars ¶
func IgnoreVars(fields ...string) *sqlCmpOption
func InspectGRPC ¶
func InspectHTTP ¶
func InspectSQL ¶
func InterceptGRPC ¶
func InterceptHTTP ¶
func InterceptSQL ¶
func MaskFields ¶
func MaskFields(fields ...string) maskFields
func MaskMessage ¶
func MaskMessage(fields ...string) *grpcHookOption
func MaskMetadata ¶
func MaskMetadata(headers ...string) *grpcHookOption
func MaskRequestBody ¶
func MaskRequestBody(fields ...string) *httpHookOption
func MaskRequestHeaders ¶
func MaskRequestHeaders(headers ...string) *httpHookOption
func MaskResponseBody ¶
func MaskResponseBody(fields ...string) *httpHookOption
func MaskResponseHeaders ¶
func MaskResponseHeaders(headers ...string) *httpHookOption
Types ¶
type GRPCOption ¶
type GRPCOption interface {
// contains filtered or unexported methods
}
type HTTPOption ¶
type HTTPOption interface {
// contains filtered or unexported methods
}
type JSONOption ¶
type JSONOption interface {
// contains filtered or unexported methods
}
func CUESchemaPath ¶
func CUESchemaPath(schemaPath string, opts ...cue.Option) JSONOption
type RoundTripper ¶
type RoundTripper struct {
// contains filtered or unexported fields
}
func DumpRoundTrip ¶
func DumpRoundTrip(t *testing.T, opts ...HTTPOption) *RoundTripper
type SQLDumper ¶
type SQLDumper struct {
// contains filtered or unexported fields
}
SQLDumper logs the query and args.
func (*SQLDumper) ExecContext ¶
func (*SQLDumper) PrepareContext ¶
func (*SQLDumper) QueryContext ¶
func (*SQLDumper) QueryRowContext ¶
func (*SQLDumper) SetCallOptions ¶
SetCallOptions sets the options for the i-th call.
func (*SQLDumper) SetDriverName ¶
SetDriverName sets the driver name.
type TextOption ¶
type TextOption interface {
// contains filtered or unexported methods
}
type YAMLOption ¶
type YAMLOption interface {
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.