Compare commits
3 Commits
39ca08605e
...
b35278771e
| Author | SHA1 | Date | |
|---|---|---|---|
| b35278771e | |||
| 4dba6c7669 | |||
| 8271683614 |
@ -1012,7 +1012,7 @@ type UpdateWorkVideoReq struct {
|
||||
ArtistName string `protobuf:"bytes,15,opt,name=artistName,proto3" json:"artistName"`
|
||||
ArtistPhoneAreaCode string `protobuf:"bytes,16,opt,name=artistPhoneAreaCode,proto3" json:"artistPhoneAreaCode"`
|
||||
Source uint32 `protobuf:"varint,17,opt,name=source,proto3" json:"source"`
|
||||
CoverTimestampMs uint32 `protobuf:"varint,18,opt,name=coverTimestampMs,proto3" json:"coverTimestampMs"`
|
||||
CoverTimestampMs uint64 `protobuf:"varint,18,opt,name=coverTimestampMs,proto3" json:"coverTimestampMs"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@ -1166,7 +1166,7 @@ func (x *UpdateWorkVideoReq) GetSource() uint32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UpdateWorkVideoReq) GetCoverTimestampMs() uint32 {
|
||||
func (x *UpdateWorkVideoReq) GetCoverTimestampMs() uint64 {
|
||||
if x != nil {
|
||||
return x.CoverTimestampMs
|
||||
}
|
||||
@ -1580,6 +1580,7 @@ type WorkDetailResp struct {
|
||||
WorkLogData []*WorkLogInfo `protobuf:"bytes,15,rep,name=WorkLogData,proto3" json:"WorkLogData"`
|
||||
WorkCategory uint32 `protobuf:"varint,16,opt,name=workCategory,proto3" json:"workCategory"`
|
||||
MediaAccData map[string]*MediaUserInfo `protobuf:"bytes,17,rep,name=mediaAccData,proto3" json:"mediaAccData" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
CoverTimestampMs uint64 `protobuf:"varint,18,opt,name=coverTimestampMs,proto3" json:"coverTimestampMs"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@ -1733,6 +1734,13 @@ func (x *WorkDetailResp) GetMediaAccData() map[string]*MediaUserInfo {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *WorkDetailResp) GetCoverTimestampMs() uint64 {
|
||||
if x != nil {
|
||||
return x.CoverTimestampMs
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type UpdateStatusReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
WorkAction WorkActionENUM `protobuf:"varint,1,opt,name=workAction,proto3,enum=Cast.WorkActionENUM" json:"workAction"`
|
||||
@ -2694,6 +2702,134 @@ func (x *RefreshTokenResp) GetAccessToken() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
type PublishMediaInfoReq struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
WorkUuid string `protobuf:"bytes,1,opt,name=workUuid,proto3" json:"workUuid"`
|
||||
PlatformID int32 `protobuf:"varint,2,opt,name=platformID,proto3" json:"platformID"`
|
||||
PlatformMediaUuid string `protobuf:"bytes,3,opt,name=platformMediaUuid,proto3" json:"platformMediaUuid"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *PublishMediaInfoReq) Reset() {
|
||||
*x = PublishMediaInfoReq{}
|
||||
mi := &file_pb_fiee_cast_proto_msgTypes[36]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *PublishMediaInfoReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PublishMediaInfoReq) ProtoMessage() {}
|
||||
|
||||
func (x *PublishMediaInfoReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pb_fiee_cast_proto_msgTypes[36]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PublishMediaInfoReq.ProtoReflect.Descriptor instead.
|
||||
func (*PublishMediaInfoReq) Descriptor() ([]byte, []int) {
|
||||
return file_pb_fiee_cast_proto_rawDescGZIP(), []int{36}
|
||||
}
|
||||
|
||||
func (x *PublishMediaInfoReq) GetWorkUuid() string {
|
||||
if x != nil {
|
||||
return x.WorkUuid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PublishMediaInfoReq) GetPlatformID() int32 {
|
||||
if x != nil {
|
||||
return x.PlatformID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PublishMediaInfoReq) GetPlatformMediaUuid() string {
|
||||
if x != nil {
|
||||
return x.PlatformMediaUuid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type PublishMediaInfoResp struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
WorkUuid string `protobuf:"bytes,1,opt,name=workUuid,proto3" json:"workUuid"`
|
||||
PlatformID int32 `protobuf:"varint,2,opt,name=platformID,proto3" json:"platformID"`
|
||||
PlatformMediaUuid string `protobuf:"bytes,3,opt,name=platformMediaUuid,proto3" json:"platformMediaUuid"`
|
||||
Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *PublishMediaInfoResp) Reset() {
|
||||
*x = PublishMediaInfoResp{}
|
||||
mi := &file_pb_fiee_cast_proto_msgTypes[37]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *PublishMediaInfoResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PublishMediaInfoResp) ProtoMessage() {}
|
||||
|
||||
func (x *PublishMediaInfoResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pb_fiee_cast_proto_msgTypes[37]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PublishMediaInfoResp.ProtoReflect.Descriptor instead.
|
||||
func (*PublishMediaInfoResp) Descriptor() ([]byte, []int) {
|
||||
return file_pb_fiee_cast_proto_rawDescGZIP(), []int{37}
|
||||
}
|
||||
|
||||
func (x *PublishMediaInfoResp) GetWorkUuid() string {
|
||||
if x != nil {
|
||||
return x.WorkUuid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PublishMediaInfoResp) GetPlatformID() int32 {
|
||||
if x != nil {
|
||||
return x.PlatformID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PublishMediaInfoResp) GetPlatformMediaUuid() string {
|
||||
if x != nil {
|
||||
return x.PlatformMediaUuid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PublishMediaInfoResp) GetInfo() string {
|
||||
if x != nil {
|
||||
return x.Info
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type WorkListResp_Info struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
WorkUuid string `protobuf:"bytes,1,opt,name=workUuid,proto3" json:"workUuid"`
|
||||
@ -2716,7 +2852,7 @@ type WorkListResp_Info struct {
|
||||
|
||||
func (x *WorkListResp_Info) Reset() {
|
||||
*x = WorkListResp_Info{}
|
||||
mi := &file_pb_fiee_cast_proto_msgTypes[36]
|
||||
mi := &file_pb_fiee_cast_proto_msgTypes[38]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -2728,7 +2864,7 @@ func (x *WorkListResp_Info) String() string {
|
||||
func (*WorkListResp_Info) ProtoMessage() {}
|
||||
|
||||
func (x *WorkListResp_Info) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pb_fiee_cast_proto_msgTypes[36]
|
||||
mi := &file_pb_fiee_cast_proto_msgTypes[38]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -2856,7 +2992,7 @@ type MediaAccountsResp_Info struct {
|
||||
|
||||
func (x *MediaAccountsResp_Info) Reset() {
|
||||
*x = MediaAccountsResp_Info{}
|
||||
mi := &file_pb_fiee_cast_proto_msgTypes[38]
|
||||
mi := &file_pb_fiee_cast_proto_msgTypes[40]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -2868,7 +3004,7 @@ func (x *MediaAccountsResp_Info) String() string {
|
||||
func (*MediaAccountsResp_Info) ProtoMessage() {}
|
||||
|
||||
func (x *MediaAccountsResp_Info) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pb_fiee_cast_proto_msgTypes[38]
|
||||
mi := &file_pb_fiee_cast_proto_msgTypes[40]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -2944,7 +3080,7 @@ type MediaWorksResp_Info struct {
|
||||
|
||||
func (x *MediaWorksResp_Info) Reset() {
|
||||
*x = MediaWorksResp_Info{}
|
||||
mi := &file_pb_fiee_cast_proto_msgTypes[39]
|
||||
mi := &file_pb_fiee_cast_proto_msgTypes[41]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -2956,7 +3092,7 @@ func (x *MediaWorksResp_Info) String() string {
|
||||
func (*MediaWorksResp_Info) ProtoMessage() {}
|
||||
|
||||
func (x *MediaWorksResp_Info) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pb_fiee_cast_proto_msgTypes[39]
|
||||
mi := &file_pb_fiee_cast_proto_msgTypes[41]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -3166,7 +3302,7 @@ const file_pb_fiee_cast_proto_rawDesc = "" +
|
||||
"artistName\x120\n" +
|
||||
"\x13artistPhoneAreaCode\x18\x10 \x01(\tR\x13artistPhoneAreaCode\x12\x16\n" +
|
||||
"\x06source\x18\x11 \x01(\rR\x06source\x12*\n" +
|
||||
"\x10coverTimestampMs\x18\x12 \x01(\rR\x10coverTimestampMs\"1\n" +
|
||||
"\x10coverTimestampMs\x18\x12 \x01(\x04R\x10coverTimestampMs\"1\n" +
|
||||
"\x13UpdateWorkVideoResp\x12\x1a\n" +
|
||||
"\bworkUuid\x18\x01 \x01(\tR\bworkUuid\"\x8f\x04\n" +
|
||||
"\vWorkListReq\x12\x1c\n" +
|
||||
@ -3232,7 +3368,7 @@ const file_pb_fiee_cast_proto_rawDesc = "" +
|
||||
"\textraData\x18\a \x01(\tR\textraData\x12\x1e\n" +
|
||||
"\n" +
|
||||
"workStatus\x18\b \x01(\rR\n" +
|
||||
"workStatus\"\x9c\x06\n" +
|
||||
"workStatus\"\xc8\x06\n" +
|
||||
"\x0eWorkDetailResp\x12\x1a\n" +
|
||||
"\bworkUuid\x18\x01 \x01(\tR\bworkUuid\x12\x14\n" +
|
||||
"\x05title\x18\x02 \x01(\tR\x05title\x12\x18\n" +
|
||||
@ -3255,7 +3391,8 @@ const file_pb_fiee_cast_proto_rawDesc = "" +
|
||||
"approvalID\x123\n" +
|
||||
"\vWorkLogData\x18\x0f \x03(\v2\x11.Cast.WorkLogInfoR\vWorkLogData\x12\"\n" +
|
||||
"\fworkCategory\x18\x10 \x01(\rR\fworkCategory\x12J\n" +
|
||||
"\fmediaAccData\x18\x11 \x03(\v2&.Cast.WorkDetailResp.MediaAccDataEntryR\fmediaAccData\x1aT\n" +
|
||||
"\fmediaAccData\x18\x11 \x03(\v2&.Cast.WorkDetailResp.MediaAccDataEntryR\fmediaAccData\x12*\n" +
|
||||
"\x10coverTimestampMs\x18\x12 \x01(\x04R\x10coverTimestampMs\x1aT\n" +
|
||||
"\x11MediaAccDataEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12)\n" +
|
||||
"\x05value\x18\x02 \x01(\v2\x13.Cast.MediaUserInfoR\x05value:\x028\x01\"\xf5\x01\n" +
|
||||
@ -3363,7 +3500,20 @@ const file_pb_fiee_cast_proto_rawDesc = "" +
|
||||
"platformID\x12\x16\n" +
|
||||
"\x06userID\x18\x03 \x01(\tR\x06userID\"4\n" +
|
||||
"\x10RefreshTokenResp\x12 \n" +
|
||||
"\vaccessToken\x18\x01 \x01(\tR\vaccessToken*G\n" +
|
||||
"\vaccessToken\x18\x01 \x01(\tR\vaccessToken\"\x7f\n" +
|
||||
"\x13PublishMediaInfoReq\x12\x1a\n" +
|
||||
"\bworkUuid\x18\x01 \x01(\tR\bworkUuid\x12\x1e\n" +
|
||||
"\n" +
|
||||
"platformID\x18\x02 \x01(\x05R\n" +
|
||||
"platformID\x12,\n" +
|
||||
"\x11platformMediaUuid\x18\x03 \x01(\tR\x11platformMediaUuid\"\x94\x01\n" +
|
||||
"\x14PublishMediaInfoResp\x12\x1a\n" +
|
||||
"\bworkUuid\x18\x01 \x01(\tR\bworkUuid\x12\x1e\n" +
|
||||
"\n" +
|
||||
"platformID\x18\x02 \x01(\x05R\n" +
|
||||
"platformID\x12,\n" +
|
||||
"\x11platformMediaUuid\x18\x03 \x01(\tR\x11platformMediaUuid\x12\x12\n" +
|
||||
"\x04info\x18\x04 \x01(\tR\x04info*G\n" +
|
||||
"\x0ePlatformIDENUM\x12\v\n" +
|
||||
"\aUNKNOWN\x10\x00\x12\n" +
|
||||
"\n" +
|
||||
@ -3377,7 +3527,7 @@ const file_pb_fiee_cast_proto_rawDesc = "" +
|
||||
"\bAPPROVAL\x10\x02\x12\x11\n" +
|
||||
"\rAPPROVAL_PASS\x10\x03\x12\x13\n" +
|
||||
"\x0fAPPROVAL_REJECT\x10\x04\x12\x13\n" +
|
||||
"\x0fAPPROVAL_DELETE\x10\x052\x91\t\n" +
|
||||
"\x0fAPPROVAL_DELETE\x10\x052\xde\t\n" +
|
||||
"\x04Cast\x12B\n" +
|
||||
"\rMediaUserList\x12\x16.Cast.MediaUserListReq\x1a\x17.Cast.MediaUserListResp\"\x00\x12Q\n" +
|
||||
"\x12UpdateMediaAccount\x12\x1b.Cast.UpdateMediaAccountReq\x1a\x1c.Cast.UpdateMediaAccountResp\"\x00\x12B\n" +
|
||||
@ -3397,7 +3547,8 @@ const file_pb_fiee_cast_proto_rawDesc = "" +
|
||||
"\bWorkInfo\x12\x11.Cast.WorkInfoReq\x1a\x12.Cast.WorkInfoResp\"\x00\x12?\n" +
|
||||
"\fOAuthAccount\x12\x15.Cast.OAuthAccountReq\x1a\x16.Cast.OAuthAccountResp\"\x00\x12K\n" +
|
||||
"\x10OAuthCodeToToken\x12\x19.Cast.OAuthCodeToTokenReq\x1a\x1a.Cast.OAuthCodeToTokenResp\"\x00\x12?\n" +
|
||||
"\fRefreshToken\x12\x15.Cast.RefreshTokenReq\x1a\x16.Cast.RefreshTokenResp\"\x00\x128\n" +
|
||||
"\fRefreshToken\x12\x15.Cast.RefreshTokenReq\x1a\x16.Cast.RefreshTokenResp\"\x00\x12K\n" +
|
||||
"\x10PublishMediaInfo\x12\x19.Cast.PublishMediaInfoReq\x1a\x1a.Cast.PublishMediaInfoResp\"\x00\x128\n" +
|
||||
"\x04Test\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"\x00B\rZ\v./cast;castb\x06proto3"
|
||||
|
||||
var (
|
||||
@ -3413,7 +3564,7 @@ func file_pb_fiee_cast_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_pb_fiee_cast_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_pb_fiee_cast_proto_msgTypes = make([]protoimpl.MessageInfo, 40)
|
||||
var file_pb_fiee_cast_proto_msgTypes = make([]protoimpl.MessageInfo, 42)
|
||||
var file_pb_fiee_cast_proto_goTypes = []any{
|
||||
(PlatformIDENUM)(0), // 0: Cast.PlatformIDENUM
|
||||
(WorkActionENUM)(0), // 1: Cast.WorkActionENUM
|
||||
@ -3453,11 +3604,13 @@ var file_pb_fiee_cast_proto_goTypes = []any{
|
||||
(*OAuthCodeToTokenResp)(nil), // 35: Cast.OAuthCodeToTokenResp
|
||||
(*RefreshTokenReq)(nil), // 36: Cast.RefreshTokenReq
|
||||
(*RefreshTokenResp)(nil), // 37: Cast.RefreshTokenResp
|
||||
(*WorkListResp_Info)(nil), // 38: Cast.WorkListResp.Info
|
||||
nil, // 39: Cast.WorkDetailResp.MediaAccDataEntry
|
||||
(*MediaAccountsResp_Info)(nil), // 40: Cast.MediaAccountsResp.Info
|
||||
(*MediaWorksResp_Info)(nil), // 41: Cast.MediaWorksResp.Info
|
||||
(*emptypb.Empty)(nil), // 42: google.protobuf.Empty
|
||||
(*PublishMediaInfoReq)(nil), // 38: Cast.PublishMediaInfoReq
|
||||
(*PublishMediaInfoResp)(nil), // 39: Cast.PublishMediaInfoResp
|
||||
(*WorkListResp_Info)(nil), // 40: Cast.WorkListResp.Info
|
||||
nil, // 41: Cast.WorkDetailResp.MediaAccDataEntry
|
||||
(*MediaAccountsResp_Info)(nil), // 42: Cast.MediaAccountsResp.Info
|
||||
(*MediaWorksResp_Info)(nil), // 43: Cast.MediaWorksResp.Info
|
||||
(*emptypb.Empty)(nil), // 44: google.protobuf.Empty
|
||||
}
|
||||
var file_pb_fiee_cast_proto_depIdxs = []int32{
|
||||
0, // 0: Cast.MediaUserListReq.platformID:type_name -> Cast.PlatformIDENUM
|
||||
@ -3472,15 +3625,15 @@ var file_pb_fiee_cast_proto_depIdxs = []int32{
|
||||
12, // 9: Cast.UpdateWorkVideoReq.publishConfig1:type_name -> Cast.PublishConfig
|
||||
12, // 10: Cast.UpdateWorkVideoReq.publishConfig2:type_name -> Cast.PublishConfig
|
||||
12, // 11: Cast.UpdateWorkVideoReq.publishConfig3:type_name -> Cast.PublishConfig
|
||||
38, // 12: Cast.WorkListResp.data:type_name -> Cast.WorkListResp.Info
|
||||
40, // 12: Cast.WorkListResp.data:type_name -> Cast.WorkListResp.Info
|
||||
12, // 13: Cast.WorkDetailResp.publishConfig1:type_name -> Cast.PublishConfig
|
||||
12, // 14: Cast.WorkDetailResp.publishConfig2:type_name -> Cast.PublishConfig
|
||||
12, // 15: Cast.WorkDetailResp.publishConfig3:type_name -> Cast.PublishConfig
|
||||
18, // 16: Cast.WorkDetailResp.WorkLogData:type_name -> Cast.WorkLogInfo
|
||||
39, // 17: Cast.WorkDetailResp.mediaAccData:type_name -> Cast.WorkDetailResp.MediaAccDataEntry
|
||||
41, // 17: Cast.WorkDetailResp.mediaAccData:type_name -> Cast.WorkDetailResp.MediaAccDataEntry
|
||||
1, // 18: Cast.UpdateStatusReq.workAction:type_name -> Cast.WorkActionENUM
|
||||
40, // 19: Cast.MediaAccountsResp.data:type_name -> Cast.MediaAccountsResp.Info
|
||||
41, // 20: Cast.MediaWorksResp.data:type_name -> Cast.MediaWorksResp.Info
|
||||
42, // 19: Cast.MediaAccountsResp.data:type_name -> Cast.MediaAccountsResp.Info
|
||||
43, // 20: Cast.MediaWorksResp.data:type_name -> Cast.MediaWorksResp.Info
|
||||
0, // 21: Cast.OAuthCodeToTokenReq.platformID:type_name -> Cast.PlatformIDENUM
|
||||
0, // 22: Cast.RefreshTokenReq.platformID:type_name -> Cast.PlatformIDENUM
|
||||
3, // 23: Cast.WorkDetailResp.MediaAccDataEntry.value:type_name -> Cast.MediaUserInfo
|
||||
@ -3501,27 +3654,29 @@ var file_pb_fiee_cast_proto_depIdxs = []int32{
|
||||
30, // 38: Cast.Cast.OAuthAccount:input_type -> Cast.OAuthAccountReq
|
||||
34, // 39: Cast.Cast.OAuthCodeToToken:input_type -> Cast.OAuthCodeToTokenReq
|
||||
36, // 40: Cast.Cast.RefreshToken:input_type -> Cast.RefreshTokenReq
|
||||
42, // 41: Cast.Cast.Test:input_type -> google.protobuf.Empty
|
||||
4, // 42: Cast.Cast.MediaUserList:output_type -> Cast.MediaUserListResp
|
||||
6, // 43: Cast.Cast.UpdateMediaAccount:output_type -> Cast.UpdateMediaAccountResp
|
||||
8, // 44: Cast.Cast.UnbindManager:output_type -> Cast.UnbindManagerResp
|
||||
42, // 45: Cast.Cast.BindManager:output_type -> google.protobuf.Empty
|
||||
11, // 46: Cast.Cast.UpdateWorkImage:output_type -> Cast.UpdateWorkImageResp
|
||||
14, // 47: Cast.Cast.UpdateWorkVideo:output_type -> Cast.UpdateWorkVideoResp
|
||||
16, // 48: Cast.Cast.WorkList:output_type -> Cast.WorkListResp
|
||||
19, // 49: Cast.Cast.WorkDetail:output_type -> Cast.WorkDetailResp
|
||||
42, // 50: Cast.Cast.UpdateStatus:output_type -> google.protobuf.Empty
|
||||
22, // 51: Cast.Cast.MediaAccounts:output_type -> Cast.MediaAccountsResp
|
||||
24, // 52: Cast.Cast.MediaWorks:output_type -> Cast.MediaWorksResp
|
||||
26, // 53: Cast.Cast.RePublish:output_type -> Cast.RePublishResp
|
||||
42, // 54: Cast.Cast.DelWork:output_type -> google.protobuf.Empty
|
||||
29, // 55: Cast.Cast.WorkInfo:output_type -> Cast.WorkInfoResp
|
||||
31, // 56: Cast.Cast.OAuthAccount:output_type -> Cast.OAuthAccountResp
|
||||
35, // 57: Cast.Cast.OAuthCodeToToken:output_type -> Cast.OAuthCodeToTokenResp
|
||||
37, // 58: Cast.Cast.RefreshToken:output_type -> Cast.RefreshTokenResp
|
||||
42, // 59: Cast.Cast.Test:output_type -> google.protobuf.Empty
|
||||
42, // [42:60] is the sub-list for method output_type
|
||||
24, // [24:42] is the sub-list for method input_type
|
||||
38, // 41: Cast.Cast.PublishMediaInfo:input_type -> Cast.PublishMediaInfoReq
|
||||
44, // 42: Cast.Cast.Test:input_type -> google.protobuf.Empty
|
||||
4, // 43: Cast.Cast.MediaUserList:output_type -> Cast.MediaUserListResp
|
||||
6, // 44: Cast.Cast.UpdateMediaAccount:output_type -> Cast.UpdateMediaAccountResp
|
||||
8, // 45: Cast.Cast.UnbindManager:output_type -> Cast.UnbindManagerResp
|
||||
44, // 46: Cast.Cast.BindManager:output_type -> google.protobuf.Empty
|
||||
11, // 47: Cast.Cast.UpdateWorkImage:output_type -> Cast.UpdateWorkImageResp
|
||||
14, // 48: Cast.Cast.UpdateWorkVideo:output_type -> Cast.UpdateWorkVideoResp
|
||||
16, // 49: Cast.Cast.WorkList:output_type -> Cast.WorkListResp
|
||||
19, // 50: Cast.Cast.WorkDetail:output_type -> Cast.WorkDetailResp
|
||||
44, // 51: Cast.Cast.UpdateStatus:output_type -> google.protobuf.Empty
|
||||
22, // 52: Cast.Cast.MediaAccounts:output_type -> Cast.MediaAccountsResp
|
||||
24, // 53: Cast.Cast.MediaWorks:output_type -> Cast.MediaWorksResp
|
||||
26, // 54: Cast.Cast.RePublish:output_type -> Cast.RePublishResp
|
||||
44, // 55: Cast.Cast.DelWork:output_type -> google.protobuf.Empty
|
||||
29, // 56: Cast.Cast.WorkInfo:output_type -> Cast.WorkInfoResp
|
||||
31, // 57: Cast.Cast.OAuthAccount:output_type -> Cast.OAuthAccountResp
|
||||
35, // 58: Cast.Cast.OAuthCodeToToken:output_type -> Cast.OAuthCodeToTokenResp
|
||||
37, // 59: Cast.Cast.RefreshToken:output_type -> Cast.RefreshTokenResp
|
||||
39, // 60: Cast.Cast.PublishMediaInfo:output_type -> Cast.PublishMediaInfoResp
|
||||
44, // 61: Cast.Cast.Test:output_type -> google.protobuf.Empty
|
||||
43, // [43:62] is the sub-list for method output_type
|
||||
24, // [24:43] is the sub-list for method input_type
|
||||
24, // [24:24] is the sub-list for extension type_name
|
||||
24, // [24:24] is the sub-list for extension extendee
|
||||
0, // [0:24] is the sub-list for field type_name
|
||||
@ -3538,7 +3693,7 @@ func file_pb_fiee_cast_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_pb_fiee_cast_proto_rawDesc), len(file_pb_fiee_cast_proto_rawDesc)),
|
||||
NumEnums: 2,
|
||||
NumMessages: 40,
|
||||
NumMessages: 42,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
@ -2392,6 +2392,8 @@ func (m *WorkDetailResp) validate(all bool) error {
|
||||
}
|
||||
}
|
||||
|
||||
// no validation rules for CoverTimestampMs
|
||||
|
||||
if len(errors) > 0 {
|
||||
return WorkDetailRespMultiError(errors)
|
||||
}
|
||||
@ -4414,6 +4416,224 @@ var _ interface {
|
||||
ErrorName() string
|
||||
} = RefreshTokenRespValidationError{}
|
||||
|
||||
// Validate checks the field values on PublishMediaInfoReq with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, the first error encountered is returned, or nil if there are no violations.
|
||||
func (m *PublishMediaInfoReq) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on PublishMediaInfoReq with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, the result is a list of violation errors wrapped in
|
||||
// PublishMediaInfoReqMultiError, or nil if none found.
|
||||
func (m *PublishMediaInfoReq) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *PublishMediaInfoReq) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
// no validation rules for WorkUuid
|
||||
|
||||
// no validation rules for PlatformID
|
||||
|
||||
// no validation rules for PlatformMediaUuid
|
||||
|
||||
if len(errors) > 0 {
|
||||
return PublishMediaInfoReqMultiError(errors)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// PublishMediaInfoReqMultiError is an error wrapping multiple validation
|
||||
// errors returned by PublishMediaInfoReq.ValidateAll() if the designated
|
||||
// constraints aren't met.
|
||||
type PublishMediaInfoReqMultiError []error
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m PublishMediaInfoReqMultiError) Error() string {
|
||||
msgs := make([]string, 0, len(m))
|
||||
for _, err := range m {
|
||||
msgs = append(msgs, err.Error())
|
||||
}
|
||||
return strings.Join(msgs, "; ")
|
||||
}
|
||||
|
||||
// AllErrors returns a list of validation violation errors.
|
||||
func (m PublishMediaInfoReqMultiError) AllErrors() []error { return m }
|
||||
|
||||
// PublishMediaInfoReqValidationError is the validation error returned by
|
||||
// PublishMediaInfoReq.Validate if the designated constraints aren't met.
|
||||
type PublishMediaInfoReqValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e PublishMediaInfoReqValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e PublishMediaInfoReqValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e PublishMediaInfoReqValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e PublishMediaInfoReqValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e PublishMediaInfoReqValidationError) ErrorName() string {
|
||||
return "PublishMediaInfoReqValidationError"
|
||||
}
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e PublishMediaInfoReqValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sPublishMediaInfoReq.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = PublishMediaInfoReqValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = PublishMediaInfoReqValidationError{}
|
||||
|
||||
// Validate checks the field values on PublishMediaInfoResp with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, the first error encountered is returned, or nil if there are no violations.
|
||||
func (m *PublishMediaInfoResp) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on PublishMediaInfoResp with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, the result is a list of violation errors wrapped in
|
||||
// PublishMediaInfoRespMultiError, or nil if none found.
|
||||
func (m *PublishMediaInfoResp) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *PublishMediaInfoResp) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
// no validation rules for WorkUuid
|
||||
|
||||
// no validation rules for PlatformID
|
||||
|
||||
// no validation rules for PlatformMediaUuid
|
||||
|
||||
// no validation rules for Info
|
||||
|
||||
if len(errors) > 0 {
|
||||
return PublishMediaInfoRespMultiError(errors)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// PublishMediaInfoRespMultiError is an error wrapping multiple validation
|
||||
// errors returned by PublishMediaInfoResp.ValidateAll() if the designated
|
||||
// constraints aren't met.
|
||||
type PublishMediaInfoRespMultiError []error
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m PublishMediaInfoRespMultiError) Error() string {
|
||||
msgs := make([]string, 0, len(m))
|
||||
for _, err := range m {
|
||||
msgs = append(msgs, err.Error())
|
||||
}
|
||||
return strings.Join(msgs, "; ")
|
||||
}
|
||||
|
||||
// AllErrors returns a list of validation violation errors.
|
||||
func (m PublishMediaInfoRespMultiError) AllErrors() []error { return m }
|
||||
|
||||
// PublishMediaInfoRespValidationError is the validation error returned by
|
||||
// PublishMediaInfoResp.Validate if the designated constraints aren't met.
|
||||
type PublishMediaInfoRespValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e PublishMediaInfoRespValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e PublishMediaInfoRespValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e PublishMediaInfoRespValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e PublishMediaInfoRespValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e PublishMediaInfoRespValidationError) ErrorName() string {
|
||||
return "PublishMediaInfoRespValidationError"
|
||||
}
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e PublishMediaInfoRespValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sPublishMediaInfoResp.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = PublishMediaInfoRespValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = PublishMediaInfoRespValidationError{}
|
||||
|
||||
// Validate checks the field values on WorkListResp_Info with the rules defined
|
||||
// in the proto definition for this message. If any rules are violated, the
|
||||
// first error encountered is returned, or nil if there are no violations.
|
||||
|
||||
@ -46,6 +46,7 @@ type CastClient interface {
|
||||
OAuthAccount(ctx context.Context, in *OAuthAccountReq, opts ...grpc_go.CallOption) (*OAuthAccountResp, common.ErrorWithAttachment)
|
||||
OAuthCodeToToken(ctx context.Context, in *OAuthCodeToTokenReq, opts ...grpc_go.CallOption) (*OAuthCodeToTokenResp, common.ErrorWithAttachment)
|
||||
RefreshToken(ctx context.Context, in *RefreshTokenReq, opts ...grpc_go.CallOption) (*RefreshTokenResp, common.ErrorWithAttachment)
|
||||
PublishMediaInfo(ctx context.Context, in *PublishMediaInfoReq, opts ...grpc_go.CallOption) (*PublishMediaInfoResp, common.ErrorWithAttachment)
|
||||
Test(ctx context.Context, in *emptypb.Empty, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment)
|
||||
}
|
||||
|
||||
@ -71,6 +72,7 @@ type CastClientImpl struct {
|
||||
OAuthAccount func(ctx context.Context, in *OAuthAccountReq) (*OAuthAccountResp, error)
|
||||
OAuthCodeToToken func(ctx context.Context, in *OAuthCodeToTokenReq) (*OAuthCodeToTokenResp, error)
|
||||
RefreshToken func(ctx context.Context, in *RefreshTokenReq) (*RefreshTokenResp, error)
|
||||
PublishMediaInfo func(ctx context.Context, in *PublishMediaInfoReq) (*PublishMediaInfoResp, error)
|
||||
Test func(ctx context.Context, in *emptypb.Empty) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
@ -188,6 +190,12 @@ func (c *castClient) RefreshToken(ctx context.Context, in *RefreshTokenReq, opts
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/RefreshToken", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) PublishMediaInfo(ctx context.Context, in *PublishMediaInfoReq, opts ...grpc_go.CallOption) (*PublishMediaInfoResp, common.ErrorWithAttachment) {
|
||||
out := new(PublishMediaInfoResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/PublishMediaInfo", in, out)
|
||||
}
|
||||
|
||||
func (c *castClient) Test(ctx context.Context, in *emptypb.Empty, opts ...grpc_go.CallOption) (*emptypb.Empty, common.ErrorWithAttachment) {
|
||||
out := new(emptypb.Empty)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -215,6 +223,7 @@ type CastServer interface {
|
||||
OAuthAccount(context.Context, *OAuthAccountReq) (*OAuthAccountResp, error)
|
||||
OAuthCodeToToken(context.Context, *OAuthCodeToTokenReq) (*OAuthCodeToTokenResp, error)
|
||||
RefreshToken(context.Context, *RefreshTokenReq) (*RefreshTokenResp, error)
|
||||
PublishMediaInfo(context.Context, *PublishMediaInfoReq) (*PublishMediaInfoResp, error)
|
||||
Test(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
|
||||
mustEmbedUnimplementedCastServer()
|
||||
}
|
||||
@ -275,6 +284,9 @@ func (UnimplementedCastServer) OAuthCodeToToken(context.Context, *OAuthCodeToTok
|
||||
func (UnimplementedCastServer) RefreshToken(context.Context, *RefreshTokenReq) (*RefreshTokenResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RefreshToken not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) PublishMediaInfo(context.Context, *PublishMediaInfoReq) (*PublishMediaInfoResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method PublishMediaInfo not implemented")
|
||||
}
|
||||
func (UnimplementedCastServer) Test(context.Context, *emptypb.Empty) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Test not implemented")
|
||||
}
|
||||
@ -799,6 +811,35 @@ func _Cast_RefreshToken_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_PublishMediaInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PublishMediaInfoReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("PublishMediaInfo", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Cast_Test_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(emptypb.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
@ -903,6 +944,10 @@ var Cast_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "RefreshToken",
|
||||
Handler: _Cast_RefreshToken_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "PublishMediaInfo",
|
||||
Handler: _Cast_PublishMediaInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Test",
|
||||
Handler: _Cast_Test_Handler,
|
||||
|
||||
@ -4,10 +4,11 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/pkg/common"
|
||||
"github.com/BurntSushi/toml"
|
||||
"gopkg.in/ini.v1"
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"github.com/BurntSushi/toml"
|
||||
"gopkg.in/ini.v1"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -117,6 +118,7 @@ type System struct {
|
||||
Domain string
|
||||
ErpHost string
|
||||
FieeHost string
|
||||
AuthRedirectUrl string
|
||||
}
|
||||
type Oss struct {
|
||||
AccessKeyId string
|
||||
|
||||
@ -6,6 +6,8 @@ Host = "https://common.szjixun.cn"
|
||||
RedirectUri = "/api/redirect/url"
|
||||
ErpHost = "http://114.218.158.24:9020"
|
||||
FieeHost = "http://114.218.158.24:9020"
|
||||
AuthRedirectUrl = "http://172.16.100.99:9028/media_account"
|
||||
|
||||
[bos]
|
||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||
|
||||
@ -6,6 +6,7 @@ Host = "https://common.szjixun.cn"
|
||||
RedirectUri = "/api/redirect/url"
|
||||
ErpHost = "https://erpapi.fontree.cn"
|
||||
FieeHost = "https://erpapi.fiee.com"
|
||||
AuthRedirectUrl = "https://erp.fiee.com/media_account"
|
||||
[bos]
|
||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||
|
||||
@ -6,6 +6,7 @@ Host = "https://common.szjixun.cn"
|
||||
RedirectUri = "/api/redirect/url"
|
||||
ErpHost = "http://114.218.158.24:9020"
|
||||
FieeHost = "https://saas-test.szjixun.cn"
|
||||
AuthRedirectUrl = "http://172.16.100.99:9028/media_account"
|
||||
[bos]
|
||||
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
|
||||
Sk = "d2ecaa9d75114d3b9f42b99014198306"
|
||||
|
||||
@ -38,6 +38,7 @@ func MediaRouter(r *gin.RouterGroup) {
|
||||
work.POST("republish", serviceCast.RePublish)
|
||||
work.POST("delete", serviceCast.DelWork)
|
||||
work.POST("remind", serviceCast.Remind)
|
||||
work.POST("publish-info", serviceCast.PublishInfo)
|
||||
}
|
||||
|
||||
social := noAuth.Group("social")
|
||||
|
||||
@ -3,6 +3,7 @@ package cast
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/accountFiee"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/api/cast"
|
||||
@ -10,6 +11,7 @@ import (
|
||||
"fonchain-fiee/pkg/e"
|
||||
modelCast "fonchain-fiee/pkg/model/cast"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
|
||||
@ -212,15 +214,19 @@ func OAuth2Callback(ctx *gin.Context) {
|
||||
service.Error(ctx, errors.New(e.GetMsg(e.InvalidParams)))
|
||||
return
|
||||
}
|
||||
resp, err := service.CastProvider.OAuthCodeToToken(ctx, req)
|
||||
_, err := service.CastProvider.OAuthCodeToToken(ctx, req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
fmt.Println(fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=0"))
|
||||
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=0"))
|
||||
return
|
||||
}
|
||||
service.Success(ctx, map[string]interface{}{
|
||||
"req": req,
|
||||
"resp": resp,
|
||||
})
|
||||
// TODO 跳转到前端页面
|
||||
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=1"))
|
||||
//service.Success(ctx, map[string]interface{}{
|
||||
// "req": req,
|
||||
// "resp": resp,
|
||||
//})
|
||||
|
||||
return
|
||||
}
|
||||
func RefreshToken(ctx *gin.Context) {
|
||||
|
||||
@ -364,3 +364,20 @@ func Remind(ctx *gin.Context) {
|
||||
service.Success(ctx, nil)
|
||||
return
|
||||
}
|
||||
|
||||
func PublishInfo(ctx *gin.Context) {
|
||||
var req *cast.PublishMediaInfoReq
|
||||
var resp *cast.PublishMediaInfoResp
|
||||
var err error
|
||||
if err = ctx.ShouldBind(&req); err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
resp, err = service.CastProvider.PublishMediaInfo(context.Background(), req)
|
||||
if err != nil {
|
||||
service.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
service.Success(ctx, resp)
|
||||
return
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user