Skip to content

core-go/middleware

Repository files navigation

middleware

middleware log for

  • http
  • echo
  • gin

Installation

Please make sure to initialize a Go module before installing core-go/middleware:

go get -u github.com/core-go/middleware

Import:

import "github.com/core-go/middleware"

Features

log tracing at middleware

Support to turn on, turn off

  • request
  • response
  • duration
  • http response status code
  • response content length

Support to mask or encrypt fields

  • support to mask or encrypt fields, such as mobileNumber, creditCardNumber

Microservice Architect

Microservice Architect

A typical micro service

  • When you zoom one micro service, the flow is as below, and you can see "middleware" in the full picture: A typical micro service

Cross-cutting concerns

  • "middleware" in the full picture of cross-cutting concerns cross-cutting concerns