controllers

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Add = request.Handler(func(r *AddRequest) (*AddResponse, error) {
	kernel.Dispatch(&events.LogEvent{Message: "test"})
	return &AddResponse{
		Sum: r.A + r.B,
	}, nil
})

Functions

This section is empty.

Types

type AddRequest

type AddRequest struct {
	A float64 `query:"a" validate:"required"`
	B float64 `query:"b" validate:"required"`
}

type AddResponse

type AddResponse struct {
	Sum float64 `json:"sum"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL