x

package
v0.40.7 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 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 WriteFile added in v0.40.0

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

func (*TestLoggerProvider) Tracer added in v0.40.1

func (lp *TestLoggerProvider) Tracer() trace.Tracer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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