Categorygithub.com/skuid/spec
modulepackage
1.0.21
Repository: https://github.com/skuid/spec.git
Documentation: pkg.go.dev

# README

Skuid Microservice Spec

https://img.shields.io/badge/godoc-reference-5272B4.svg?style=flat-square

This library is an implementation of Skuid's Microservice spec, to remove boilerplate when creating microservices in Go.

ci status go report card MIT license

Contributing

See CONTRIBUTING.md

License

MIT (See License)

# Packages

No description provided by the author
Package example contains an example web application that uses packages contained in this project.
Package lifecycle provides variables for controlling an application's lifecycle, and a function for gracefully shutting down an http.Server.
No description provided by the author
Package middlewares provides middleware function for decorating HTTP handlers.
Package redis adds built-in Redis support with our common configuration.
No description provided by the author

# Functions

GetLogLevel get a zapcore level from an string levels can be debug, info, warning, error, dpanic, panic, fatal.
LevelPflag returns a *pflag.Flag and a *zapcore.Level for the given flag arguments fset := pflag.CommandLine lflag, level := spec.LevelPflag("level", zapcore.InfoLevel, "Log level") fset.AddFlag(lflag).
LevelPflagCommandLine returns a *zapcore.Level for the given flag arguments.
LevelPflagP returns a *pflag.Flag and a *zapcore.Level for the given flag arguments fset := pflag.CommandLine lflag, level := spec.LevelPflagP("level","l", zapcore.InfoLevel, "Log level") fset.AddFlag(lflag).
LevelPflagPCommandLine returns a *zapcore.Level for the given flag arguments.
MetricsServer is a convenience function for handling metrics and healthchecks.
NewStandardLevelLogger creates a new zap.Logger based on common configuration.
NewStandardLogger creates a new zap.Logger based on common configuration This is intended to be used with zap.ReplaceGlobals() in an application's main.go.

# Type aliases

SelectorSet is a custom flag that takes key-value pairs joined by equal signs and separated by commas.