mock

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	Logged    []map[string]any
	CtxFields map[string]any
}

func NewLogger

func NewLogger() (logger *Logger)

func (*Logger) Error

func (ml *Logger) Error(ctx context.Context, msg string, err error, kv ...any)

func (*Logger) Info

func (ml *Logger) Info(ctx context.Context, msg string, kv ...any)

func (*Logger) WithFields

func (ml *Logger) WithFields(ctx context.Context, kv ...any) context.Context

type Server

type Server struct {
	Server        *httptest.Server
	ContentHeader string
	FtwHeader     string
	//AuthHeader    string
	Method string
	Path   string
	Body   string
}

func NewServer

func NewServer(responseBody string) (ts *Server)

func newTestServer(t *testing.T, responseBody string) (ts *Server) {

type TestRt

type TestRt struct {
	Status int
}

func (*TestRt) RoundTrip

func (rt *TestRt) RoundTrip(request *http.Request) (response *http.Response, err error)

Jump to

Keyboard shortcuts

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