Documentation ¶
Index ¶
- func New(style string, level int64) contract.Logger
- func NewFestive(level int64) contract.Logger
- func NewPlain(level int64) contract.Logger
- type Festive
- func (log Festive) Default(args ...interface{}) string
- func (log Festive) Error(args ...interface{}) string
- func (log Festive) Failure(args ...interface{}) string
- func (log Festive) ID(args ...interface{}) string
- func (log Festive) Method(args ...interface{}) string
- func (log Festive) OK(args ...interface{}) string
- func (log Festive) Op(args ...interface{}) string
- func (log Festive) Success(args ...interface{}) string
- func (log Festive) URL(args ...interface{}) string
- func (log Festive) Value(args ...interface{}) string
- func (log Festive) ValueActual(args ...interface{}) string
- func (log Festive) ValueExpected(args ...interface{}) string
- type IStyle
- type Log
- func (log Log) Error(err error)
- func (log Log) Expecting(what string, v string)
- func (log Log) ExpectingProperty(what string, v string)
- func (log Log) HeaderHasNoValue(hdr string)
- func (log Log) LoadingScript(path string)
- func (log Log) LoadingSpec(path string)
- func (log Log) NOMESSAGE(msg string, args ...interface{})
- func (log Log) OperationFail()
- func (log Log) OperationOK()
- func (log Log) Parameters(name string, params contract.ParameterSource)
- func (log Log) Print(l int64, msg string, args ...interface{})
- func (log Log) PrintOperations(ops contract.OperationIterator)
- func (log Log) Println(l int64, msg string, args ...interface{})
- func (log Log) Requesting(method string, URL string)
- func (log Log) ResponseHasWrongContentType(expectedCT string, actualCT string)
- func (log Log) ResponseHasWrongPropertyValue(propName string, expected string, actual string)
- func (log Log) ResponseHasWrongStatus(expectedStatus int, actualStatus int)
- func (log Log) SchemaFail(schemaName string, errors []gojsonschema.ResultError)
- func (log Log) SchemaOK(schemaName string)
- func (log Log) SchemaTesting(schema *api.Schema, data interface{})
- func (log Log) ScriptExecutionStart(node string)
- func (log Log) SecurityHasNoData(sec contract.Security)
- func (log Log) TestingOperation(op contract.Operation)
- func (log Log) TestingProject(pi contract.ProjectInfo)
- func (log Log) Usage()
- func (log Log) UsingParameterExample(paramName string, in string, container string, value string)
- func (log Log) UsingSecurity(sec contract.Security)
- func (log Log) XError(err error, style contract.LogStyle, tab contract.TabFn)
- type Plain
- func (log Plain) Default(args ...interface{}) string
- func (log Plain) Error(args ...interface{}) string
- func (log Plain) Failure(args ...interface{}) string
- func (log Plain) ID(args ...interface{}) string
- func (log Plain) Method(args ...interface{}) string
- func (log Plain) OK(args ...interface{}) string
- func (log Plain) Op(args ...interface{}) string
- func (log Plain) Success(args ...interface{}) string
- func (log Plain) URL(args ...interface{}) string
- func (log Plain) Value(args ...interface{}) string
- func (log Plain) ValueActual(args ...interface{}) string
- func (log Plain) ValueExpected(args ...interface{}) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFestive ¶
NewFestive creates a new Festive logger style instance.
Types ¶
type Festive ¶
type Festive struct{}
Festive - a colorized test execution log style.
func (Festive) ValueActual ¶
ValueActual marks up actual received values.
func (Festive) ValueExpected ¶
ValueExpected marks up expected values.
type IStyle ¶
type IStyle interface { Default(...interface{}) string URL(...interface{}) string Method(...interface{}) string Op(...interface{}) string OK(...interface{}) string Failure(...interface{}) string Success(...interface{}) string Error(...interface{}) string ID(...interface{}) string ValueExpected(...interface{}) string ValueActual(...interface{}) string }
IStyle is an interface to log styling.
type Log ¶
Log is a base type for loggers.
func (Log) Error ¶
Error outputs errors. It accepts both built-in errors as well as errors.IError instances. The latter carry their cause error, if any, and those will be recursively printed.
func (Log) ExpectingProperty ¶
ExpectingProperty informs that a parameter example being used.
func (Log) HeaderHasNoValue ¶
HeaderHasNoValue informs that a required response header has no data.
func (Log) LoadingScript ¶
LoadingScript informs about the API specification being used.
func (Log) LoadingSpec ¶
LoadingSpec informs about the API specification being used.
func (Log) NOMESSAGE ¶
NOMESSAGE is a default and temporary print function to use when you don't have a dedidated message function in the logger. It is meant to be replaced eventually with a proper logging method or removed. Henec the indicating name.
func (Log) OperationFail ¶
func (log Log) OperationFail()
OperationFail informs that the operation has failed.
func (Log) OperationOK ¶
func (log Log) OperationOK()
OperationOK informs that the operation has finished successfully.
func (Log) Parameters ¶
func (log Log) Parameters(name string, params contract.ParameterSource)
Parameters prints a ParameterSource contents.
func (Log) PrintOperations ¶
func (log Log) PrintOperations(ops contract.OperationIterator)
PrintOperations prints the list of available operations.
func (Log) Requesting ¶
Requesting informs about an HTTP request being performed.
func (Log) ResponseHasWrongContentType ¶
ResponseHasWrongContentType informs that the received response has wrong/unexpected Content-Type header value.
func (Log) ResponseHasWrongPropertyValue ¶
ResponseHasWrongPropertyValue informs that the received response has wrong/unexpected body property value.
func (Log) ResponseHasWrongStatus ¶
ResponseHasWrongStatus informs that the received response has wrong/unexpected status.
func (Log) SchemaFail ¶
func (log Log) SchemaFail(schemaName string, errors []gojsonschema.ResultError)
SchemaFail informs that JSON schema testing finished unsuccessfully.
func (Log) SchemaTesting ¶
SchemaTesting informs about a value being tested againt some JSON schema.
func (Log) ScriptExecutionStart ¶
ScriptExecutionStart logs the starting node of the script execution graph.
func (Log) SecurityHasNoData ¶
SecurityHasNoData informs that the selected security settings has no data to use in requests.
func (Log) TestingOperation ¶
TestingOperation informs about an operation being tested.
func (Log) TestingProject ¶
func (log Log) TestingProject(pi contract.ProjectInfo)
TestingProject informs about the project being tested.
func (Log) UsingParameterExample ¶
UsingParameterExample informs that a parameter example being used.
func (Log) UsingSecurity ¶
UsingSecurity informs about security mechanisms being used during testing.
type Plain ¶
type Plain struct{}
Plain - a plain & simple test execution logger style.
func (Plain) ValueActual ¶
ValueActual marks up actual received values.
func (Plain) ValueExpected ¶
ValueExpected marks up expected values.