messages

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2020 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdditionRequest

type AdditionRequest struct {
	NumberOfAddends int   `json:"number_of_addends"`
	MaxSum          int64 `json:"max_sum"`
}

func (AdditionRequest) Valid

func (a AdditionRequest) Valid() (bool, error)

type AdditionResult

type AdditionResult struct {
	Addends  []int64 `json:"addends"`
	Sum      int64   `json:"sum"`
	Question string  `json:"question"`
	Result   string  `json:"result"`
}

func AdditionResultFromModel

func AdditionResultFromModel(model mathgen.AdditionResult) AdditionResult

type SubtractionRequest

type SubtractionRequest struct {
	MaxMinuend          int64 `json:"max_minuend"`
	NumberOfSubtrahends int   `json:"number_of_subtrahends"`
}

func (SubtractionRequest) Valid

func (a SubtractionRequest) Valid() (bool, error)

type SubtractionResult

type SubtractionResult struct {
	Minuend     int64   `json:"minuend"`
	Subtrahends []int64 `json:"subtrahends"`
	Difference  int64   `json:"difference"`
	Question    string  `json:"question"`
	Result      string  `json:"result"`
}

func SubtractionResultFromModel

func SubtractionResultFromModel(model mathgen.SubtractionResult) SubtractionResult

Jump to

Keyboard shortcuts

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