util

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBconnect

func DBconnect(user, pass, address, dbName, sslmode string) *gorm.DB

func DBcreate

func DBcreate(user, pass, address, dbName, sslmode string) *gorm.DB

func DBinit

func DBinit(user, pass, address, dbName, sslmode string) error

func LookupEnv

func LookupEnv(key, fallback string) string

looks up an environment variable and returns the var or a fallback

func SecretProvided

func SecretProvided(secret string) gin.HandlerFunc

A stupid simple middleware that checks that a request has a Authorization: Basic $SECRET header

Types

This section is empty.

Jump to

Keyboard shortcuts

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