example

package
v0.0.0-...-14bcf06 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: MIT Imports: 15 Imported by: 0

README

接口列表

Document generated by protoc-gen-markdown. DO NOT EDIT.

Example - 服务说明,支持 markdown 语法

服务说明,支持 markdown 语法

  1. First item
  2. Second item
  3. Third item
{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}

Documentation

Overview

Code generated by protoc-gen-auth. DO NOT EDIT. source: auth.proto

Package example is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterExampleHandler

func RegisterExampleHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterExampleHandler registers the http handlers for service Example to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterExampleHandlerClient

func RegisterExampleHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExampleClient) error

RegisterExampleHandlerClient registers the http handlers for service Example to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ExampleClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ExampleClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ExampleClient" to call the correct interceptors.

func RegisterExampleHandlerFromEndpoint

func RegisterExampleHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterExampleHandlerFromEndpoint is same as RegisterExampleHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterExampleHandlerServer

func RegisterExampleHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExampleServer) error

RegisterExampleHandlerServer registers the http handlers for service Example to "mux". UnaryRPC :call ExampleServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterExampleScopeServer

func RegisterExampleScopeServer(a auth.Authenticator, s auth.Implementor, srv ExampleServer) error

Register scoped gRPC server.

func RegisterExampleServer

func RegisterExampleServer(s *grpc.Server, srv ExampleServer)

Types

type ExampleClient

type ExampleClient interface {
	//
	// 方法说明,支持 markdown
	//
	// - [x] Write the press release
	// - [ ] Update the website
	// - [ ] Contact the media
	Test(ctx context.Context, in *ExampleMessage, opts ...grpc.CallOption) (*ExampleMessage, error)
}

ExampleClient is the client API for Example service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewExampleClient

func NewExampleClient(cc grpc.ClientConnInterface) ExampleClient

type ExampleMessage

type ExampleMessage struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

消息类型注释,支持多行, 支持 markdown 语法:

> blockquote

| Syntax | Description | | ----------- | ----------- | | Header | Title | | Paragraph | Text |

func (*ExampleMessage) Descriptor

func (*ExampleMessage) Descriptor() ([]byte, []int)

func (*ExampleMessage) GetId

func (m *ExampleMessage) GetId() uint64

func (*ExampleMessage) ProtoMessage

func (*ExampleMessage) ProtoMessage()

func (*ExampleMessage) Reset

func (m *ExampleMessage) Reset()

func (*ExampleMessage) String

func (m *ExampleMessage) String() string

func (*ExampleMessage) XXX_DiscardUnknown

func (m *ExampleMessage) XXX_DiscardUnknown()

func (*ExampleMessage) XXX_Marshal

func (m *ExampleMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExampleMessage) XXX_Merge

func (m *ExampleMessage) XXX_Merge(src proto.Message)

func (*ExampleMessage) XXX_Size

func (m *ExampleMessage) XXX_Size() int

func (*ExampleMessage) XXX_Unmarshal

func (m *ExampleMessage) XXX_Unmarshal(b []byte) error

type ExampleServer

type ExampleServer interface {
	//
	// 方法说明,支持 markdown
	//
	// - [x] Write the press release
	// - [ ] Update the website
	// - [ ] Contact the media
	Test(context.Context, *ExampleMessage) (*ExampleMessage, error)
}

ExampleServer is the server API for Example service.

type UnimplementedExampleServer

type UnimplementedExampleServer struct {
}

UnimplementedExampleServer can be embedded to have forward compatible implementations.

func (*UnimplementedExampleServer) Test

Jump to

Keyboard shortcuts

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