Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRequestWithMultipartForm ¶ added in v0.5.6
func NewRequestWithMultipartForm(form MultipartForm) (*http.Request, error)
NewRequestWithMultipartForm creates a mock gin.Context populated with the provided multipart form data. It constructs the multipart form, attaches it to a mock request, and creates a gin.Context using that request. Returns the created context and any error.
The request is a POST request to "/" with the provided form data.
func NewRequestWithQueryParameters ¶ added in v0.5.6
func NewRequestWithQueryParameters(parameters []QueryParameter) *http.Request
NewRequestWithQueryParameters creates a mock echo.Context with the provided query parameters set. It is intended for use in tests.
It returns a GET request for the path "/"
Types ¶
type MultipartForm ¶
type MultipartForm struct { Fields []Field `yaml:"fields"` // Regular form fields Files map[string][]File `yaml:"files"` // File fields with file content }
MultipartForm holds form fields and files for a multipart form.
type NoPageFoundError ¶ added in v0.5.6
type NoPageFoundError struct {
Page string
}
NoPageFoundError is returned by Render if no template was found, in which case the Render is skipped and moves on to the next middleware.
func (*NoPageFoundError) Error ¶ added in v0.5.6
func (e *NoPageFoundError) Error() string
type QueryParameter ¶
QueryParameter holds a key-value pair for a query parameter.
type TestGlazedCommand ¶
type TestGlazedCommand struct {
// contains filtered or unexported fields
}
func NewTestGlazedCommand ¶
func NewTestGlazedCommand(options ...cmds.CommandDescriptionOption) (*TestGlazedCommand, error)
func (*TestGlazedCommand) Description ¶
func (t *TestGlazedCommand) Description() *cmds.CommandDescription
func (*TestGlazedCommand) RunIntoGlazeProcessor ¶
func (t *TestGlazedCommand) RunIntoGlazeProcessor( ctx context.Context, parsedLayers *layers.ParsedLayers, gp middlewares.Processor, ) error