Documentation
¶
Index ¶
- func Dedent(s string) string
- func GetReporter(ctx context.Context) reporter.Reporter
- func Info(ctx context.Context, info reporter.Info)
- func SetCheckError(ctx context.Context, err *CheckError) context.Context
- func StdCheck(L *lua.LState, tbl *lua.LTable, b any)
- func StdCheckDefinition(fn lua.LGFunction) *spec.Function
- func StdCheckError(ctx context.Context, tbl *lua.LTable, b any) error
- func WithReporter(ctx context.Context, r reporter.Reporter) context.Context
- func WithSaveFunc(ctx context.Context, fn SaveFunc) context.Context
- type CheckError
- type GQL
- type PubSub
- type PubSubHook
- type PubSubMessage
- type PubSubTopic
- type REST
- type Reporter
- type SQL
- type SaveFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dedent ¶
Dedent removes the common leading whitespace from all lines in a string. Empty lines (or lines with only whitespace) are ignored when calculating the common indent, but are preserved in the output (as empty lines).
func Info ¶
Info logs information about test execution if a reporter is available. It automatically applies Dedent to the Content field and all Args values to remove common leading whitespace from multi-line strings.
func SetCheckError ¶
func SetCheckError(ctx context.Context, err *CheckError) context.Context
SetCheckError stores a CheckError in the context for later retrieval
func StdCheckDefinition ¶
func StdCheckDefinition(fn lua.LGFunction) *spec.Function
Types ¶
type CheckError ¶
CheckError is a structured error type that holds the diff message along with the original expected and actual values for copying.
func GetCheckError ¶
func GetCheckError(ctx context.Context) (*CheckError, bool)
GetCheckError retrieves the CheckError from the context if present
func (*CheckError) Error ¶
func (e *CheckError) Error() string
type PubSub ¶
type PubSub struct {
// contains filtered or unexported fields
}
func NewPubSub ¶
func NewPubSub(doPublish PubSubHook) *PubSub
func (*PubSub) HelperFunctions ¶
func (*PubSub) Receive ¶
func (p *PubSub) Receive(topic string, msg PubSubMessage)
func (*PubSub) Send ¶
func (p *PubSub) Send(topic string, msg PubSubMessage)
type PubSubHook ¶
type PubSubHook func(topic string, msg PubSubMessage) error
type PubSubMessage ¶
type PubSubTopic ¶
type PubSubTopic struct {
Sent []PubSubMessage
Received []PubSubMessage
}
type SQL ¶
type SQL struct {
// contains filtered or unexported fields
}