Create & Init Project...

This commit is contained in:
2019-04-22 18:49:16 +08:00
commit fc4fa37393
25440 changed files with 4054998 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
// source: v2/App.proto
/*
Package v2 is a generated liverpc stub package.
This code was generated with go-common/app/tool/liverpc/protoc-gen-liverpc v0.1.
It is generated from these files:
v2/App.proto
*/
package v2
import context "context"
import proto "github.com/golang/protobuf/proto"
import "go-common/library/net/rpc/liverpc"
var _ proto.Message // generate to suppress unused imports
// Imports only used by utility functions:
// =============
// App Interface
// =============
type App interface {
// * 关注接口
// 【粉版APP5.33 关注排序改版】App首页我的关注部分【全量数据】
LiveHomePage(context.Context, *AppLiveHomePageReq) (*AppLiveHomePageResp, error)
}
// ===================
// App Live Rpc Client
// ===================
type appRpcClient struct {
client *liverpc.Client
}
// NewAppRpcClient creates a Rpc client that implements the App interface.
// It communicates using Rpc and can be configured with a custom HTTPClient.
func NewAppRpcClient(client *liverpc.Client) App {
return &appRpcClient{
client: client,
}
}
func (c *appRpcClient) LiveHomePage(ctx context.Context, in *AppLiveHomePageReq) (*AppLiveHomePageResp, error) {
out := new(AppLiveHomePageResp)
err := doRpcRequest(ctx, c.client, 2, "App.LiveHomePage", in, out)
if err != nil {
return nil, err
}
return out, nil
}
// =====
// Utils
// =====
func doRpcRequest(ctx context.Context, client *liverpc.Client, version int, method string, in, out proto.Message) (err error) {
err = client.Call(ctx, version, method, in, out)
return
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,107 @@
syntax = "proto3";
package relation.v2;
option go_package = "v2";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
service App {
/** 关注接口
* 【粉版APP5.33 关注排序改版】App首页我的关注部分【全量数据】
*/
rpc LiveHomePage (AppLiveHomePageReq) returns (AppLiveHomePageResp);
}
message AppLiveHomePageReq {
// 页号
int64 relation_page = 1 [(gogoproto.jsontag) = "relation_page"];
}
message AppLiveHomePageResp {
//
int64 code = 1 [(gogoproto.jsontag) = "code"];
//
string msg = 2 [(gogoproto.jsontag) = "msg"];
//
string message = 3 [(gogoproto.jsontag) = "message"];
//
Data data = 4 [(gogoproto.jsontag) = "data"];
message Rooms {
//
int64 roomid = 1 [(gogoproto.jsontag) = "roomid"];
//
int64 uid = 2 [(gogoproto.jsontag) = "uid"];
//
string uname = 3 [(gogoproto.jsontag) = "uname"];
//
string face = 4 [(gogoproto.jsontag) = "face"];
//
string cover = 5 [(gogoproto.jsontag) = "cover"];
//
string title = 6 [(gogoproto.jsontag) = "title"];
//
int64 area = 7 [(gogoproto.jsontag) = "area"];
//
string live_time = 8 [(gogoproto.jsontag) = "live_time"];
//
string area_name = 9 [(gogoproto.jsontag) = "area_name"];
//
int64 area_v2_id = 10 [(gogoproto.jsontag) = "area_v2_id"];
//
string area_v2_name = 11 [(gogoproto.jsontag) = "area_v2_name"];
//
string area_v2_parent_name = 12 [(gogoproto.jsontag) = "area_v2_parent_name"];
//
int64 area_v2_parent_id = 13 [(gogoproto.jsontag) = "area_v2_parent_id"];
//
string live_tag_name = 14 [(gogoproto.jsontag) = "live_tag_name"];
//
int64 online = 15 [(gogoproto.jsontag) = "online"];
//
string play_url = 16 [(gogoproto.jsontag) = "play_url"];
//
string play_url_h265 = 17 [(gogoproto.jsontag) = "play_url_h265"];
//
repeated int64 accept_quality = 18 [(gogoproto.jsontag) = "accept_quality"];
//
int64 current_quality = 19 [(gogoproto.jsontag) = "current_quality"];
//
int64 pk_id = 20 [(gogoproto.jsontag) = "pk_id"];
//
int64 official_verify = 21 [(gogoproto.jsontag) = "official_verify"];
//
string link = 22 [(gogoproto.jsontag) = "link"];
//
int64 special_attention = 23 [(gogoproto.jsontag) = "special_attention"];
//
string pendent_ru = 24 [(gogoproto.jsontag) = "pendent_ru"];
//
string pendent_ru_pic = 25 [(gogoproto.jsontag) = "pendent_ru_pic"];
//
string pendent_ru_color = 26 [(gogoproto.jsontag) = "pendent_ru_color"];
}
message Data {
//
int64 total_count = 1 [(gogoproto.jsontag) = "total_count"];
//
int64 card_type = 2 [(gogoproto.jsontag) = "card_type"];
//
int64 big_card_type = 3 [(gogoproto.jsontag) = "big_card_type"];
//
string time_desc = 4 [(gogoproto.jsontag) = "time_desc"];
//
string uname_desc = 5 [(gogoproto.jsontag) = "uname_desc"];
//
string tags_desc = 6 [(gogoproto.jsontag) = "tags_desc"];
//
int64 relation_page = 7 [(gogoproto.jsontag) = "relation_page"];
//
repeated Rooms rooms = 8 [(gogoproto.jsontag) = "rooms"];
}
}

View File

@@ -0,0 +1,56 @@
load(
"@io_bazel_rules_go//proto:def.bzl",
"go_proto_library",
)
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
proto_library(
name = "v2_proto",
srcs = ["App.proto"],
tags = ["automanaged"],
deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
)
go_proto_library(
name = "v2_go_proto",
compilers = ["@io_bazel_rules_go//proto:gogofast_grpc"],
importpath = "go-common/app/service/live/relation/api/liverpc/v2",
proto = ":v2_proto",
tags = ["automanaged"],
deps = ["@com_github_gogo_protobuf//gogoproto:go_default_library"],
)
go_library(
name = "go_default_library",
srcs = ["App.liverpc.go"],
embed = [":v2_go_proto"],
importpath = "go-common/app/service/live/relation/api/liverpc/v2",
tags = ["automanaged"],
visibility = ["//visibility:public"],
deps = [
"//library/net/rpc/liverpc:go_default_library",
"@com_github_gogo_protobuf//gogoproto:go_default_library",
"@com_github_gogo_protobuf//proto:go_default_library",
"@com_github_golang_protobuf//proto:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)