cmd

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const EnvPrefix string = "POSTAL_SERVER"

EnvPrefix for environment variables

Variables

View Source
var (
	EnvStrReplacer = strings.NewReplacer(".", "_")
	Version        = fmt.Sprintf("%s, date %s, build %s", version.Version, version.BuildTime, version.GitCommit)
)

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func Middleware

func Middleware(tokenVerificationFunc TokenVerificationFunc) gin.HandlerFunc

func MiddlewareWithStaticToken

func MiddlewareWithStaticToken(token string) gin.HandlerFunc

Types

type Handler

type Handler func(*gin.Context)

type TokenVerificationFunc

type TokenVerificationFunc func(string, *gin.Context) bool

Jump to

Keyboard shortcuts

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