test

package
v0.0.0-...-10dfb09 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHttpServerWithHandlers

func NewHttpServerWithHandlers(t *testing.T, handlers []http.HandlerFunc) *httptest.Server

NewHttpServerWithHandlers creates a new httptest.Server with the provided handlers.

func NewTestHttpClient

func NewTestHttpClient(funcs ...RoundTripFunc) *http.Client

func Response

func Response(status string, body string) *http.Response

Types

type GRPCServer

type GRPCServer struct {
	// contains filtered or unexported fields
}

func StartGRPCServer

func StartGRPCServer(services ...RegisterServiceFuncs) *GRPCServer

func (*GRPCServer) ClientOptions

func (f *GRPCServer) ClientOptions() []option.ClientOption

func (*GRPCServer) Close

func (f *GRPCServer) Close()

type RegisterServiceFuncs

type RegisterServiceFuncs func(*grpc.Server)

type RoundTripFunc

type RoundTripFunc func(req *http.Request) *http.Response

type RoundTripper

type RoundTripper struct {
	// contains filtered or unexported fields
}

func (*RoundTripper) RoundTrip

func (r *RoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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