Documentation
¶
Index ¶
- type TestCtx
- func (c TestCtx) BaseLogger() *logrus.Logger
- func (c TestCtx) GenericLogger(logLevel string, key string, value interface{}) *log.Logger
- func (c TestCtx) Hook() *test.Hook
- func (c TestCtx) Log() logrus.FieldLogger
- func (c TestCtx) Render() *render.Render
- func (c TestCtx) Validate() *validator.Validate
- func (c TestCtx) Wrap(fields map[string]interface{}) api.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestCtx ¶
type TestCtx struct {
// contains filtered or unexported fields
}
TestCtx returns a test context which implements the api context interface
func NewTestContext ¶
func NewTestContext() *TestCtx
NewTestContext creates a new instance of the test context
func (TestCtx) BaseLogger ¶
BaseLogger - returns the base logger without additional fields
func (TestCtx) GenericLogger ¶
GenericLogger provides the generic logger which outputs to the logrus writer along with additional fields (used for passing to third party libraries)
func (TestCtx) Hook ¶
Hook - returns logging hook for retrieving logging messages - handy for testing
func (TestCtx) Log ¶
func (c TestCtx) Log() logrus.FieldLogger
Log provides read only access to logger
Click to show internal directories.
Click to hide internal directories.