Skip to content

rohanraj7316/middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Middleware

it's a cluster of some pre-required middleware

File Structure

below are the list of default configs:

  • ServerDefault - it's fiber.Config
  • TIME_FORMAT - RFC3339 using this as default time format.

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"`
}

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

helps in validating request body

helps in creating connection with redis client