v1

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package v1 is a generated blademaster stub package. This code was generated with go-common/app/tool/bmgen/protoc-gen-bm v0.1.

It is generated from these files:

demo.proto

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthDemo = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDemo   = fmt.Errorf("proto: integer overflow")
)
View Source
var PathFoo2Hello = "/live.livedemo.v1.Foo2/hello"
View Source
var PathFooGetDynamic = "/live.livedemo.v1.Foo/get_dynamic"
View Source
var PathFooGetInfo = "/live.livedemo.v1.Foo/get_info"
View Source
var PathFooNointerface = "/live.livedemo.v1.Foo/nointerface"
View Source
var PathFooUnameByUid = "/xlive/demo/v1/foo/uname_by_uid_custom_route"
View Source
var PathFooUnameByUid3 = "/live.livedemo.v1.Foo/uname_by_uid3"
View Source
var PathFooUnameByUid4 = "/live.livedemo.v1.Foo/uname_by_uid4"

Functions

func RegisterFoo2BMServer

func RegisterFoo2BMServer(e *bm.Engine, server Foo2BMServer)

RegisterFoo2BMServer Register the blademaster route

func RegisterFoo2Server

func RegisterFoo2Server(s *grpc.Server, srv Foo2Server)

func RegisterFooBMServer

func RegisterFooBMServer(e *bm.Engine, server FooBMServer)

RegisterFooBMServer Register the blademaster route

func RegisterFooServer

func RegisterFooServer(s *grpc.Server, srv FooServer)

func RegisterV1Foo2Service

func RegisterV1Foo2Service(e *bm.Engine, svc Foo2BMServer, midMap map[string]bm.HandlerFunc)

RegisterV1Foo2Service Register the blademaster route with middleware map midMap is the middleware map, the key is defined in proto

func RegisterV1FooService

func RegisterV1FooService(e *bm.Engine, svc FooBMServer, midMap map[string]bm.HandlerFunc)

RegisterV1FooService Register the blademaster route with middleware map midMap is the middleware map, the key is defined in proto

Types

type Bar1Req

