endpoint

package
v0.0.0-...-4aec9fb Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

THIS FILE IS AUTO GENERATED BY GK-CLI DO NOT EDIT!!

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstrumentingMiddleware

func InstrumentingMiddleware(duration metrics.Histogram) endpoint.Middleware

InstrumentingMiddleware returns an endpoint middleware that records the duration of each invocation to the passed histogram. The middleware adds a single field: "success", which is "true" if no error is returned, and "false" otherwise.

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger) endpoint.Middleware

LoggingMiddleware returns an endpoint middleware that logs the duration of each invocation, and the resulting error, if any.

func MakeGetTasksByIDEndpoint

func MakeGetTasksByIDEndpoint(s service.TaskService) endpoint.Endpoint

MakeGetTasksByIDEndpoint returns an endpoint that invokes GetTasksByID on the service.

Types

type Endpoints

type Endpoints struct {
	GetTasksByIDEndpoint endpoint.Endpoint
}

Endpoints collects all of the endpoints that compose a profile service. It's meant to be used as a helper struct, to collect all of the endpoints into a single parameter.

func New

New returns a Endpoints struct that wraps the provided service, and wires in all of the expected endpoint middlewares

func (Endpoints) GetTasksByID

func (e Endpoints) GetTasksByID(ctx context.Context, id string, state string) (status bool, errinfo string, data []model.Task)

GetTasksByID implements Service. Primarily useful in a client.

type GetTasksByIDRequest

type GetTasksByIDRequest struct {
	Id    string `json:"id"`
	State string `json:"state"`
}

GetTasksByIDRequest collects the request parameters for the GetTasksByID method.

type GetTasksByIDResponse

type GetTasksByIDResponse struct {
	Status  bool         `json:"status"`
	Errinfo string       `json:"errinfo"`
	Data    []model.Task `json:"data"`
}

GetTasksByIDResponse collects the response parameters for the GetTasksByID method.

Jump to

Keyboard shortcuts

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