123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- syntax = "proto3";
- package live.resource.v1;
- option go_package = "v1";
- import "github.com/gogo/protobuf/gogoproto/gogo.proto";
- // addReq
- message AddReq {
- string platform = 1 [(gogoproto.moretags) = 'form:"platform" validate:"required"'];
- string title = 2 [(gogoproto.moretags) = 'form:"title" validate:"required"'];
- string jumpPath = 3 [(gogoproto.moretags) = 'form:"jumpPath"'];
- int64 jumpTime = 4 [(gogoproto.moretags) = 'form:"jumpTime"'];
- string type = 5 [(gogoproto.moretags) = 'form:"type" validate:"required"'];
- string device = 6 [(gogoproto.moretags) = 'form:"device" validate:"required"'];
- string startTime = 7 [(gogoproto.moretags) = 'form:"startTime" validate:"required"'];
- string endTime = 8 [(gogoproto.moretags) = 'form:"endTime" validate:"required"'];
- string imageUrl = 9 [(gogoproto.moretags) = 'form:"imageUrl" validate:"required"'];
- int64 jumpPathType = 10 [(gogoproto.moretags) = 'form:"jumpPathType"'];
- }
- // addResp
- message AddResp {
- repeated int64 id = 1 [(gogoproto.jsontag) = "id"];
- }
- // editReq
- message EditReq {
- string platform = 1 [(gogoproto.moretags) = 'form:"platform" validate:"required"'];
- int64 id = 2 [(gogoproto.moretags) = 'form:"id" validate:"required"'];
- string title = 3 [(gogoproto.moretags) = 'form:"title"'];
- string jumpPath = 4 [(gogoproto.moretags) = 'form:"jumpPath"'];
- int64 jumpTime = 5 [(gogoproto.moretags) = 'form:"jumpTime"'];
- string startTime = 7 [(gogoproto.moretags) = 'form:"startTime"'];
- string endTime = 8 [(gogoproto.moretags) = 'form:"endTime"'];
- string imageUrl = 9 [(gogoproto.moretags) = 'form:"imageUrl"'];
- int64 jumpPathType = 10 [(gogoproto.moretags) = 'form:"jumpPathType"'];
- }
- // editResp
- message EditResp {
- }
- //下线闪屏
- message OfflineReq {
- string platform = 1 [(gogoproto.moretags) = 'form:"platform" validate:"required"'];
- int64 id = 2 [(gogoproto.moretags) = 'form:"id" validate:"required"'];
- }
- message OfflineResp {
- }
- //获取闪屏配置列表
- message GetListReq {
- string platform = 1 [(gogoproto.moretags) = 'form:"platform" validate:"required"'];
- int64 page = 2 [(gogoproto.moretags) = 'form:"page"'];
- int64 pageSize = 3 [(gogoproto.moretags) = 'form:"pageSize"'];
- string type = 4 [(gogoproto.moretags) = 'form:"type" validate:"required"'];
- }
- message GetListResp {
- int64 currentPage = 1 [(gogoproto.jsontag) = "currentPage"];
- int64 totalCount = 2 [(gogoproto.jsontag) = "totalCount"];
- repeated List list = 3 [(gogoproto.jsontag) = "list"];
- message List {
- int64 id = 1 [(gogoproto.jsontag) = "id"];
- string title = 2 [(gogoproto.jsontag) = "title"];
- string jumpPath = 3 [(gogoproto.jsontag) = "jumpPath"];
- string device_platform = 4 [(gogoproto.jsontag) = "device_platform"];
- int64 device_build = 5 [(gogoproto.jsontag) = "device_build"];
- string startTime = 6 [(gogoproto.jsontag) = "startTime"];
- string endTime = 7 [(gogoproto.jsontag) = "endTime"];
- int64 status = 8 [(gogoproto.jsontag) = "status"];
- int64 device_limit =9 [(gogoproto.jsontag) = "device_limit"];
- string imageUrl = 10 [(gogoproto.jsontag) = "imageUrl"];
- int64 jumpPathType = 11 [(gogoproto.jsontag) = "jumpPathType"];
- int64 jumpTime = 12 [(gogoproto.jsontag) = "jumpTime"];
- }
- }
- // 获取当前有效闪屏配置(客户端)
- message GetInfoReq {
- string platform = 1 [(gogoproto.moretags) = 'form:"platform" validate:"required"'];
- int64 build = 2 [(gogoproto.moretags) = 'form:"build" validate:"required"'];
- }
- message GetInfoResp {
- int64 id = 1 [(gogoproto.jsontag) = "id"];
- string title = 2 [(gogoproto.jsontag) = "title"];
- string jumpPath = 3 [(gogoproto.jsontag) = "jumpPath"];
- int64 jumpTime = 4 [(gogoproto.jsontag) = "jumpTime"];
- int64 jumpPathType = 5 [(gogoproto.jsontag) = "jumpPathType"];
- string imageUrl = 6 [(gogoproto.jsontag) = "imageUrl"];
- }
- // 获取当前有效banner配置(客户端)
- message GetBlinkBannerReq {
- string platform = 1 [(gogoproto.moretags) = 'form:"platform" validate:"required"'];
- int64 build = 2 [(gogoproto.moretags) = 'form:"build" validate:"required"'];
- }
- message GetBlinkBannerResp {
- int64 id = 1 [(gogoproto.jsontag) = "id"];
- string title = 2 [(gogoproto.jsontag) = "title"];
- string jumpPath = 3 [(gogoproto.jsontag) = "jumpPath"];
- int64 jumpTime = 4 [(gogoproto.jsontag) = "jumpTime"];
- int64 jumpPathType = 5 [(gogoproto.jsontag) = "jumpPathType"];
- string imageUrl = 6 [(gogoproto.jsontag) = "imageUrl"];
- }
- // 获取banner配置(客户端)
- message GetBannerReq {
- string platform = 1 [(gogoproto.moretags) = 'form:"platform" validate:"required"'];
- int64 build = 2 [(gogoproto.moretags) = 'form:"build" validate:"required"'];
- string type = 3 [(gogoproto.moretags) = 'form:"type" validate:"required"'];
- }
- message GetBannerResp {
- repeated List list = 1 [(gogoproto.jsontag) = "list"];
- message List {
- int64 id = 1 [(gogoproto.jsontag) = "id"];
- string title = 2 [(gogoproto.jsontag) = "title"];
- string jumpPath = 3 [(gogoproto.jsontag) = "jumpPath"];
- int64 jumpTime = 4 [(gogoproto.jsontag) = "jumpTime"];
- int64 jumpPathType = 5 [(gogoproto.jsontag) = "jumpPathType"];
- string imageUrl = 6 [(gogoproto.jsontag) = "imageUrl"];
- }
- }
- message GetPlatformListReq {
- int64 type=1 [(gogoproto.jsontag) = "type"];
- }
- message GetPlatformListResp {
- repeated string platform =1 [(gogoproto.jsontag) = "platform"];
- }
- message GetListExReq {
- string platform = 1 [(gogoproto.moretags) = 'form:"platform" validate:"required"'];
- int64 page = 2 [(gogoproto.moretags) = 'form:"page"'];
- int64 pageSize = 3 [(gogoproto.moretags) = 'form:"pageSize"'];
- repeated string type = 4 [(gogoproto.moretags) = 'form:"type" validate:"required"'];
- string device_platform = 5 [(gogoproto.moretags) = 'form:"device_platform"'];
- string status = 6 [(gogoproto.moretags) = 'form:"status"'];
- string startTime = 7 [(gogoproto.moretags) = 'form:"startTime"'];
- string endTime = 8 [(gogoproto.moretags) = 'form:"endTime"'];
- }
- message GetListExResp {
- int64 currentPage = 1 [(gogoproto.jsontag) = "currentPage"];
- int64 totalCount = 2 [(gogoproto.jsontag) = "totalCount"];
- repeated List list = 3 [(gogoproto.jsontag) = "list"];
- message List {
- int64 id = 1 [(gogoproto.jsontag) = "id"];
- string title = 2 [(gogoproto.jsontag) = "title"];
- string jumpPath = 3 [(gogoproto.jsontag) = "jumpPath"];
- string device_platform = 4 [(gogoproto.jsontag) = "device_platform"];
- int64 device_build = 5 [(gogoproto.jsontag) = "device_build"];
- string startTime = 6 [(gogoproto.jsontag) = "startTime"];
- string endTime = 7 [(gogoproto.jsontag) = "endTime"];
- int64 status = 8 [(gogoproto.jsontag) = "status"];
- int64 device_limit =9 [(gogoproto.jsontag) = "device_limit"];
- string imageUrl = 10 [(gogoproto.jsontag) = "imageUrl"];
- int64 jumpPathType = 11 [(gogoproto.jsontag) = "jumpPathType"];
- int64 jumpTime = 12 [(gogoproto.jsontag) = "jumpTime"];
- string type = 13 [(gogoproto.jsontag) = "type"];
- }
- }
- service Resource {
- //Add 添加资源接口
- rpc Add(AddReq) returns (AddResp);
- //Add 添加资源接口(不限制位置和平台)
- rpc AddEx(AddReq) returns (AddResp);
- //Edit 编辑资源接口
- rpc Edit(EditReq) returns (EditResp);
- //Offline 下线资源接口
- rpc Offline(OfflineReq) returns (OfflineResp);
- //GetList 获取资源列表
- rpc GetList(GetListReq) returns (GetListResp);
- //获取平台列表
- rpc GetPlatformList(GetPlatformListReq) returns (GetPlatformListResp);
- //GetListEx 获取资源列表
- rpc GetListEx(GetListExReq) returns (GetListExResp);
- }
- service Splash {
- //获取有效闪屏配置
- rpc GetInfo(GetInfoReq) returns (GetInfoResp);
- }
- service Banner {
- //获取有效banner配置
- rpc GetBlinkBanner(GetInfoReq) returns (GetInfoResp);
- //获取有效banner配置
- rpc GetBanner(GetBannerReq) returns (GetBannerResp);
- }
|