Categorygithub.com/rohanraj7316/middleware
modulepackage
0.1.1
Repository: https://github.com/rohanraj7316/middleware.git
Documentation: pkg.go.dev

# README

Middleware

it's a cluster of some pre-required middleware

File Structure

config

below are the list of default configs:

  • ServerDefault - it's fiber.Config

constant

  • TIME_FORMAT - RFC3339 using this as default time format.

response

used to structure all the responses in BodyStruct

type BodyStruct struct {
	StatusCode int          `json:"statusCode,omitempty"`
	Status     string       `json:"status,omitempty"`
	Message    interface{}  `json:"message,omitempty"`
	Err        *ErrorStruct `json:"error,omitempty"`
	Data       interface{}  `json:"data,omitempty"`
}

httpclient

wrapper build using httpclient. can be used to send http request.

validate

helps in validating request body

redisclient

helps in creating connection with redis client

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

adding pre requisite middlewares in the existing router stack.

# Variables

TODO: req and res and timeout pick from env.

# Structs

No description provided by the author