internal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvNameAddress          string = "ADDRESS"
	EnvNamePort             string = "PORT"
	EnvNameProxyAddress     string = "PROXY_ADDRESS"
	EnvNameProxyPort        string = "PROXY_PORT"
	EnvNameAllowCredentials string = "ALLOW_CREDENTIALS"
	EnvNameAllowedOrigins   string = "ALLOWED_ORIGINS"
	EnvNameAllowedMethods   string = "ALLOWED_METHODS"
	EnvNameAllowedHeaders   string = "ALLOWED_HEADERS"
	EnvNameCorsDebug        string = "CORS_DEBUG"
	EnvNameUsername         string = "USERNAME"
	EnvNamePassword         string = "PASSWORD"
	EnvNameCors             string = "CORS"
)

Variables

View Source
var (
	Version   string
	GitCommit string
	GitBranch string
)

These variables are populated at build time to find where the variables are...use go tool nm ./app | grep app REFERENCE: https://www.digitalocean.com/community/tutorials/using-ldflags-to-set-version-information-for-go-applications

Functions

func Main

func Main(pwd string, args []string, envs map[string]string, chSignalInt chan os.Signal) error

Types

type Error

type Error struct {
	// the status code of the error
	// example: 500
	StatusCode int `json:"status_code"`

	//an error
	// example: Unspecified error has occurred
	Error string `json:"error"`
}

Error is used to communciate an error in json format

type Message

type Message struct {
	//a message
	// example: Hello, World!
	Message string `json:"message"`
}

Message is used to transport strings in json format for a given message

Directories

Path Synopsis
Package Swagger go-blog-cors
Package Swagger go-blog-cors

Jump to

Keyboard shortcuts

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