goapp

package module
v0.0.0-...-c80e655 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: MIT Imports: 18 Imported by: 0

README

goapp

Package with basics microservices features

Documentation

Index

Constants

View Source
const (
	//Http Server
	DEFAULT_PORT = ":8080"

	//Logger
	DEFAULT_LOG_LEVEL = "warning"

	//Environments
	ENV_PROD  = "PROD"
	ENV_STAGE = "STAGE"
	ENV_TEST  = "TEST"
	ENV_DEV   = "DEV"
	ENV_LOCAL = "LOCAL"
)

Variables

View Source
var JWTExtraValidation func(token *jwt.Token) error
View Source
var Router *myRouter
View Source
var Tracer trace.Tracer

Functions

func CloseTracing

func CloseTracing()

func Environment

func Environment() string

func HandlePanic

func HandlePanic(w http.ResponseWriter)

func InitAuth

func InitAuth()

func InitLogger

func InitLogger()

func InitRouter

func InitRouter()

func InitTracing

func InitTracing()

func JwtSecret

func JwtSecret() []byte

func LoadEnv

func LoadEnv()

func LogLevel

func LogLevel() logrus.Level

func Ping

func Ping(res http.ResponseWriter, req *http.Request)

func Port

func Port() string

Types

type JSONWebKeys

type JSONWebKeys struct {
	Kty string   `json:"kty"`
	Kid string   `json:"kid"`
	Use string   `json:"use"`
	N   string   `json:"n"`
	E   string   `json:"e"`
	X5c []string `json:"x5c"`
}

type Jwks

type Jwks struct {
	Keys []JSONWebKeys `json:"keys"`
}

Jump to

Keyboard shortcuts

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