123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424 |
- // Code generated by protoc-gen-gogo. DO NOT EDIT.
- // source: app/job/live/gift/api/api.proto
- package api
- /*
- package 命名使用 {discovery_id}.{version} 的方式, version 形如 v1, v2, v1beta ..
- NOTE: 不知道的 discovery_id 请询问大佬, 新项目找大佬申请 discovery_id,先到先得抢注
- e.g. account.service.v1
- */
- import proto "github.com/gogo/protobuf/proto"
- import fmt "fmt"
- import math "math"
- import _ "github.com/gogo/protobuf/gogoproto"
- import empty "github.com/golang/protobuf/ptypes/empty"
- import (
- context "golang.org/x/net/context"
- grpc "google.golang.org/grpc"
- )
- import io "io"
- // Reference imports to suppress errors if they are not otherwise used.
- var _ = proto.Marshal
- var _ = fmt.Errorf
- var _ = math.Inf
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the proto package it is being compiled against.
- // A compilation error at this line likely means your copy of the
- // proto package needs to be updated.
- const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
- type HelloReq struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" form:"name" validate:"required"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
- func (m *HelloReq) Reset() { *m = HelloReq{} }
- func (m *HelloReq) String() string { return proto.CompactTextString(m) }
- func (*HelloReq) ProtoMessage() {}
- func (*HelloReq) Descriptor() ([]byte, []int) {
- return fileDescriptor_api_d309cedea9eacff7, []int{0}
- }
- func (m *HelloReq) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
- }
- func (m *HelloReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_HelloReq.Marshal(b, m, deterministic)
- } else {
- b = b[:cap(b)]
- n, err := m.MarshalTo(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
- }
- }
- func (dst *HelloReq) XXX_Merge(src proto.Message) {
- xxx_messageInfo_HelloReq.Merge(dst, src)
- }
- func (m *HelloReq) XXX_Size() int {
- return m.Size()
- }
- func (m *HelloReq) XXX_DiscardUnknown() {
- xxx_messageInfo_HelloReq.DiscardUnknown(m)
- }
- var xxx_messageInfo_HelloReq proto.InternalMessageInfo
- func init() {
- proto.RegisterType((*HelloReq)(nil), "demo.service.v1.HelloReq")
- }
- // Reference imports to suppress errors if they are not otherwise used.
- var _ context.Context
- var _ grpc.ClientConn
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- const _ = grpc.SupportPackageIsVersion4
- // DemoClient is the client API for Demo service.
- //
- // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
- type DemoClient interface {
- SayHello(ctx context.Context, in *HelloReq, opts ...grpc.CallOption) (*empty.Empty, error)
- }
- type demoClient struct {
- cc *grpc.ClientConn
- }
- func NewDemoClient(cc *grpc.ClientConn) DemoClient {
- return &demoClient{cc}
- }
- func (c *demoClient) SayHello(ctx context.Context, in *HelloReq, opts ...grpc.CallOption) (*empty.Empty, error) {
- out := new(empty.Empty)
- err := c.cc.Invoke(ctx, "/demo.service.v1.Demo/SayHello", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // DemoServer is the server API for Demo service.
- type DemoServer interface {
- SayHello(context.Context, *HelloReq) (*empty.Empty, error)
- }
- func RegisterDemoServer(s *grpc.Server, srv DemoServer) {
- s.RegisterService(&_Demo_serviceDesc, srv)
- }
- func _Demo_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(HelloReq)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(DemoServer).SayHello(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/demo.service.v1.Demo/SayHello",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(DemoServer).SayHello(ctx, req.(*HelloReq))
- }
- return interceptor(ctx, in, info, handler)
- }
- var _Demo_serviceDesc = grpc.ServiceDesc{
- ServiceName: "demo.service.v1.Demo",
- HandlerType: (*DemoServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "SayHello",
- Handler: _Demo_SayHello_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "app/job/live/gift/api/api.proto",
- }
- func (m *HelloReq) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
- func (m *HelloReq) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if len(m.Name) > 0 {
- dAtA[i] = 0xa
- i++
- i = encodeVarintApi(dAtA, i, uint64(len(m.Name)))
- i += copy(dAtA[i:], m.Name)
- }
- if m.XXX_unrecognized != nil {
- i += copy(dAtA[i:], m.XXX_unrecognized)
- }
- return i, nil
- }
- func encodeVarintApi(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
- }
- func (m *HelloReq) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Name)
- if l > 0 {
- n += 1 + l + sovApi(uint64(l))
- }
- if m.XXX_unrecognized != nil {
- n += len(m.XXX_unrecognized)
- }
- return n
- }
- func sovApi(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
- }
- func sozApi(x uint64) (n int) {
- return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63))))
- }
- func (m *HelloReq) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: HelloReq: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: HelloReq: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowApi
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthApi
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipApi(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthApi
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func skipApi(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowApi
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowApi
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowApi
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthApi
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowApi
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipApi(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
- }
- var (
- ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowApi = fmt.Errorf("proto: integer overflow")
- )
- func init() {
- proto.RegisterFile("app/job/live/gift/api/api.proto", fileDescriptor_api_d309cedea9eacff7)
- }
- var fileDescriptor_api_d309cedea9eacff7 = []byte{
- // 250 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0x2c, 0x28, 0xd0,
- 0xcf, 0xca, 0x4f, 0xd2, 0xcf, 0xc9, 0x2c, 0x4b, 0xd5, 0x4f, 0xcf, 0x4c, 0x2b, 0xd1, 0x4f, 0x2c,
- 0xc8, 0x04, 0x61, 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, 0xfe, 0x94, 0xd4, 0xdc, 0x7c, 0xbd,
- 0xe2, 0xd4, 0xa2, 0xb2, 0xcc, 0xe4, 0x54, 0xbd, 0x32, 0x43, 0x29, 0xdd, 0xf4, 0xcc, 0x92, 0x8c,
- 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xf4, 0xfc, 0xf4, 0x7c, 0x7d, 0xb0, 0xba, 0xa4, 0xd2,
- 0x34, 0x30, 0x0f, 0xcc, 0x01, 0xb3, 0x20, 0xfa, 0xa5, 0xa4, 0xd3, 0xf3, 0xf3, 0xd3, 0x73, 0x52,
- 0x11, 0xaa, 0x52, 0x73, 0x0b, 0x4a, 0x2a, 0x21, 0x92, 0x4a, 0xce, 0x5c, 0x1c, 0x1e, 0xa9, 0x39,
- 0x39, 0xf9, 0x41, 0xa9, 0x85, 0x42, 0xe6, 0x5c, 0x2c, 0x79, 0x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