Commit aeb88cc0 authored by kzkzzzz's avatar kzkzzzz

feat: init

parent fcbe6006
Pipeline #1366 failed with stages
project=demo project=demo
type=service
.PHONY: init .PHONY: init
# init env # init env
...@@ -13,22 +14,25 @@ init: ...@@ -13,22 +14,25 @@ init:
go install github.com/cosmtrek/air@latest go install github.com/cosmtrek/air@latest
.PHONY: api .PHONY: api
# generate api service proto
api: api:
@bash script/gen-api.sh service $(project) @bash script/gen-api.sh $(type) $(project)
.PHONY: service .PHONY: gen
service: gen:
@bash script/gen-project.sh service $(project) @bash script/gen-project.sh $(type) $(project)
.PHONY: run .PHONY: run
run: run:
@cd app/service/$(project) && air -c air.toml @cd app/$(type)/$(project) && air -c air.toml
.PHONY: build .PHONY: build
# build
build: build:
@cd app/service/$(project) && mkdir -p bin && go build -o bin/ ./... @cd app/$(type)/$(project) && mkdir -p bin && go build -v -o bin/hilo-$(type)-$(project) ./cmd/$(project)
.PHONY: build-all
build-all:
@bash script/build-all.sh service
.PHONY: wire
wire: wire:
@cd app/service/$(project)/cmd/$(project) && wire @cd app/$(type)/$(project)/cmd/$(project) && wire
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
syntax = "proto3";
package common;
option go_package = "hilo/api/common/user;common";
enum EThirdPartyType {
UnknownThirdPartyType = 0;
Phone = 1;
Google = 2;
Facebook = 3;
Apple = 4;
WeChat = 5;
}
enum ESex {
UnknownSex = 0;
Male = 1;
Female = 2;
}
message CvUserDetail {
optional int32 ILikeCount = 1; //统计:我喜欢多少人
optional int32 LikeCount = 2; //统计:多少人喜欢你, (本才才有数据,不是本人,数据为nil)
optional int32 VisitCount = 3; //统计:多少人访问你
optional int32 IsPush = 4; //消息提醒, 1:开启,2:关闭
optional int32 DiamondNum = 5; //钻石数量(本人才有数据,不是本人,数据为nil)
optional bool IsLike = 6; //是否喜欢(本人没有数据,//20210205 已废弃nil,产品说:可以自己喜欢自己)
optional bool IsSession = 7; //是否存在会话(本人没有数据)
optional bool IsLikeMe = 8;
int32 HeartValue = 9; // 与我之间永恒之心的值
int32 HeartValueMax = 10; // 与我之间永恒之心的最大值(0代表没有永恒之心,即没有相互关注)
int32 MeetDays = 11; // 成长关系建立的时间(天数)
int32 WealthUserGrade = 12; //财富等级
int32 CharmUserGrade = 13; //魅力等级
int32 ActivityUserGrade = 14; //活跃等级
string CurrentRoom = 15; // 当前用户所在房间(产品叫“群组”)
int64 MyGroupPower = 16; // 当前用户所在势力
string MyGroupPowerName = 17; // 当前用户所在势力绑定群组的名称
}
message UserBase {
int32 Id = 1; //不会有返回值
optional string Avatar = 2; //头像,不存在为nil
optional bool DefaultAvatar = 3; //是否默认头像 true:是 false:不是
optional string ExternalId = 4; //用户对外ID
optional string Nick = 5; //昵称,不存在为nil
optional string Description = 6; //签名,不存在为nil
optional int32 ESex = 7; //性别 1:男 2:女,不存在为nil
optional string Country = 8; //国家,不存在为nil
optional string CountryIcon = 9; //国旗图标,不存在为nil
optional string Code = 10; //邀请码
bool IsPrettyCode = 11; // 是否靓号
bool IsLogout = 12; //是否注销
optional int64 Birthday = 13; //生日,如果是其它人用户信息,年龄则按照是否展示显示,如果是本人,年龄则按照是否存在展示
optional bool IsShowAge = 14; // 是否展示年龄, 是本人才有数据,看其他用户均为nil
optional bool IsTradeUnion = 15; // 是否工会成员, 只有是自己查自己,这个才有值,其它全为nil, 20220329 数据开放:原因:产品1对1视频聊天中,公会用户视频需要送礼物。改为: 全部人可以知道是否是公会用户。
optional bool IsAgentMgr = 16; // 是否代理管理员, 只有自己查自己的时候才有值,其他情况为nil
optional bool IsTradeUnionMatchNotification = 17; // 工会成员,是否开启了,匹配通知,只有 isTradeUnion值为true,这里才有值,
bool IsVip = 18; // 是否VIP用户
bool IsOfficialStaff = 19; // 是否是官方人员
optional int64 VipExpireTime = 20; // VIP用户过期时间(只有自己查询自己,才返回)
repeated int32 Medals = 21; // 勋章列表 TODO: 删除
repeated CvMedal MedalInfo = 22; // 勋章列表
optional CvHeadwear Headwear = 23; // 当前使用的头饰
CvProperty Ride = 24; // 当前使用的座驾
CvNoble Noble = 25;
}
message CvMedal {
int32 Id = 1;
string PicUrl = 2;
string EffectUrl = 3;
}
message CvHeadwear {
int32 Id = 1;
bool Using = 2;
string PicUrl = 3;
string EffectUrl = 4;
int64 TimeLeft = 5;
}
message CvProperty {
int32 Id = 1;
string PicUrl = 2;
string EffectUrl = 3;
bool Using = 4;
string TimeLeft = 5;
string SenderAvatar = 6;
string ReceiverAvatar = 7;
}
message CvNoble {
int32 Level = 1;
int64 EndTime = 2;
}
\ No newline at end of file
This diff is collapsed.
syntax = "proto3";
package country;
import "google/protobuf/timestamp.proto";
option go_package = "hilo/api/country;country";
// 定义服务
service Country {
rpc GetCountryByShortName (GetCountryByShortNameReq) returns (GetCountryByShortNameRep) {
}
}
message CountryModel {
int64 Id = 1;
string Name = 2;
string ShortName = 3;
string Code = 4;
string Icon = 5;
string Icon2 = 6;
string Lang = 7;
int32 IsCommon = 8;
int32 IsDefault = 9 ;
int32 Status = 10;
google.protobuf.Timestamp CreatedTime = 11;
google.protobuf.Timestamp UpdatedTime = 12;
string StandardShortName = 13;
}
message GetCountryByShortNameReq {
string ShortName = 1; // @gotags: validate:"required"
}
message GetCountryByShortNameRep {
CountryModel data = 1;
}
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.19.4
// source: country.proto
package country
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// CountryClient is the client API for Country service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type CountryClient interface {
GetCountryByShortName(ctx context.Context, in *GetCountryByShortNameReq, opts ...grpc.CallOption) (*GetCountryByShortNameRep, error)
}
type countryClient struct {
cc grpc.ClientConnInterface
}
func NewCountryClient(cc grpc.ClientConnInterface) CountryClient {
return &countryClient{cc}
}
func (c *countryClient) GetCountryByShortName(ctx context.Context, in *GetCountryByShortNameReq, opts ...grpc.CallOption) (*GetCountryByShortNameRep, error) {
out := new(GetCountryByShortNameRep)
err := c.cc.Invoke(ctx, "/country.Country/GetCountryByShortName", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// CountryServer is the server API for Country service.
// All implementations must embed UnimplementedCountryServer
// for forward compatibility
type CountryServer interface {
GetCountryByShortName(context.Context, *GetCountryByShortNameReq) (*GetCountryByShortNameRep, error)
mustEmbedUnimplementedCountryServer()
}
// UnimplementedCountryServer must be embedded to have forward compatible implementations.
type UnimplementedCountryServer struct {
}
func (UnimplementedCountryServer) GetCountryByShortName(context.Context, *GetCountryByShortNameReq) (*GetCountryByShortNameRep, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCountryByShortName not implemented")
}
func (UnimplementedCountryServer) mustEmbedUnimplementedCountryServer() {}
// UnsafeCountryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CountryServer will
// result in compilation errors.
type UnsafeCountryServer interface {
mustEmbedUnimplementedCountryServer()
}
func RegisterCountryServer(s grpc.ServiceRegistrar, srv CountryServer) {
s.RegisterService(&Country_ServiceDesc, srv)
}
func _Country_GetCountryByShortName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetCountryByShortNameReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CountryServer).GetCountryByShortName(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/country.Country/GetCountryByShortName",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CountryServer).GetCountryByShortName(ctx, req.(*GetCountryByShortNameReq))
}
return interceptor(ctx, in, info, handler)
}
// Country_ServiceDesc is the grpc.ServiceDesc for Country service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Country_ServiceDesc = grpc.ServiceDesc{
ServiceName: "country.Country",
HandlerType: (*CountryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetCountryByShortName",
Handler: _Country_GetCountryByShortName_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "country.proto",
}
This diff is collapsed.
syntax = "proto3";
package demo;
import "google/api/annotations.proto";
option go_package = "hilo/api/demo;demo";
// 定义服务
service Demo {
rpc Hello (HelloReq) returns (HelloRep) {
option (google.api.http) = {
get: "/demo/hello/{name}"
};
}
rpc Create (CreateReq) returns (OKRep) {
option (google.api.http) = {
post: "/demo/create",
body: "*"
};
}
rpc Update (UpdateReq) returns (OKRep) {
option (google.api.http) = {
post: "/demo/update",
body: "*"
};
}
rpc Get (IdReq) returns (DemoModel) {
option (google.api.http) = {
get: "/demo/get",
};
}
rpc List (ListReq) returns (ListRep) {
option (google.api.http) = {
get: "/demo/list",
};
}
rpc Delete (IdReq) returns (OKRep) {
option (google.api.http) = {
get: "/demo/delete",
};
}
}
message DemoModel {
int64 id = 1;
string name = 2;
string value = 3;
int64 created_at = 4;
int64 updated_at = 5;
}
message IdReq {
int64 id = 1; // @gotags: validate:"required,min=1"
}
message ListReq {
int64 page = 1; // @gotags: validate:"min=0"
int64 size = 2; // @gotags: validate:"min=0"
}
message ListRep {
repeated DemoModel list = 1;
}
message CreateReq {
string name = 1; // @gotags: validate:"required"
string value = 2; // @gotags: validate:"required"
}
message UpdateReq {
int64 id = 1; // @gotags: validate:"required"
string name = 2; // @gotags: validate:"required"
string value = 3; // @gotags: validate:"required"
}
message OKRep {}
message HelloReq {
string name = 1;
}
message HelloRep {
string message = 1;
}
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.19.4
// source: demo.proto
package demo
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// DemoClient is the client API for Demo service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type DemoClient interface {
Hello(ctx context.Context, in *HelloReq, opts ...grpc.CallOption) (*HelloRep, error)
Create(ctx context.Context, in *CreateReq, opts ...grpc.CallOption) (*OKRep, error)
Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*OKRep, error)
Get(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*DemoModel, error)
List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListRep, error)
Delete(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*OKRep, error)
}
type demoClient struct {
cc grpc.ClientConnInterface
}
func NewDemoClient(cc grpc.ClientConnInterface) DemoClient {
return &demoClient{cc}
}
func (c *demoClient) Hello(ctx context.Context, in *HelloReq, opts ...grpc.CallOption) (*HelloRep, error) {
out := new(HelloRep)
err := c.cc.Invoke(ctx, "/demo.Demo/Hello", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *demoClient) Create(ctx context.Context, in *CreateReq, opts ...grpc.CallOption) (*OKRep, error) {
out := new(OKRep)
err := c.cc.Invoke(ctx, "/demo.Demo/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *demoClient) Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*OKRep, error) {
out := new(OKRep)
err := c.cc.Invoke(ctx, "/demo.Demo/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *demoClient) Get(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*DemoModel, error) {
out := new(DemoModel)
err := c.cc.Invoke(ctx, "/demo.Demo/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *demoClient) List(ctx context.Context, in *ListReq, opts ...grpc.CallOption) (*ListRep, error) {
out := new(ListRep)
err := c.cc.Invoke(ctx, "/demo.Demo/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *demoClient) Delete(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*OKRep, error) {
out := new(OKRep)
err := c.cc.Invoke(ctx, "/demo.Demo/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// DemoServer is the server API for Demo service.
// All implementations must embed UnimplementedDemoServer
// for forward compatibility
type DemoServer interface {
Hello(context.Context, *HelloReq) (*HelloRep, error)
Create(context.Context, *CreateReq) (*OKRep, error)
Update(context.Context, *UpdateReq) (*OKRep, error)
Get(context.Context, *IdReq) (*DemoModel, error)
List(context.Context, *ListReq) (*ListRep, error)
Delete(context.Context, *IdReq) (*OKRep, error)
mustEmbedUnimplementedDemoServer()
}
// UnimplementedDemoServer must be embedded to have forward compatible implementations.
type UnimplementedDemoServer struct {
}
func (UnimplementedDemoServer) Hello(context.Context, *HelloReq) (*HelloRep, error) {
return nil, status.Errorf(codes.Unimplemented, "method Hello not implemented")
}
func (UnimplementedDemoServer) Create(context.Context, *CreateReq) (*OKRep, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedDemoServer) Update(context.Context, *UpdateReq) (*OKRep, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedDemoServer) Get(context.Context, *IdReq) (*DemoModel, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedDemoServer) List(context.Context, *ListReq) (*ListRep, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedDemoServer) Delete(context.Context, *IdReq) (*OKRep, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedDemoServer) mustEmbedUnimplementedDemoServer() {}
// UnsafeDemoServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DemoServer will
// result in compilation errors.
type UnsafeDemoServer interface {
mustEmbedUnimplementedDemoServer()
}
func RegisterDemoServer(s grpc.ServiceRegistrar, srv DemoServer) {
s.RegisterService(&Demo_ServiceDesc, srv)
}
func _Demo_Hello_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).Hello(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/demo.Demo/Hello",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DemoServer).Hello(ctx, req.(*HelloReq))
}
return interceptor(ctx, in, info, handler)
}
func _Demo_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DemoServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/demo.Demo/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DemoServer).Create(ctx, req.(*CreateReq))
}
return interceptor(ctx, in, info, handler)
}
func _Demo_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DemoServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/demo.Demo/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DemoServer).Update(ctx, req.(*UpdateReq))
}
return interceptor(ctx, in, info, handler)
}
func _Demo_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IdReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DemoServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/demo.Demo/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DemoServer).Get(ctx, req.(*IdReq))
}
return interceptor(ctx, in, info, handler)
}
func _Demo_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DemoServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/demo.Demo/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DemoServer).List(ctx, req.(*ListReq))
}
return interceptor(ctx, in, info, handler)
}
func _Demo_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IdReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DemoServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/demo.Demo/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DemoServer).Delete(ctx, req.(*IdReq))
}
return interceptor(ctx, in, info, handler)
}
// Demo_ServiceDesc is the grpc.ServiceDesc for Demo service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Demo_ServiceDesc = grpc.ServiceDesc{
ServiceName: "demo.Demo",
HandlerType: (*DemoServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Hello",
Handler: _Demo_Hello_Handler,
},
{
MethodName: "Create",
Handler: _Demo_Create_Handler,
},
{
MethodName: "Update",
Handler: _Demo_Update_Handler,
},
{
MethodName: "Get",
Handler: _Demo_Get_Handler,
},
{
MethodName: "List",
Handler: _Demo_List_Handler,
},
{
MethodName: "Delete",
Handler: _Demo_Delete_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "demo.proto",
}
// Code generated by protoc-gen-go-http. DO NOT EDIT.
// versions:
// - protoc-gen-go-http v2.3.1
// - protoc v3.19.4
// source: demo.proto
package demo
import (
context "context"
http "github.com/go-kratos/kratos/v2/transport/http"
binding "github.com/go-kratos/kratos/v2/transport/http/binding"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the kratos package it is being compiled against.
var _ = new(context.Context)
var _ = binding.EncodeURL
const _ = http.SupportPackageIsVersion1
const OperationDemoCreate = "/demo.Demo/Create"
const OperationDemoDelete = "/demo.Demo/Delete"
const OperationDemoGet = "/demo.Demo/Get"
const OperationDemoHello = "/demo.Demo/Hello"
const OperationDemoList = "/demo.Demo/List"
const OperationDemoUpdate = "/demo.Demo/Update"
type DemoHTTPServer interface {
Create(context.Context, *CreateReq) (*OKRep, error)
Delete(context.Context, *IdReq) (*OKRep, error)
Get(context.Context, *IdReq) (*DemoModel, error)
Hello(context.Context, *HelloReq) (*HelloRep, error)
List(context.Context, *ListReq) (*ListRep, error)
Update(context.Context, *UpdateReq) (*OKRep, error)
}
func RegisterDemoHTTPServer(s *http.Server, srv DemoHTTPServer) {
r := s.Route("/")
r.GET("/demo/hello/{name}", _Demo_Hello0_HTTP_Handler(srv))
r.POST("/demo/create", _Demo_Create0_HTTP_Handler(srv))
r.POST("/demo/update", _Demo_Update0_HTTP_Handler(srv))
r.GET("/demo/get", _Demo_Get0_HTTP_Handler(srv))
r.GET("/demo/list", _Demo_List0_HTTP_Handler(srv))
r.GET("/demo/delete", _Demo_Delete0_HTTP_Handler(srv))
}
func _Demo_Hello0_HTTP_Handler(srv DemoHTTPServer) func(ctx http.Context) error {
return func(ctx http.Context) error {
var in HelloReq
if err := ctx.BindQuery(&in); err != nil {
return err
}
if err := ctx.BindVars(&in); err != nil {
return err
}
http.SetOperation(ctx, OperationDemoHello)
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.Hello(ctx, req.(*HelloReq))
})
out, err := h(ctx, &in)
if err != nil {
return err
}
reply := out.(*HelloRep)
return ctx.Result(200, reply)
}
}
func _Demo_Create0_HTTP_Handler(srv DemoHTTPServer) func(ctx http.Context) error {
return func(ctx http.Context) error {
var in CreateReq
if err := ctx.Bind(&in); err != nil {
return err
}
http.SetOperation(ctx, OperationDemoCreate)
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.Create(ctx, req.(*CreateReq))
})
out, err := h(ctx, &in)
if err != nil {
return err
}
reply := out.(*OKRep)
return ctx.Result(200, reply)
}
}
func _Demo_Update0_HTTP_Handler(srv DemoHTTPServer) func(ctx http.Context) error {
return func(ctx http.Context) error {
var in UpdateReq
if err := ctx.Bind(&in); err != nil {
return err
}
http.SetOperation(ctx, OperationDemoUpdate)
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.Update(ctx, req.(*UpdateReq))
})
out, err := h(ctx, &in)
if err != nil {
return err
}
reply := out.(*OKRep)
return ctx.Result(200, reply)
}
}
func _Demo_Get0_HTTP_Handler(srv DemoHTTPServer) func(ctx http.Context) error {
return func(ctx http.Context) error {
var in IdReq
if err := ctx.BindQuery(&in); err != nil {
return err
}
http.SetOperation(ctx, OperationDemoGet)
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.Get(ctx, req.(*IdReq))
})
out, err := h(ctx, &in)
if err != nil {
return err
}
reply := out.(*DemoModel)
return ctx.Result(200, reply)
}
}
func _Demo_List0_HTTP_Handler(srv DemoHTTPServer) func(ctx http.Context) error {
return func(ctx http.Context) error {
var in ListReq
if err := ctx.BindQuery(&in); err != nil {
return err
}
http.SetOperation(ctx, OperationDemoList)
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.List(ctx, req.(*ListReq))
})
out, err := h(ctx, &in)
if err != nil {
return err
}
reply := out.(*ListRep)
return ctx.Result(200, reply)
}
}
func _Demo_Delete0_HTTP_Handler(srv DemoHTTPServer) func(ctx http.Context) error {
return func(ctx http.Context) error {
var in IdReq
if err := ctx.BindQuery(&in); err != nil {
return err
}
http.SetOperation(ctx, OperationDemoDelete)
h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.Delete(ctx, req.(*IdReq))
})
out, err := h(ctx, &in)
if err != nil {
return err
}
reply := out.(*OKRep)
return ctx.Result(200, reply)
}
}
type DemoHTTPClient interface {
Create(ctx context.Context, req *CreateReq, opts ...http.CallOption) (rsp *OKRep, err error)
Delete(ctx context.Context, req *IdReq, opts ...http.CallOption) (rsp *OKRep, err error)
Get(ctx context.Context, req *IdReq, opts ...http.CallOption) (rsp *DemoModel, err error)
Hello(ctx context.Context, req *HelloReq, opts ...http.CallOption) (rsp *HelloRep, err error)
List(ctx context.Context, req *ListReq, opts ...http.CallOption) (rsp *ListRep, err error)
Update(ctx context.Context, req *UpdateReq, opts ...http.CallOption) (rsp *OKRep, err error)
}
type DemoHTTPClientImpl struct {
cc *http.Client
}
func NewDemoHTTPClient(client *http.Client) DemoHTTPClient {
return &DemoHTTPClientImpl{client}
}
func (c *DemoHTTPClientImpl) Create(ctx context.Context, in *CreateReq, opts ...http.CallOption) (*OKRep, error) {
var out OKRep
pattern := "/demo/create"
path := binding.EncodeURL(pattern, in, false)
opts = append(opts, http.Operation(OperationDemoCreate))
opts = append(opts, http.PathTemplate(pattern))
err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
if err != nil {
return nil, err
}
return &out, err
}
func (c *DemoHTTPClientImpl) Delete(ctx context.Context, in *IdReq, opts ...http.CallOption) (*OKRep, error) {
var out OKRep
pattern := "/demo/delete"
path := binding.EncodeURL(pattern, in, true)
opts = append(opts, http.Operation(OperationDemoDelete))
opts = append(opts, http.PathTemplate(pattern))
err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...)
if err != nil {
return nil, err
}
return &out, err
}
func (c *DemoHTTPClientImpl) Get(ctx context.Context, in *IdReq, opts ...http.CallOption) (*DemoModel, error) {
var out DemoModel
pattern := "/demo/get"
path := binding.EncodeURL(pattern, in, true)
opts = append(opts, http.Operation(OperationDemoGet))
opts = append(opts, http.PathTemplate(pattern))
err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...)
if err != nil {
return nil, err
}
return &out, err
}
func (c *DemoHTTPClientImpl) Hello(ctx context.Context, in *HelloReq, opts ...http.CallOption) (*HelloRep, error) {
var out HelloRep
pattern := "/demo/hello/{name}"
path := binding.EncodeURL(pattern, in, true)
opts = append(opts, http.Operation(OperationDemoHello))
opts = append(opts, http.PathTemplate(pattern))
err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...)
if err != nil {
return nil, err
}
return &out, err
}
func (c *DemoHTTPClientImpl) List(ctx context.Context, in *ListReq, opts ...http.CallOption) (*ListRep, error) {
var out ListRep
pattern := "/demo/list"
path := binding.EncodeURL(pattern, in, true)
opts = append(opts, http.Operation(OperationDemoList))
opts = append(opts, http.PathTemplate(pattern))
err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...)
if err != nil {
return nil, err
}
return &out, err
}
func (c *DemoHTTPClientImpl) Update(ctx context.Context, in *UpdateReq, opts ...http.CallOption) (*OKRep, error) {
var out OKRep
pattern := "/demo/update"
path := binding.EncodeURL(pattern, in, false)
opts = append(opts, http.Operation(OperationDemoUpdate))
opts = append(opts, http.PathTemplate(pattern))
err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
if err != nil {
return nil, err
}
return &out, err
}
This diff is collapsed.
syntax = "proto3";
package mgr;
option go_package = "hilo/api/mgr;mgr";
import "mgr_base.proto";
// 定义服务
service Mgr {
rpc CheckMgrImeiExist (CheckMgrImeiExistReq) returns (OkRep) {}
rpc CheckMgrIpExist (CheckMgrIpExistReq) returns (OkRep) {}
rpc GetMgrUserStatus (GetMgrUserStatusReq) returns (MMgrUserStatus) {}
rpc IsAgent(IsAgentReq) returns (OkRep) {}
}
message CheckMgrImeiExistReq {
string imei = 1;
}
message CheckMgrIpExistReq {
string ip = 1;
}
message GetMgrUserStatusReq {
int64 userId = 1;
}
message IsAgentReq {
int64 userId = 1;
}
message OkRep {
bool ok = 1;
}
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.19.4
// source: mgr_base.proto
package mgr
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type UserStatus int32
const (
UserStatus_None UserStatus = 0
//正常
UserStatus_Normal UserStatus = 1
//冻结
UserStatus_Freeze UserStatus = 2
)
// Enum value maps for UserStatus.
var (
UserStatus_name = map[int32]string{
0: "None",
1: "Normal",
2: "Freeze",
}
UserStatus_value = map[string]int32{
"None": 0,
"Normal": 1,
"Freeze": 2,
}
)
func (x UserStatus) Enum() *UserStatus {
p := new(UserStatus)
*p = x
return p
}
func (x UserStatus) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (UserStatus) Descriptor() protoreflect.EnumDescriptor {
return file_mgr_base_proto_enumTypes[0].Descriptor()
}
func (UserStatus) Type() protoreflect.EnumType {
return &file_mgr_base_proto_enumTypes[0]
}
func (x UserStatus) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use UserStatus.Descriptor instead.
func (UserStatus) EnumDescriptor() ([]byte, []int) {
return file_mgr_base_proto_rawDescGZIP(), []int{0}
}
type MMgrUserStatus struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` // id
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id"` // 用户ID
Status UserStatus `protobuf:"varint,3,opt,name=status,proto3,enum=mgr.UserStatus" json:"status"` // 状态(1:永久冻结,2:封禁)
EndTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=end_time,json=endTime,proto3" json:"end_time"` // 解禁截至时间
CreatedTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_time,json=createdTime,proto3" json:"created_time"`
UpdatedTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_time,json=updatedTime,proto3" json:"updated_time"`
}
func (x *MMgrUserStatus) Reset() {
*x = MMgrUserStatus{}
if protoimpl.UnsafeEnabled {
mi := &file_mgr_base_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MMgrUserStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MMgrUserStatus) ProtoMessage() {}
func (x *MMgrUserStatus) ProtoReflect() protoreflect.Message {
mi := &file_mgr_base_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MMgrUserStatus.ProtoReflect.Descriptor instead.
func (*MMgrUserStatus) Descriptor() ([]byte, []int) {
return file_mgr_base_proto_rawDescGZIP(), []int{0}
}
func (x *MMgrUserStatus) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *MMgrUserStatus) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
func (x *MMgrUserStatus) GetStatus() UserStatus {
if x != nil {
return x.Status
}
return UserStatus_None
}
func (x *MMgrUserStatus) GetEndTime() *timestamppb.Timestamp {
if x != nil {
return x.EndTime
}
return nil
}
func (x *MMgrUserStatus) GetCreatedTime() *timestamppb.Timestamp {
if x != nil {
return x.CreatedTime
}
return nil
}
func (x *MMgrUserStatus) GetUpdatedTime() *timestamppb.Timestamp {
if x != nil {
return x.UpdatedTime
}
return nil
}
var File_mgr_base_proto protoreflect.FileDescriptor
var file_mgr_base_proto_rawDesc = []byte{
0x0a, 0x0e, 0x6d, 0x67, 0x72, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x03, 0x6d, 0x67, 0x72, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x02, 0x0a, 0x0e, 0x4d, 0x4d, 0x67, 0x72, 0x55,
0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65,
0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72,
0x49, 0x64, 0x12, 0x27, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x6d, 0x67, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61,
0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x65,
0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69,
0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69,
0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d,
0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d,
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65,
0x2a, 0x2e, 0x0a, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x08,
0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x6f, 0x72, 0x6d,
0x61, 0x6c, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x72, 0x65, 0x65, 0x7a, 0x65, 0x10, 0x02,
0x42, 0x12, 0x5a, 0x10, 0x68, 0x69, 0x6c, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x67, 0x72,
0x3b, 0x6d, 0x67, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_mgr_base_proto_rawDescOnce sync.Once
file_mgr_base_proto_rawDescData = file_mgr_base_proto_rawDesc
)
func file_mgr_base_proto_rawDescGZIP() []byte {
file_mgr_base_proto_rawDescOnce.Do(func() {
file_mgr_base_proto_rawDescData = protoimpl.X.CompressGZIP(file_mgr_base_proto_rawDescData)
})
return file_mgr_base_proto_rawDescData
}
var file_mgr_base_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_mgr_base_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_mgr_base_proto_goTypes = []interface{}{
(UserStatus)(0), // 0: mgr.UserStatus
(*MMgrUserStatus)(nil), // 1: mgr.MMgrUserStatus
(*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
}
var file_mgr_base_proto_depIdxs = []int32{
0, // 0: mgr.MMgrUserStatus.status:type_name -> mgr.UserStatus
2, // 1: mgr.MMgrUserStatus.end_time:type_name -> google.protobuf.Timestamp
2, // 2: mgr.MMgrUserStatus.created_time:type_name -> google.protobuf.Timestamp
2, // 3: mgr.MMgrUserStatus.updated_time:type_name -> google.protobuf.Timestamp
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_mgr_base_proto_init() }
func file_mgr_base_proto_init() {
if File_mgr_base_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_mgr_base_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MMgrUserStatus); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_mgr_base_proto_rawDesc,
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_mgr_base_proto_goTypes,
DependencyIndexes: file_mgr_base_proto_depIdxs,
EnumInfos: file_mgr_base_proto_enumTypes,
MessageInfos: file_mgr_base_proto_msgTypes,
}.Build()
File_mgr_base_proto = out.File
file_mgr_base_proto_rawDesc = nil
file_mgr_base_proto_goTypes = nil
file_mgr_base_proto_depIdxs = nil
}
syntax = "proto3";
package mgr;
option go_package = "hilo/api/mgr;mgr";
import "google/protobuf/timestamp.proto";
enum UserStatus {
None = 0;
//正常
Normal = 1;
//冻结
Freeze = 2;
}
message MMgrUserStatus {
int64 id = 1; // id
int64 user_id = 2; // 用户ID
UserStatus status = 3; // 状态(1:永久冻结,2:封禁)
google.protobuf.Timestamp end_time = 4; // 解禁截至时间
google.protobuf.Timestamp created_time = 5;
google.protobuf.Timestamp updated_time = 6;
}
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.19.4
// source: mgr.proto
package mgr
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// MgrClient is the client API for Mgr service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type MgrClient interface {
CheckMgrImeiExist(ctx context.Context, in *CheckMgrImeiExistReq, opts ...grpc.CallOption) (*OkRep, error)
CheckMgrIpExist(ctx context.Context, in *CheckMgrIpExistReq, opts ...grpc.CallOption) (*OkRep, error)
GetMgrUserStatus(ctx context.Context, in *GetMgrUserStatusReq, opts ...grpc.CallOption) (*MMgrUserStatus, error)
IsAgent(ctx context.Context, in *IsAgentReq, opts ...grpc.CallOption) (*OkRep, error)
}
type mgrClient struct {
cc grpc.ClientConnInterface
}
func NewMgrClient(cc grpc.ClientConnInterface) MgrClient {
return &mgrClient{cc}
}
func (c *mgrClient) CheckMgrImeiExist(ctx context.Context, in *CheckMgrImeiExistReq, opts ...grpc.CallOption) (*OkRep, error) {
out := new(OkRep)
err := c.cc.Invoke(ctx, "/mgr.Mgr/CheckMgrImeiExist", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *mgrClient) CheckMgrIpExist(ctx context.Context, in *CheckMgrIpExistReq, opts ...grpc.CallOption) (*OkRep, error) {
out := new(OkRep)
err := c.cc.Invoke(ctx, "/mgr.Mgr/CheckMgrIpExist", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *mgrClient) GetMgrUserStatus(ctx context.Context, in *GetMgrUserStatusReq, opts ...grpc.CallOption) (*MMgrUserStatus, error) {
out := new(MMgrUserStatus)
err := c.cc.Invoke(ctx, "/mgr.Mgr/GetMgrUserStatus", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *mgrClient) IsAgent(ctx context.Context, in *IsAgentReq, opts ...grpc.CallOption) (*OkRep, error) {
out := new(OkRep)
err := c.cc.Invoke(ctx, "/mgr.Mgr/IsAgent", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MgrServer is the server API for Mgr service.
// All implementations must embed UnimplementedMgrServer
// for forward compatibility
type MgrServer interface {
CheckMgrImeiExist(context.Context, *CheckMgrImeiExistReq) (*OkRep, error)
CheckMgrIpExist(context.Context, *CheckMgrIpExistReq) (*OkRep, error)
GetMgrUserStatus(context.Context, *GetMgrUserStatusReq) (*MMgrUserStatus, error)
IsAgent(context.Context, *IsAgentReq) (*OkRep, error)
mustEmbedUnimplementedMgrServer()
}
// UnimplementedMgrServer must be embedded to have forward compatible implementations.
type UnimplementedMgrServer struct {
}
func (UnimplementedMgrServer) CheckMgrImeiExist(context.Context, *CheckMgrImeiExistReq) (*OkRep, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckMgrImeiExist not implemented")
}
func (UnimplementedMgrServer) CheckMgrIpExist(context.Context, *CheckMgrIpExistReq) (*OkRep, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckMgrIpExist not implemented")
}
func (UnimplementedMgrServer) GetMgrUserStatus(context.Context, *GetMgrUserStatusReq) (*MMgrUserStatus, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetMgrUserStatus not implemented")
}
func (UnimplementedMgrServer) IsAgent(context.Context, *IsAgentReq) (*OkRep, error) {
return nil, status.Errorf(codes.Unimplemented, "method IsAgent not implemented")
}
func (UnimplementedMgrServer) mustEmbedUnimplementedMgrServer() {}
// UnsafeMgrServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MgrServer will
// result in compilation errors.
type UnsafeMgrServer interface {
mustEmbedUnimplementedMgrServer()
}
func RegisterMgrServer(s grpc.ServiceRegistrar, srv MgrServer) {
s.RegisterService(&Mgr_ServiceDesc, srv)
}
func _Mgr_CheckMgrImeiExist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CheckMgrImeiExistReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MgrServer).CheckMgrImeiExist(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/mgr.Mgr/CheckMgrImeiExist",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MgrServer).CheckMgrImeiExist(ctx, req.(*CheckMgrImeiExistReq))
}
return interceptor(ctx, in, info, handler)
}
func _Mgr_CheckMgrIpExist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CheckMgrIpExistReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MgrServer).CheckMgrIpExist(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/mgr.Mgr/CheckMgrIpExist",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MgrServer).CheckMgrIpExist(ctx, req.(*CheckMgrIpExistReq))
}
return interceptor(ctx, in, info, handler)
}
func _Mgr_GetMgrUserStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetMgrUserStatusReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MgrServer).GetMgrUserStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/mgr.Mgr/GetMgrUserStatus",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MgrServer).GetMgrUserStatus(ctx, req.(*GetMgrUserStatusReq))
}
return interceptor(ctx, in, info, handler)
}
func _Mgr_IsAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IsAgentReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MgrServer).IsAgent(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/mgr.Mgr/IsAgent",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MgrServer).IsAgent(ctx, req.(*IsAgentReq))
}
return interceptor(ctx, in, info, handler)
}
// Mgr_ServiceDesc is the grpc.ServiceDesc for Mgr service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Mgr_ServiceDesc = grpc.ServiceDesc{
ServiceName: "mgr.Mgr",
HandlerType: (*MgrServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CheckMgrImeiExist",
Handler: _Mgr_CheckMgrImeiExist_Handler,
},
{
MethodName: "CheckMgrIpExist",
Handler: _Mgr_CheckMgrIpExist_Handler,
},
{
MethodName: "GetMgrUserStatus",
Handler: _Mgr_GetMgrUserStatus_Handler,
},
{
MethodName: "IsAgent",
Handler: _Mgr_IsAgent_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "mgr.proto",
}
This diff is collapsed.
syntax = "proto3";
package user;
import "cv_user_detail.proto";
import "user_base.proto";
option go_package = "hilo/api/user;user";
message LoginReq {
string ThirdPartyId = 1; // @gotags: validate:"required"
EThirdPartyType ThirdPartyType = 2; // @gotags: validate:"required"
string ThirdPartyToken = 3; // @gotags: validate:"required"
ESex Sex = 4;
string Avatar = 5;
string Nick = 6;
string Country = 7;
}
message LoginRep {
string Token = 1;
string RongyunToken = 2;
string TencentyunToken = 3;
EThirdPartyType ThirdPartyType = 4;
optional CvUserDetail User = 5;
}
This diff is collapsed.
syntax = "proto3";
package user;
option go_package = "hilo/api/user;user";
message CvUserDetail {
int32 ILikeCount = 1; //统计:我喜欢多少人
int32 LikeCount = 2; //统计:多少人喜欢你, (本才才有数据,不是本人,数据为nil)
int32 VisitCount = 3; //统计:多少人访问你
int32 IsPush = 4; //消息提醒, 1:开启,2:关闭
int32 DiamondNum = 5; //钻石数量(本人才有数据,不是本人,数据为nil)
bool IsLike = 6; //是否喜欢(本人没有数据,//20210205 已废弃nil,产品说:可以自己喜欢自己)
bool IsSession = 7; //是否存在会话(本人没有数据)
bool IsLikeMe = 8;
int32 HeartValue = 9; // 与我之间永恒之心的值
int32 HeartValueMax = 10; // 与我之间永恒之心的最大值(0代表没有永恒之心,即没有相互关注)
int32 MeetDays = 11; // 成长关系建立的时间(天数)
int32 WealthUserGrade = 12; //财富等级
int32 CharmUserGrade = 13; //魅力等级
int32 ActivityUserGrade = 14; //活跃等级
string CurrentRoom = 15; // 当前用户所在房间(产品叫“群组”)
int64 MyGroupPower = 16; // 当前用户所在势力
string MyGroupPowerName = 17; // 当前用户所在势力绑定群组的名称
UserBase Info = 18;
}
message UserBase {
int32 Id = 1; //不会有返回值
string Avatar = 2; //头像,不存在为nil
bool DefaultAvatar = 3; //是否默认头像 true:是 false:不是
string ExternalId = 4; //用户对外ID
string Nick = 5; //昵称,不存在为nil
string Description = 6; //签名,不存在为nil
int32 ESex = 7; //性别 1:男 2:女,不存在为nil
string Country = 8; //国家,不存在为nil
string CountryIcon = 9; //国旗图标,不存在为nil
string Code = 10; //邀请码
bool IsPrettyCode = 11; // 是否靓号
bool IsLogout = 12; //是否注销
int64 Birthday = 13; //生日,如果是其它人用户信息,年龄则按照是否展示显示,如果是本人,年龄则按照是否存在展示
bool IsShowAge = 14; // 是否展示年龄, 是本人才有数据,看其他用户均为nil
bool IsTradeUnion = 15; // 是否工会成员, 只有是自己查自己,这个才有值,其它全为nil, 20220329 数据开放:原因:产品1对1视频聊天中,公会用户视频需要送礼物。改为: 全部人可以知道是否是公会用户。
bool IsAgentMgr = 16; // 是否代理管理员, 只有自己查自己的时候才有值,其他情况为nil
bool IsTradeUnionMatchNotification = 17; // 工会成员,是否开启了,匹配通知,只有 isTradeUnion值为true,这里才有值,
bool IsVip = 18; // 是否VIP用户
bool IsOfficialStaff = 19; // 是否是官方人员
int64 VipExpireTime = 20; // VIP用户过期时间(只有自己查询自己,才返回)
repeated int32 Medals = 21; // 勋章列表 TODO: 删除
repeated CvMedal MedalInfo = 22; // 勋章列表
CvHeadwear Headwear = 23; // 当前使用的头饰
CvProperty Ride = 24; // 当前使用的座驾
CvNoble Noble = 25;
}
message CvMedal {
int32 Id = 1;
string PicUrl = 2;
string EffectUrl = 3;
}
message CvHeadwear {
int32 Id = 1;
bool Using = 2;
string PicUrl = 3;
string EffectUrl = 4;
int64 TimeLeft = 5;
}
message CvProperty {
int32 Id = 1;
string PicUrl = 2;
string EffectUrl = 3;
bool Using = 4;
string TimeLeft = 5;
string SenderAvatar = 6;
string ReceiverAvatar = 7;
}
message CvNoble {
int32 Level = 1;
int64 EndTime = 2;
}
\ No newline at end of file
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.19.4
// source: user.proto
package user
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
var File_user_proto protoreflect.FileDescriptor
var file_user_proto_rawDesc = []byte{
0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x75, 0x73,
0x65, 0x72, 0x1a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x31,
0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12,
0x0e, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a,
0x0e, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x22,
0x00, 0x42, 0x14, 0x5a, 0x12, 0x68, 0x69, 0x6c, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73,
0x65, 0x72, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var file_user_proto_goTypes = []interface{}{
(*LoginReq)(nil), // 0: user.LoginReq
(*LoginRep)(nil), // 1: user.LoginRep
}
var file_user_proto_depIdxs = []int32{
0, // 0: user.User.Login:input_type -> user.LoginReq
1, // 1: user.User.Login:output_type -> user.LoginRep
1, // [1:2] is the sub-list for method output_type
0, // [0:1] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_user_proto_init() }
func file_user_proto_init() {
if File_user_proto != nil {
return
}
file_auth_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_user_proto_rawDesc,
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_user_proto_goTypes,
DependencyIndexes: file_user_proto_depIdxs,
}.Build()
File_user_proto = out.File
file_user_proto_rawDesc = nil
file_user_proto_goTypes = nil
file_user_proto_depIdxs = nil
}
syntax = "proto3";
package user;
import "auth.proto";
option go_package = "hilo/api/user;user";
// 定义服务
service User {
rpc Login (LoginReq) returns (LoginRep) {}
}
This diff is collapsed.
syntax = "proto3";
package user;
import "google/protobuf/timestamp.proto";
option go_package = "hilo/api/user;user";
enum EThirdPartyType {
UnknownThirdPartyType = 0;
Phone = 1;
Google = 2;
Facebook = 3;
Apple = 4;
WeChat = 5;
}
enum ESex {
UnknownSex = 0;
Male = 1;
Female = 2;
}
message MUserOauth {
int64 id = 1; // id
int64 user_id = 2; // 用户ID
string third_party_id = 3; // 第三方ID
EThirdPartyType third_party_type = 4; // 第三方类型
string third_party_token = 5; // 第三方token
google.protobuf.Timestamp created_time = 6;
google.protobuf.Timestamp updated_time = 7;
}
message MUser {
int64 id = 1; // id
string external_id = 2; // @gotags: validate:"required" // 别名
string avatar = 3; // 头像
int32 default_avatar = 4;
string nick = 5; // 昵称
ESex sex = 6; // 性别
int64 birthday = 7; // 出生日期
string country = 8; // 国家
string country_icon = 9; // 国旗图标地址
string language = 10;
string description = 11; // 个性签名
int32 is_push = 12;
int32 is_show_age = 13;
string code = 14; // 邀请码
string origin_code = 15; // 原始邀请码
int32 status = 16; // 状态
string device_type = 17; // @gotags: validate:"required" // ios,Android
int64 logout_time = 18;
google.protobuf.Timestamp created_time = 19;
google.protobuf.Timestamp updated_time = 20;
}
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.19.4
// source: user.proto
package user
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// UserClient is the client API for User service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type UserClient interface {
Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginRep, error)
}
type userClient struct {
cc grpc.ClientConnInterface
}
func NewUserClient(cc grpc.ClientConnInterface) UserClient {
return &userClient{cc}
}
func (c *userClient) Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginRep, error) {
out := new(LoginRep)
err := c.cc.Invoke(ctx, "/user.User/Login", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserServer is the server API for User service.
// All implementations must embed UnimplementedUserServer
// for forward compatibility
type UserServer interface {
Login(context.Context, *LoginReq) (*LoginRep, error)
mustEmbedUnimplementedUserServer()
}
// UnimplementedUserServer must be embedded to have forward compatible implementations.
type UnimplementedUserServer struct {
}
func (UnimplementedUserServer) Login(context.Context, *LoginReq) (*LoginRep, error) {
return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
}
func (UnimplementedUserServer) mustEmbedUnimplementedUserServer() {}
// UnsafeUserServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to UserServer will
// result in compilation errors.
type UnsafeUserServer interface {
mustEmbedUnimplementedUserServer()
}
func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer) {
s.RegisterService(&User_ServiceDesc, srv)
}
func _User_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LoginReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServer).Login(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/user.User/Login",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServer).Login(ctx, req.(*LoginReq))
}
return interceptor(ctx, in, info, handler)
}
// User_ServiceDesc is the grpc.ServiceDesc for User service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var User_ServiceDesc = grpc.ServiceDesc{
ServiceName: "user.User",
HandlerType: (*UserServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Login",
Handler: _User_Login_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "user.proto",
}
bin
tmp
\ No newline at end of file
FROM golang:1.16 AS builder
COPY ../../country /src
WORKDIR /src
RUN GOPROXY=https://goproxy.cn make build
FROM debian:stable-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
netbase \
&& rm -rf /var/lib/apt/lists/ \
&& apt-get autoremove -y && apt-get autoclean -y
COPY --from=builder /src/bin /app
WORKDIR /app
EXPOSE 8000
EXPOSE 9000
VOLUME /data/conf
CMD ["./server", "-conf", "/data/conf"]
root = "."
testdata_dir = "bin"
tmp_dir = "bin"
[build]
args_bin = []
bin = "./bin/hilo-service-country"
cmd = "go build -o bin/hilo-service-country ./cmd/country"
full_bin = ""
delay = 1000
exclude_dir = ["bin", "assets", "tmp", "vendor", "testdata"]
exclude_file = []
exclude_regex = ["_test.go"]
exclude_unchanged = false
follow_symlink = false
include_dir = []
include_ext = ["go", "tpl", "tmpl", "html"]
kill_delay = "0.3s"
log = "build-errors.log"
send_interrupt = true
stop_on_error = true
[color]
app = ""
build = "yellow"
main = "magenta"
runner = "green"
watcher = "cyan"
[log]
time = false
[misc]
clean_on_exit = false
[screen]
clear_on_rebuild = false
package main
import (
"flag"
"github.com/go-kratos/kratos/contrib/registry/consul/v2"
"github.com/go-kratos/kratos/v2"
"github.com/go-kratos/kratos/v2/middleware/tracing"
"github.com/go-kratos/kratos/v2/transport/grpc"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/jaeger"
"go.opentelemetry.io/otel/sdk/resource"
tracesdk "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.10.0"
"go.uber.org/zap"
"hilo/app/service/country/internal/conf"
"hilo/common/logz"
"hilo/common/util"
"math/rand"
"time"
"github.com/go-kratos/kratos/v2/log"
)
var (
id = util.GenServiceId()
)
func main() {
flag.Parse()
conf.LoadConfig()
rand.Seed(time.Now().UnixNano())
err := initTracer(conf.Conf.Jaeger.Url)
if err != nil {
panic(err)
}
l := logz.NewLogger(conf.Conf.Log, zap.AddCaller(), zap.AddCallerSkip(3))
defer l.Flush()
logger := log.With(l,
"service.id", id,
"service.name", conf.Conf.Server.Name,
"service.version", conf.Conf.Server.Version,
"trace.id", tracing.TraceID(),
"span.id", tracing.SpanID(),
)
log.SetLogger(logger)
app, cleanup, err := wireApp(conf.Conf.Server, conf.Conf.Data, conf.Conf.Consul, logger)
if err != nil {
panic(err)
}
defer cleanup()
// start and wait for stop signal
if err := app.Run(); err != nil {
panic(err)
}
}
func newApp(logger log.Logger, gs *grpc.Server, rr *consul.Registry) *kratos.App {
return kratos.New(
kratos.ID(id),
kratos.Name(conf.Conf.Server.Name),
kratos.Version(conf.Conf.Server.Version),
kratos.Metadata(map[string]string{}),
kratos.Logger(logger),
kratos.Server(
gs,
),
kratos.Registrar(rr),
)
}
// 设置全局trace
func initTracer(url string) error {
// 创建 Jaeger exporter
exp, err := jaeger.New(jaeger.WithCollectorEndpoint(jaeger.WithEndpoint(url)))
if err != nil {
return err
}
tp := tracesdk.NewTracerProvider(
// 将基于父span的采样率设置为100%
tracesdk.WithSampler(tracesdk.ParentBased(tracesdk.TraceIDRatioBased(1.0))),
// 始终确保再生成中批量处理
tracesdk.WithBatcher(exp),
// 在资源中记录有关此应用程序的信息
tracesdk.WithResource(resource.NewSchemaless(
semconv.ServiceNameKey.String("kratos-trace"),
attribute.String("exporter", "jaeger"),
attribute.Float64("float", 312.23),
)),
)
otel.SetTracerProvider(tp)
return nil
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
package handler
import "github.com/google/wire"
// ProviderSet is handler providers.
var ProviderSet = wire.NewSet(NewCountryHandler)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment