v2

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: 10 Imported by: 0

Documentation

Overview

Package v2 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:

service.proto

Index

Constants

This section is empty.

Variables

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

Functions

func RegisterFoo2BMServer

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

RegisterFoo2BMServer Register the blademaster route

func RegisterFooBMServer

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

RegisterFooBMServer Register the blademaster route

func RegisterV2Foo2Service

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

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

func RegisterV2FooService

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

RegisterV2FooService 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
	Uid                  int32    `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty" form:"uid" validate:"required"`
	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 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)

	// `method:"POST"`
	JsonReq(ctx context.Context, req *JsonReq) (resp *JsonResp, err error)
}

Foo 相关服务

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

type JsonReq

type JsonReq struct {
	// json请求参数
	P1                   string          `protobuf:"bytes,1,opt,name=p1,proto3" json:"p1,omitempty"`
	P2                   *JsonSubMessage `protobuf:"bytes,2,opt,name=p2" json:"p2,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*JsonReq) Descriptor

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

func (*JsonReq) GetP1

func (m *JsonReq) GetP1() string

func (*JsonReq) GetP2

func (m *JsonReq) GetP2() *JsonSubMessage

func (*JsonReq) Marshal

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

func (*JsonReq) MarshalTo

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

func (*JsonReq) ProtoMessage

func (*JsonReq) ProtoMessage()

func (*JsonReq) Reset

func (m *JsonReq) Reset()

func (*JsonReq) Size

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

func (*JsonReq) String

func (m *JsonReq) String() string

func (*JsonReq) Unmarshal

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

func (*JsonReq) XXX_DiscardUnknown

func (m *JsonReq) XXX_DiscardUnknown()

func (*JsonReq) XXX_Marshal

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

func (*JsonReq) XXX_Merge

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

func (*JsonReq) XXX_Size

func (m *JsonReq) XXX_Size() int

func (*JsonReq) XXX_Unmarshal

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

type JsonResp

type JsonResp struct {
	// json请求响应
	P1                   string   `protobuf:"bytes,1,opt,name=p1,proto3" json:"p1,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*JsonResp) Descriptor

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

func (*JsonResp) GetP1

func (m *JsonResp) GetP1() string

func (*JsonResp) Marshal

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

func (*JsonResp) MarshalTo

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

func (*JsonResp) ProtoMessage

func (*JsonResp) ProtoMessage()

func (*JsonResp) Reset

func (m *JsonResp) Reset()

func (*JsonResp) Size

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

func (*JsonResp) String

func (m *JsonResp) String() string

func (*JsonResp) Unmarshal

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

func (*JsonResp) XXX_DiscardUnknown

func (m *JsonResp) XXX_DiscardUnknown()

func (*JsonResp) XXX_Marshal

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

func (*JsonResp) XXX_Merge

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

func (*JsonResp) XXX_Size

func (m *JsonResp) XXX_Size() int

func (*JsonResp) XXX_Unmarshal

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

type JsonSubMessage

type JsonSubMessage struct {
	// param
	Param                string   `protobuf:"bytes,1,opt,name=param,proto3" json:"param,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*JsonSubMessage) Descriptor

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

func (*JsonSubMessage) GetParam

func (m *JsonSubMessage) GetParam() string

func (*JsonSubMessage) Marshal

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

func (*JsonSubMessage) MarshalTo

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

func (*JsonSubMessage) ProtoMessage

func (*JsonSubMessage) ProtoMessage()

func (*JsonSubMessage) Reset

func (m *JsonSubMessage) Reset()

func (*JsonSubMessage) Size

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

func (*JsonSubMessage) String

func (m *JsonSubMessage) String() string

func (*JsonSubMessage) Unmarshal

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

func (*JsonSubMessage) XXX_DiscardUnknown

func (m *JsonSubMessage) XXX_DiscardUnknown()

func (*JsonSubMessage) XXX_Marshal

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

func (*JsonSubMessage) XXX_Merge

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

func (*JsonSubMessage) XXX_Size

func (m *JsonSubMessage) XXX_Size() int

func (*JsonSubMessage) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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