messages

package
Version: 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: 0

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