x

package
v0.0.0-...-136a2fa Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

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()

func WriteFile

func WriteFile(t *testing.T, content string) string

WriteFile writes the content to a new file in a temporary location and returns the path. No cleanup is necessary.

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