test

package
v0.10.26 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthInjectorTestHandler

func AuthInjectorTestHandler(userID string) fiber.Handler

AuthInjectorTestHandler injects fake jwt with sub

func BuildRequest

func BuildRequest(method, url, body string) *http.Request

func ErrorHandler

func ErrorHandler(c *fiber.Ctx, err error, logger *zerolog.Logger, isProduction bool) error

ErrorHandler custom handler to log recovered errors using our logger and return json instead of string

func Logger

func Logger() *zerolog.Logger

func SetupAppFiber

func SetupAppFiber(logger zerolog.Logger) *fiber.App

SetupAppFiber sets up app fiber with defaults for testing, like our production error handler.

Types

type UsersClient

type UsersClient struct {
	Store map[string]*pb.User
}

func (*UsersClient) GetUser

func (c *UsersClient) GetUser(_ context.Context, in *pb.GetUserRequest, _ ...grpc.CallOption) (*pb.User, error)

func (*UsersClient) GetUserByEthAddr added in v0.9.8

func (c *UsersClient) GetUserByEthAddr(_ context.Context, _ *pb.GetUserByEthRequest, _ ...grpc.CallOption) (*pb.User, error)

func (*UsersClient) GetUsersByEthereumAddress added in v0.10.8

Jump to

Keyboard shortcuts

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