service

package
v0.0.0-...-7e8f824 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Calculator

type Calculator int

Calculator represents the service available over the network.

func (*Calculator) Addition

func (c *Calculator) Addition(rq *Request, rp *Response) error

Addition stands as an exported method that execute a sum operation over the request args.

func (*Calculator) Subtraction

func (c *Calculator) Subtraction(rq *Request, rp *Response) error

Subtraction stands as an exported method that execute a subtraction operation over the request args.

type Operations

type Operations interface {
	Addition(*Request, *Response) error
	Subtraction(*Request, *Response) error
}

Operations stands for all the remote fuctions definition in the service.

type Request

type Request struct {
	A, B float64
}

Request represents the data args for the service.

type Response

type Response struct {
	Result float64
}

Response represents the data results from the service.

Jump to

Keyboard shortcuts

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