controller

package
v0.0.0-...-d54a198 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Addition

func Addition(c echo.Context) error

func DeleteRecord

func DeleteRecord(c echo.Context) error

func Division

func Division(c echo.Context) error

func GetAllRecord

func GetAllRecord(c echo.Context) error

func GetRecord

func GetRecord(c echo.Context) error

func Modulus

func Modulus(c echo.Context) error

func Multiplication

func Multiplication(c echo.Context) error

func Power

func Power(c echo.Context) error

func Square

func Square(c echo.Context) error

func SquareRoot

func SquareRoot(c echo.Context) error

func Subtraction

func Subtraction(c echo.Context) error

Types

type GetAllRecordResponse

type GetAllRecordResponse []struct {
	// contains filtered or unexported fields
}

type GetRecordResponse

type GetRecordResponse struct {
	Id        int     `json:"id"`
	Number1   float64 `json:"number1"`
	Number2   float64 `json:"number2"`
	Operation string  `json:"operation"`
	Result    float64 `json:"result"`
	CreatedAt string  `json:"createdAt"`
}

type Numbers

type Numbers struct {
	Number1 float64 `json:"number1"`
	Number2 float64 `json:"number2"`
}

var db *sql.DB

func (Numbers) Connect

func (number Numbers) Connect(result float64, operation string)

type Response

type Response struct {
	Result float64 `json:"result"`
}

Jump to

Keyboard shortcuts

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