type Bar1Req struct {
	// 用户uid
	//
	// aaa
	Uid                  int32    `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty" form:"uid"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Bar请求

func (*Bar1Req) Descriptor

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

func (*Bar1Req) GetUid

func (m *Bar1Req) GetUid() int32

func (*Bar1Req) Marshal

func (m *Bar1Req) Marshal() (dAtA []byte, err error)

func (*Bar1Req) MarshalTo

func (m *Bar1Req) MarshalTo(dAtA []byte) (int, error)

func (*Bar1Req) ProtoMessage

func (*Bar1Req) ProtoMessage()

func (*Bar1Req) Reset

func (m *Bar1Req) Reset()

func (*Bar1Req) Size

func (m *Bar1Req) Size() (n int)

func (*Bar1Req) String

func (m *Bar1Req) String() string

func (*Bar1Req) Unmarshal

func (m *Bar1Req) Unmarshal(dAtA []byte) error

func (*Bar1Req) XXX_DiscardUnknown

func (m *Bar1Req) XXX_DiscardUnknown()

func (*Bar1Req) XXX_Marshal

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

func (*Bar1Req) XXX_Merge

func (dst *Bar1Req) XXX_Merge(src proto.Message)

func (*Bar1Req) XXX_Size

func (m *Bar1Req) XXX_Size() int

func (*Bar1Req) XXX_Unmarshal

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

type Bar1Resp

type Bar1Resp struct {
	// 用户名
	// `mock:"hello"`
	Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname"`
	// idshaha
	// `mock:"343242"`
	Ids                  []int32                   `protobuf:"varint,3,rep,packed,name=ids" json:"ids"`
	List                 []*Bar1Resp_List          `protobuf:"bytes,4,rep,name=list" json:"list"`
	Alist                *Bar1Resp_List            `protobuf:"bytes,5,opt,name=alist" json:"alist"`
	Amap                 map[string]*Bar1Resp_List `protobuf:"bytes,6,rep,name=amap" json:"amap" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

Bar 相应

func (*Bar1Resp) Descriptor

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

func (*Bar1Resp) GetAlist

func (m *Bar1Resp) GetAlist() *Bar1Resp_List

func (*Bar1Resp) GetAmap

func (m *Bar1Resp) GetAmap() map[string]*Bar1Resp_List

func (*Bar1Resp) GetIds

func (m *Bar1Resp) GetIds() []int32

func (*Bar1Resp) GetList

func (m *Bar1Resp) GetList() []*Bar1Resp_List

func (*Bar1Resp) GetUname

func (m *Bar1Resp) GetUname() string

func (*Bar1Resp) Marshal

func (m *Bar1Resp) Marshal() (dAtA []byte, err error)

func (*Bar1Resp) MarshalTo

func (m *Bar1Resp) MarshalTo(dAtA []byte) (int, error)

func (*Bar1Resp) ProtoMessage

func (*Bar1Resp) ProtoMessage()

func (*Bar1Resp) Reset

func (m *Bar1Resp) Reset()

func (*Bar1Resp) Size

func (m *Bar1Resp) Size() (n int)

func (*Bar1Resp) String

func (m *Bar1Resp) String() string

func (*Bar1Resp) Unmarshal

func (m *Bar1Resp) Unmarshal(dAtA []byte) error

func (*Bar1Resp) XXX_DiscardUnknown

func (m *Bar1Resp) XXX_DiscardUnknown()

func (*Bar1Resp) XXX_Marshal

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

func (*Bar1Resp) XXX_Merge

func (dst *Bar1Resp) XXX_Merge(src proto.Message)

func (*Bar1Resp) XXX_Size

func (m *Bar1Resp) XXX_Size() int

func (*Bar1Resp) XXX_Unmarshal

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

type Bar1Resp_List

type Bar1Resp_List struct {
	// `mock:"\"withquote"`
	Hello                string   `protobuf:"bytes,1,opt,name=hello,proto3" json:"hello"`
	World                string   `protobuf:"bytes,2,opt,name=world,proto3" json:"world"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Bar1Resp_List) Descriptor

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

func (*Bar1Resp_List) GetHello

func (m *Bar1Resp_List) GetHello() string

func (*Bar1Resp_List) GetWorld

func (m *Bar1Resp_List) GetWorld() string

func (*Bar1Resp_List) Marshal

func (m *Bar1Resp_List) Marshal() (dAtA []byte, err error)

func (*Bar1Resp_List) MarshalTo

func (m *Bar1Resp_List) MarshalTo(dAtA []byte) (int, error)

func (*Bar1Resp_List) ProtoMessage

func (*Bar1Resp_List) ProtoMessage()

func (*Bar1Resp_List) Reset

func (m *Bar1Resp_List) Reset()

func (*Bar1Resp_List) Size

func (m *Bar1Resp_List) Size() (n int)

func (*Bar1Resp_List) String

func (m *Bar1Resp_List) String() string

func (*Bar1Resp_List) Unmarshal

func (m *Bar1Resp_List) Unmarshal(dAtA []byte) error

func (*Bar1Resp_List) XXX_DiscardUnknown

func (m *Bar1Resp_List) XXX_DiscardUnknown()

func (*Bar1Resp_List) XXX_Marshal

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

func (*Bar1Resp_List) XXX_Merge

func (dst *Bar1Resp_List) XXX_Merge(src proto.Message)

func (*Bar1Resp_List) XXX_Size

func (m *Bar1Resp_List) XXX_Size() int

func (*Bar1Resp_List) XXX_Unmarshal

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

type Foo2BMServer

type Foo2BMServer interface {
	Hello(ctx context.Context, req *Bar1Req) (resp *Bar1Resp, err error)
}

type Foo2Client

