test

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

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

Go to latest
Published: Nov 12, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package test is a generated protocol buffer package.

It is generated from these files:

test.proto

It has these top-level messages:

Request
Response
Test

Index

Constants

This section is empty.

Variables

View Source
var Test_Status_name = map[int32]string{
	0: "OK",
	1: "FAIL",
}
View Source
var Test_Status_value = map[string]int32{
	"OK":   0,
	"FAIL": 1,
}

Functions

func RegisterTestServiceServer

func RegisterTestServiceServer(s *grpc.Server, srv TestServiceServer)

Types

type Request

type Request struct {
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}

Request 请求结构

func (*Request) Descriptor

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

func (*Request) GetName

func (m *Request) GetName() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

type Response

type Response struct {
	Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
}

Response 响应结构

func (*Response) Descriptor

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

func (*Response) GetMessage

func (m *Response) GetMessage() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

type Test

type Test struct {
	Age    int32             `protobuf:"varint,1,opt,name=age" json:"age,omitempty"`
	Count  int64             `protobuf:"varint,2,opt,name=count" json:"count,omitempty"`
	Money  float64           `protobuf:"fixed64,3,opt,name=money" json:"money,omitempty"`
	Score  float32           `protobuf:"fixed32,4,opt,name=score" json:"score,omitempty"`
	Name   string            `protobuf:"bytes,5,opt,name=name" json:"name,omitempty"`
	Fat    bool              `protobuf:"varint,6,opt,name=fat" json:"fat,omitempty"`
	Char   []byte            `protobuf:"bytes,7,opt,name=char,proto3" json:"char,omitempty"`
	Status Test_Status       `protobuf:"varint,8,opt,name=status,enum=test.Test_Status" json:"status,omitempty"`
	Child  *Test_Child       `protobuf:"bytes,9,opt,name=child" json:"child,omitempty"`
	Dict   map[string]string `` /* 129-byte string literal not displayed */
}

Test 测试

func (*Test) Descriptor

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

func (*Test) GetAge

func (m *Test) GetAge() int32

func (*Test) GetChar

func (m *Test) GetChar() []byte

func (*Test) GetChild

func (m *Test) GetChild() *Test_Child

func (*Test) GetCount

func (m *Test) GetCount() int64

func (*Test) GetDict

func (m *Test) GetDict() map[string]string

func (*Test) GetFat

func (m *Test) GetFat() bool

func (*Test) GetMoney

func (m *Test) GetMoney() float64

func (*Test) GetName

func (m *Test) GetName() string

func (*Test) GetScore

func (m *Test) GetScore() float32

func (*Test) GetStatus

func (m *Test) GetStatus() Test_Status

func (*Test) ProtoMessage

func (*Test) ProtoMessage()

func (*Test) Reset

func (m *Test) Reset()

func (*Test) String

func (m *Test) String() string

type TestServiceClient

type TestServiceClient interface {
	// Test 测试方法
	Test(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}

func NewTestServiceClient

func NewTestServiceClient(cc *grpc.ClientConn) TestServiceClient

type TestServiceServer

type TestServiceServer interface {
	// Test 测试方法
	Test(context.Context, *Request) (*Response, error)
}

type Test_Child

type Test_Child struct {
	Sex string `protobuf:"bytes,1,opt,name=sex" json:"sex,omitempty"`
}

Child 子结构

func (*Test_Child) Descriptor

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

func (*Test_Child) GetSex

func (m *Test_Child) GetSex() string

func (*Test_Child) ProtoMessage

func (*Test_Child) ProtoMessage()

func (*Test_Child) Reset

func (m *Test_Child) Reset()

func (*Test_Child) String

func (m *Test_Child) String() string

type Test_Status

type Test_Status int32

Status 枚举状态

const (
	Test_OK   Test_Status = 0
	Test_FAIL Test_Status = 1
)

func (Test_Status) EnumDescriptor

func (Test_Status) EnumDescriptor() ([]byte, []int)

func (Test_Status) String

func (x Test_Status) String() string

Jump to

Keyboard shortcuts

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