hello

package
v0.0.0-...-96111de Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2020 License: MIT Imports: 1 Imported by: 0

README

hello

This example demonstrates how to use gokit to create a go-kit micro-service.

  • service.go defines methods & dto used in the service.
  • gokit service -interface=Service to generate codes.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByeRequest

type ByeRequest struct {
	Name string `json:"name"`
}

ByeRequest presents a request.

type ByeResponse

type ByeResponse struct {
	Text string `json:"text"`
}

ByeResponse ...

type Request

type Request struct {
	Name string `json:"name"`
}

Request presents a request.

type Response

type Response struct {
	Text string `json:"text"`
}

Response ...

type Service

type Service interface {
	Hello(ctx context.Context, p *Request) (*Response, error)
	Bye(ctx context.Context, req *ByeRequest) (*ByeResponse, error)
}

Service is a simple interface for a service.

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

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