test

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeUpdateBalanceEndpoint

func MakeUpdateBalanceEndpoint(s Service) endpoint.Endpoint

func MakeUploadFileEndpoint

func MakeUploadFileEndpoint(s Service) endpoint.Endpoint

func MakeWirenetHandlers

func MakeWirenetHandlers(wire wirenet.Wire, endpoints Set)

Types

type Service

type Service interface {
	UpdateBalance(ctx context.Context, a int, b int) (sum int, err error)
	UploadFile(ctx context.Context, filepath string, size int64, name string) error
}

func MakeWirenetClient

func MakeWirenetClient(wire wirenet.Wire) Service

func NewService

func NewService() Service

type Set

type Set struct {
	UpdateBalanceEndpoint endpoint.Endpoint
	UploadFileEndpoint    endpoint.Endpoint
}

func NewEndpointSet

func NewEndpointSet(s Service) Set

func (Set) UpdateBalance

func (s Set) UpdateBalance(ctx context.Context, a, b int) (int, error)

func (Set) UploadFile

func (s Set) UploadFile(ctx context.Context, filepath string, size int64, name string) error

type UpdateBalanceRequest

type UpdateBalanceRequest struct {
	A int
	B int
}

type UpdateBalanceResponse

type UpdateBalanceResponse struct {
	Sum int
	Err error
}

type UploadFileRequest

type UploadFileRequest struct {
	Filepath string
	Size     int64
	Name     string
}

type UploadFileResponse

type UploadFileResponse struct {
	Err error
}

Jump to

Keyboard shortcuts

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