type Foo2Client interface {
	Hello(ctx context.Context, in *Bar1Req, opts ...grpc.CallOption) (*Bar1Resp, error)
}

Foo2Client is the client API for Foo2 service.

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

func NewFoo2Client

func NewFoo2Client(cc *grpc.ClientConn) Foo2Client

type Foo2Server

type Foo2Server interface {
	Hello(context.Context, *Bar1Req) (*Bar1Resp, error)
}

Foo2Server is the server API for Foo2 service.

type FooBMServer

type FooBMServer interface {
	// 根据uid得到uname
	// `method:"post" midware:"auth,verify"`
	//
	// 这是详细说明
	UnameByUid(ctx context.Context, req *Bar1Req) (resp *Bar1Resp, err error)

	// 获取房间信息
	// `midware:"guest"`
	GetInfo(ctx context.Context, req *GetInfoReq) (resp *GetInfoResp, err error)

	// 根据uid得到uname v3
	UnameByUid3(ctx context.Context, req *Bar1Req) (resp *Bar1Resp, err error)

	// test comment
	// `internal:"true"`
	UnameByUid4(ctx context.Context, req *Bar1Req) (resp *Bar1Resp, err error)

	// `dynamic_resp:"true"`
	GetDynamic(ctx context.Context, req *Bar1Req) (resp interface{}, err error)
}

Foo 相关服务

type FooClient

type FooClient interface {
	// 根据uid得到uname
	// `method:"post" midware:"auth,verify"`
	//
	// 这是详细说明
	UnameByUid(ctx context.Context, in *Bar1Req, opts ...grpc.CallOption) (*Bar1Resp, error)
	// 获取房间信息
	// `midware:"guest"`
	GetInfo(ctx context.Context, in *GetInfoReq, opts ...grpc.CallOption) (*GetInfoResp, error)
	// 根据uid得到uname v3
	UnameByUid3(ctx context.Context, in *Bar1Req, opts ...grpc.CallOption) (*Bar1Resp, error)
	// test comment
	// `internal:"true"`
	UnameByUid4(ctx context.Context, in *Bar1Req, opts ...grpc.CallOption) (*Bar1Resp, error)
	// `dynamic_resp:"true"`
	GetDynamic(ctx context.Context, in *Bar1Req, opts ...grpc.CallOption) (*Bar1Resp, error)
	// `dynamic:"true"`
	Nointerface(ctx context.Context, in *Bar1Req, opts ...grpc.CallOption) (*Bar1Resp, error)
}

FooClient is the client API for Foo service.

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

func NewFooClient

func NewFooClient(cc *grpc.ClientConn) FooClient

type FooServer

type FooServer interface {
	// 根据uid得到uname
	// `method:"post" midware:"auth,verify"`
	//
	// 这是详细说明
	UnameByUid(context.Context, *Bar1Req) (*Bar1Resp, error)
	// 获取房间信息
	// `midware:"guest"`
	GetInfo(context.Context, *GetInfoReq) (*GetInfoResp, error)
	// 根据uid得到uname v3
	UnameByUid3(context.Context, *Bar1Req) (*Bar1Resp, error)
	// test comment
	// `internal:"true"`
	UnameByUid4(context.Context, *Bar1Req) (*Bar1Resp, error)
	// `dynamic_resp:"true"`
	GetDynamic(context.Context, *Bar1Req) (*Bar1Resp, error)
	// `dynamic:"true"`
	Nointerface(context.Context, *Bar1Req) (*Bar1Resp, error)
}

FooServer is the server API for Foo service.

type GetInfoReq

