echo

package
v0.0.0-...-225f367 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GetEchoEndpoint      = "/api/v1/echo"
	GetEchoEndpoint_1    = "/api/v1/echo/:param_in_uri_or_query"
	PostEchoEndpoint     = "/api/v1/echo"
	PostEchoEndpoint_1   = "/api/v1/echo/:param_in_uri_or_query"
	PostFormEchoEndpoint = "/api/v1/form"
)

All Endpoints

Functions

func RegisterEchoServer

func RegisterEchoServer(router gin.IRouter, s EchoServer)

RegisterEchoServer registers the http handlers for service Echo to "router".

Types

type DefaultEchoDecorator

type DefaultEchoDecorator struct {
	// contains filtered or unexported fields
}

DefaultEchoDecorator the default decorator.

func NewDefaultEchoDecorator

func NewDefaultEchoDecorator(ss EchoServer) *DefaultEchoDecorator

NewDefaultEchoDecorator constructs a new default Echo decorator

func (*DefaultEchoDecorator) GetEcho

func (s *DefaultEchoDecorator) GetEcho(ctx *gin.Context)

func (*DefaultEchoDecorator) GetEcho_1

func (s *DefaultEchoDecorator) GetEcho_1(ctx *gin.Context)

func (*DefaultEchoDecorator) PostEcho

func (s *DefaultEchoDecorator) PostEcho(ctx *gin.Context)

func (*DefaultEchoDecorator) PostEcho_1

func (s *DefaultEchoDecorator) PostEcho_1(ctx *gin.Context)

func (*DefaultEchoDecorator) PostFormEcho

func (s *DefaultEchoDecorator) PostFormEcho(ctx *gin.Context)

type EchoClient

type EchoClient interface {
	GetEcho(context.Context, *GetEchoReq) (*GetEchoResp, error)
	PostEcho(context.Context, *PostEchoReq) (*PostEchoResp, error)
	PostFormEcho(context.Context, *PostFormEchoReq) (*PostFormEchoResp, error)
}

EchoClient is the client API for for Echo service.

func NewEchoClient

func NewEchoClient(host string, cc *http.Client) EchoClient

NewEchoClient creates a client API for Echo service.

type EchoServer

EchoServer is the server API for Echo service.

type GetEchoReq

type GetEchoReq struct {
	ParamInUriOrQuery    string `json:"param_in_uri_or_query,omitempty" uri:"param_in_uri_or_query" form:"param_in_uri_or_query"`
	ParamInHeaderOrQuery string `json:"param_in_header_or_query,omitempty" header:"param_in_header_or_query" form:"param_in_header_or_query"`
}

type GetEchoResp

type GetEchoResp struct {
	ParamInUriOrQuery    string `json:"param_in_uri_or_query,omitempty"`
	ParamInHeaderOrQuery string `json:"param_in_header_or_query,omitempty"`
}

type PostEchoReq

type PostEchoReq struct {
	ParamInUriOrQuery string `json:"param_in_uri_or_query,omitempty" uri:"param_in_uri_or_query" form:"param_in_uri_or_query"`
	ParamInHeader     string `json:"param_in_header,omitempty" header:"param_in_header"`
	ParamInBody       string `json:"param_in_body,omitempty"`
}

type PostEchoResp

type PostEchoResp struct {
	ParamInUriOrQuery string `json:"param_in_uri_or_query,omitempty"`
	ParamInHeader     string `json:"param_in_header,omitempty"`
	ParamInBody       string `json:"param_in_body,omitempty"`
}

type PostFormEchoReq

type PostFormEchoReq struct {
	ParamInFormA string `json:"param_in_form_a,omitempty" form:"param_in_form_a"`
	ParamInFormB string `json:"param_in_form_b,omitempty" form:"param_in_form_b"`
	// Nested Map for all multipart files.
	// Keys of the outer map and inner map represent form-data keys and filename, respectively.
	// Note: Just for Client use only
	MultipartFiles map[string]map[string]io.Reader `json:"multipart_files" form:"multipart_files"`
	// Note: Just for Server use only
	FilesA []*multipart.FileHeader `json:"files_a,omitempty" form:"files_a"`
	// Note: Just for Server use only
	FileB *multipart.FileHeader `json:"file_b,omitempty" form:"file_b"`
}

type PostFormEchoResp

type PostFormEchoResp struct {
	ParamInFormA string `json:"param_in_form_a,omitempty"`
	ParamInFormB string `json:"param_in_form_b,omitempty"`
	FilenameA    string `json:"filename_a,omitempty"`
	FilenameB    string `json:"filename_b,omitempty"`
}

type UnimplementedEchoServer

type UnimplementedEchoServer struct{}

UnimplementedEchoServer can be embedded to have forward compatible implementations.

func (*UnimplementedEchoServer) GetEcho

func (*UnimplementedEchoServer) PostEcho

func (*UnimplementedEchoServer) PostFormEcho

func (*UnimplementedEchoServer) RawMethod

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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