x

package
v0.39.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 16 Imported by: 14

Documentation

Index

Constants

View Source
const UnknownVersion = "master"

Variables

View Source
var (
	Version = "master"
	Date    = "undefined"
	Commit  = "undefined"
)

Functions

func Deepcopy

func Deepcopy(m map[string]interface{}) (map[string]interface{}, error)

Deepcopy performs a deep copy of the given map m.

func IfThenElseString

func IfThenElseString(c bool, thenVal, elseVal string) string

func NewTemplate

func NewTemplate(id string) *template.Template

NewTemplate creates a template with additional functions

func OrDefaultString

func OrDefaultString(val, defaultVal string) string

func ParseURLOrFatal

func ParseURLOrFatal(l *logrusx.Logger, in string) *url.URL

ParseURLOrFatal parses a url or fatals. This is the same function as urlx.ParseOrFatal() except that it uses urlx.Parse() instead of url.Parse()

func ParseURLOrPanic

func ParseURLOrPanic(in string) *url.URL

ParseURLOrPanic parses a url or panics. This is the same function as urlx.ParseOrPanic() except that it uses urlx.Parse() instead of url.Parse()

func TraceRequest

func TraceRequest(ctx context.Context, req *http.Request) func()

Types

type RegistryLogger

type RegistryLogger interface {
	Logger() *logrusx.Logger
}

type RegistryWriter

type RegistryWriter interface {
	Writer() herodot.Writer
}

type RouterAPI

type RouterAPI struct {
	*httprouter.Router
}

func NewAPIRouter

func NewAPIRouter() *RouterAPI

type TestLoggerProvider

type TestLoggerProvider struct{}

func (*TestLoggerProvider) Logger

func (lp *TestLoggerProvider) Logger() *logrusx.Logger

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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