commons

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActuatorPrefix           = "/actuator"
	CertFilePath             = "cert-file"
	CertFilePathDefaultValue = ""
	CertFilePathUsage        = "cert file path is the path of the certificate file"
	KeyFilePath              = "key-file"
	KeyFilePathDefaultValue  = ""
	KeyFilePathUsage         = "key file path is the path of the key file"
	MoxyPrefix               = "/moxy"
	PersistencePath          = "persistence-path"
	PersistenceDefaultValue  = "persistence.db"
	PersistenceUsage         = "persistence path is the path of the file which acts as the persistence layer for this application"
	Port                     = "port"
	PortDefaultValue         = 8080
	PortUsage                = "port is the port number on which the application is running"
	TLSEnabled               = "tls"
	TLSEnabledDefaultValue   = false
	TLSEnabledUsage          = "tls enabled tells whether the application is running on HTTPS or not"
)

Common Constants

View Source
const (
	TagHeader                  = "x-tag"
	URLHeader                  = "x-url"
	ApplicationJSONContentType = "application/json"
	TextStringContentType      = "text/string"
)

Response constants

View Source
const (
	MockEntityName = "mock"
)

MockEntityName is the mock entity name

Variables

View Source
var (
	BasePath           = "/"
	MockEndpointPath   = fmt.Sprintf("%s/mock", MoxyPrefix)
	UnMockEndpointPath = fmt.Sprintf("%s/unMock", MoxyPrefix)
)

Endpoint Paths

Functions

func DecodeJSON

func DecodeJSON(b []byte, v interface{}) error

DecodeJSON is used to decode any type of data from byte array

func EncodeJSON

func EncodeJSON(v interface{}) ([]byte, error)

EncodeJSON is used to encode any type of data to byte array

Types

This section is empty.

Jump to

Keyboard shortcuts

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