Documentation
¶
Index ¶
- type MockContext
- func (c *MockContext) Data() []byte
- func (m *MockContext) HTTP() serverless.HTTP
- func (c *MockContext) Metadata(_ string) (string, bool)
- func (c *MockContext) RecordsWritten() []WriteRecord
- func (c *MockContext) Tag() uint32
- func (c *MockContext) Write(tag uint32, data []byte) error
- func (c *MockContext) WriteWithTarget(tag uint32, data []byte, target string) error
- type WriteRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockContext ¶
type MockContext struct {
// contains filtered or unexported fields
}
MockContext mock context.
func NewMockContext ¶
func NewMockContext(data []byte, tag uint32) *MockContext
NewMockContext returns the mock context. the data is that returned by ctx.Data(), the tag is that returned by ctx.Tag().
func (*MockContext) Data ¶
func (c *MockContext) Data() []byte
func (*MockContext) HTTP ¶
func (m *MockContext) HTTP() serverless.HTTP
func (*MockContext) Metadata ¶ added in v1.18.5
func (c *MockContext) Metadata(_ string) (string, bool)
func (*MockContext) RecordsWritten ¶ added in v1.17.4
func (c *MockContext) RecordsWritten() []WriteRecord
RecordsWritten returns the data records be written with `ctx.Write`.
func (*MockContext) Tag ¶
func (c *MockContext) Tag() uint32
func (*MockContext) WriteWithTarget ¶ added in v1.17.4
func (c *MockContext) WriteWithTarget(tag uint32, data []byte, target string) error
type WriteRecord ¶ added in v1.17.4
WriteRecord composes the data, tag and target.
Click to show internal directories.
Click to hide internal directories.