Documentation ¶
Index ¶
- Constants
- Variables
- func Deepcopy(m map[string]interface{}) (map[string]interface{}, error)
- func IfThenElseString(c bool, thenVal, elseVal string) string
- func NewTemplate(id string) *template.Template
- func OrDefaultString(val, defaultVal string) string
- func ParseURLOrFatal(l *logrusx.Logger, in string) *url.URL
- func ParseURLOrPanic(in string) *url.URL
- func TraceRequest(ctx context.Context, req *http.Request) func()
- func WriteFile(t *testing.T, content string) string
- type RegistryLogger
- type RegistryWriter
- type RouterAPI
- type TestLoggerProvider
Constants ¶
View Source
const UnknownVersion = "master"
Variables ¶
View Source
var ( Version = "master" Date = "undefined" Commit = "undefined" )
Functions ¶
func IfThenElseString ¶
func NewTemplate ¶
NewTemplate creates a template with additional functions
func OrDefaultString ¶
func ParseURLOrFatal ¶
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 ¶
ParseURLOrPanic parses a url or panics. This is the same function as urlx.ParseOrPanic() except that it uses urlx.Parse() instead of url.Parse()
Types ¶
type RegistryLogger ¶
type RegistryWriter ¶
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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.