Documentation ¶
Index ¶
- func AuthInjectorTestHandler(userID string) fiber.Handler
- func BuildRequest(method, url, body string) *http.Request
- func ErrorHandler(c *fiber.Ctx, err error, logger *zerolog.Logger, isProduction bool) error
- func Logger() *zerolog.Logger
- func SetupAppFiber(logger zerolog.Logger) *fiber.App
- func StartContainerDatabase(ctx context.Context, t *testing.T, migrationsDirRelPath string) (db.Store, testcontainers.Container)
- func TruncateTables(db *sql.DB, t *testing.T)
- type UsersClient
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 ErrorHandler ¶
ErrorHandler custom handler to log recovered errors using our logger and return json instead of string
func SetupAppFiber ¶
SetupAppFiber sets up app fiber with defaults for testing, like our production error handler.
Types ¶
type UsersClient ¶
func (*UsersClient) GetUser ¶
func (c *UsersClient) GetUser(_ context.Context, in *pb.GetUserRequest, _ ...grpc.CallOption) (*pb.User, error)
Click to show internal directories.
Click to hide internal directories.