type GetInfoReq struct {
	// 房间id
	// `mock:"123"
	RoomId               int64    `protobuf:"varint,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty" form:"room_id" validate:"required"`
	ManyIds              []int64  `protobuf:"varint,2,rep,packed,name=many_ids,json=manyIds" json:"many_ids,omitempty" form:"many_ids"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

获取房间信息请求

func (*GetInfoReq) Descriptor

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

func (*GetInfoReq) GetManyIds

func (m *GetInfoReq) GetManyIds() []int64

func (*GetInfoReq) GetRoomId

func (m *GetInfoReq) GetRoomId() int64

func (*GetInfoReq) Marshal

func (m *GetInfoReq) Marshal() (dAtA []byte, err error)

func (*GetInfoReq) MarshalTo

func (m *GetInfoReq) MarshalTo(dAtA []byte) (int, error)

func (*GetInfoReq) ProtoMessage

func (*GetInfoReq) ProtoMessage()

func (*GetInfoReq) Reset

func (m *GetInfoReq) Reset()

func (*GetInfoReq) Size

func (m *GetInfoReq) Size() (n int)

func (*GetInfoReq) String

func (m *GetInfoReq) String() string

func (*GetInfoReq) Unmarshal

func (m *GetInfoReq) Unmarshal(dAtA []byte) error

func (*GetInfoReq) XXX_DiscardUnknown

func (m *GetInfoReq) XXX_DiscardUnknown()

func (*GetInfoReq) XXX_Marshal

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

func (*GetInfoReq) XXX_Merge

func (dst *GetInfoReq) XXX_Merge(src proto.Message)

func (*GetInfoReq) XXX_Size

func (m *GetInfoReq) XXX_Size() int

func (*GetInfoReq) XXX_Unmarshal

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

type GetInfoResp

type GetInfoResp struct {
	// 房间id 注释貌似只有放在前面才能被识别,放到字段声明后面是没用的
	Roomid int64 `protobuf:"varint,1,opt,name=roomid,proto3" json:"roomid"`
	// 用户名
	Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname"`
	// 开播时间
	LiveTime string           `protobuf:"bytes,3,opt,name=live_time,json=liveTime,proto3" json:"live_time"`
	Amap     map[int32]string `` /* 133-byte string literal not displayed */
	// `mock:"6.02214129e23"`
	Rate float32 `protobuf:"fixed32,5,opt,name=rate,proto3" json:"rate"`
	// 用户mid
	Mid                  int64    `protobuf:"varint,6,opt,name=mid,proto3" json:"mid"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

获取房间信息响应

func (*GetInfoResp) Descriptor

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

func (*GetInfoResp) GetAmap

func (m *GetInfoResp) GetAmap() map[int32]string

func (*GetInfoResp) GetLiveTime

func (m *GetInfoResp) GetLiveTime() string

func (*GetInfoResp) GetMid

func (m *GetInfoResp) GetMid() int64

func (*GetInfoResp) GetRate

func (m *GetInfoResp) GetRate() float32

func (*GetInfoResp) GetRoomid

func (m *GetInfoResp) GetRoomid() int64

func (*GetInfoResp) GetUname

func (m *GetInfoResp) GetUname() string

func (*GetInfoResp) Marshal

func (m *GetInfoResp) Marshal() (dAtA []byte, err error)

func (*GetInfoResp) MarshalTo

func (m *GetInfoResp) MarshalTo(dAtA []byte) (int, error)

func (*GetInfoResp) ProtoMessage

func (*GetInfoResp) ProtoMessage()

func (*GetInfoResp) Reset

func (m *GetInfoResp) Reset()

func (*GetInfoResp) Size

func (m *GetInfoResp) Size() (n int)

func (*GetInfoResp) String

func (m *GetInfoResp) String() string

func (*GetInfoResp) Unmarshal

func (m *GetInfoResp) Unmarshal(dAtA []byte) error

func (*GetInfoResp) XXX_DiscardUnknown

func (m *GetInfoResp) XXX_DiscardUnknown()

func (*GetInfoResp) XXX_Marshal

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

func (*GetInfoResp) XXX_Merge

func (dst *GetInfoResp) XXX_Merge(src proto.Message)

func (*GetInfoResp) XXX_Size

func (m *GetInfoResp) XXX_Size() int

func (*GetInfoResp) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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