Compare commits

..

No commits in common. "main" and "feat-zjy-fixbug-006" have entirely different histories.

130 changed files with 9634 additions and 81481 deletions

View File

@ -1,25 +0,0 @@
## 测试服后台
http://121.229.45.214:9028/
13580848136
17315042007 测试-陆嘉骅2 视频
13196788678 Aa.123456 脚本
测试h5
## https://saas-test.szjixun.cn
测试后台
http://saas-erp.test.fontree.cn:8081/release_management
## 正式h5
https://saas.fiee.com
## 后台
https://erp.fiee.com/older_list
13580848136
Aa.123456

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@
syntax = "proto3";
package accountFiee;
import "api/accountFiee/validator.proto";
import "github.com/mwitkow/go-proto-validators@v0.3.2/validator.proto";
option go_package = "./;accountFiee";
//protoc -I . -I C:\Users\lenovo\go\src --go_out=. --go-triple_out=. ./accountFiee.proto
@ -43,7 +43,6 @@ service AccountFiee {
rpc DecryptJwt (DecryptJwtRequest) returns (DecryptJwtResponse) {}//
rpc Info (InfoRequest) returns (UserInfoResponse) {}
rpc JobNumGetInfo (JobNumGetInfoRequest) returns (InfoResponse) {}
rpc SubNumGetInfo (SubNumGetInfoRequest) returns (UserInfoResponse) {}
rpc List (ListRequest) returns (ListResponse) {}
rpc RandList (ListRequest) returns (ListResponse) {}
rpc ListByIDs (ListByIDsRequest) returns (ListResponse) {}
@ -180,9 +179,6 @@ message UserListInfo{
string language = 18;
string subscriberNumber = 19;
string nickName = 20;
string idNumber = 21;
string dateOfBirth = 22;
string age = 23;
}
message UserListRequest{
string domain = 1;
@ -197,7 +193,6 @@ message UserListRequest{
string blurNameTel = 10;
repeated int64 ids = 11;
string nationality = 12;
string nameAndNumber = 13;
}
message UserInfoResponse{
uint64 id = 1;
@ -219,8 +214,6 @@ message UserInfoResponse{
string nickName = 17;
string telNum = 18;
string telAreaCode = 19;
string idNumber = 20;
string dateOfBirth = 21;
}
message RealNameResponse{
uint64 id = 1;
@ -237,8 +230,6 @@ message RealNameRequest{
string placeOfResidence = 8;
string groupPhoto = 9;
string attachment = 10;
string idNumber = 11;
string dateOfBirth = 12;
}
message RegisterResponse{
uint64 ID = 1;
@ -749,10 +740,6 @@ message JobNumGetInfoRequest{
string jobNum = 1;
string domain = 2;
}
message SubNumGetInfoRequest{
string subNum = 1;
string domain = 2;
}
message CreateClockDeviceRequest{
string deviceNum =1;
string deviceName =2;

View File

@ -5,11 +5,11 @@ package accountFiee
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
regexp "regexp"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
math "math"
regexp "regexp"
)
// Reference imports to suppress errors if they are not otherwise used.
@ -431,9 +431,6 @@ func (this *PositionUser) Validate() error {
func (this *JobNumGetInfoRequest) Validate() error {
return nil
}
func (this *SubNumGetInfoRequest) Validate() error {
return nil
}
func (this *CreateClockDeviceRequest) Validate() error {
return nil
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,708 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: api/accountFiee/accountFiee.proto
package accountFiee
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
regexp "regexp"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *VerifySliderStatusRequest) Validate() error {
return nil
}
func (this *VerifySliderStatusResponse) Validate() error {
return nil
}
func (this *SendNationMsgRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
if this.TelNum == "" {
return github_com_mwitkow_go_proto_validators.FieldError("TelNum", fmt.Errorf(`70001`))
}
return nil
}
func (this *VerifySliderCaptchaResponse) Validate() error {
return nil
}
func (this *VerifySliderCaptchaRequest) Validate() error {
return nil
}
func (this *GenerateSliderCaptchaResponse) Validate() error {
return nil
}
func (this *GenerateSliderCaptchaRequest) Validate() error {
return nil
}
func (this *CheckRealNameResponse) Validate() error {
return nil
}
func (this *CheckRealNameRequest) Validate() error {
return nil
}
func (this *UserListResponse) Validate() error {
for _, item := range this.UserList {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("UserList", err)
}
}
}
return nil
}
func (this *UserListInfo) Validate() error {
return nil
}
func (this *UserListRequest) Validate() error {
return nil
}
func (this *UserInfoResponse) Validate() error {
return nil
}
func (this *RealNameResponse) Validate() error {
return nil
}
func (this *RealNameRequest) Validate() error {
return nil
}
func (this *RegisterResponse) Validate() error {
return nil
}
func (this *UsersByJobNumRequest) Validate() error {
return nil
}
func (this *QueryPersonnelWithTheSameNameRequest) Validate() error {
return nil
}
func (this *QueryPersonnelWithTheSameNameResponse) Validate() error {
return nil
}
func (this *ListV2Request) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
return nil
}
func (this *SendClockInWechatRequest) Validate() error {
return nil
}
func (this *MailAccountByNickNameRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
if this.NickName == "" {
return github_com_mwitkow_go_proto_validators.FieldError("NickName", fmt.Errorf(`70005`))
}
if !(len(this.NickName) < 20) {
return github_com_mwitkow_go_proto_validators.FieldError("NickName", fmt.Errorf(`70005`))
}
return nil
}
func (this *CreateMaiAccountRequest) Validate() error {
return nil
}
func (this *MaiAccountResponse) Validate() error {
return nil
}
func (this *FddCreateUserRequest) Validate() error {
return nil
}
func (this *WxBoxUserInfoRequest) Validate() error {
return nil
}
func (this *WxGetOpenIdByCodeRequest) Validate() error {
return nil
}
func (this *WxGetOpenIdByCodeResponse) Validate() error {
return nil
}
func (this *WxBoxTelNumByCodeResponse) Validate() error {
return nil
}
func (this *WxBoxUserInfo) Validate() error {
if this.User != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.User); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("User", err)
}
}
if this.Fdd != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Fdd); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Fdd", err)
}
}
return nil
}
func (this *FddInfo) Validate() error {
return nil
}
func (this *UserInfo) Validate() error {
return nil
}
func (this *CommonRequest) Validate() error {
return nil
}
func (this *WxAppRequest) Validate() error {
return nil
}
func (this *WxAppResponse) Validate() error {
return nil
}
func (this *WxUserUpdateRequest) Validate() error {
return nil
}
func (this *WxUserOrCreateRequest) Validate() error {
if this.OpenID == "" {
return github_com_mwitkow_go_proto_validators.FieldError("OpenID", fmt.Errorf(`缺少openid`))
}
if this.GhID == "" {
return github_com_mwitkow_go_proto_validators.FieldError("GhID", fmt.Errorf(`缺少参数ghid`))
}
return nil
}
func (this *WxUserResponse) Validate() error {
return nil
}
func (this *LoginLogsResponse) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *LoginLog) Validate() error {
return nil
}
func (this *OnlineLogByIdRequest) Validate() error {
return nil
}
func (this *LoginInfosByUserIdRequest) Validate() error {
return nil
}
func (this *SendNewTelNumMsgRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
return nil
}
func (this *UserByTelRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
return nil
}
func (this *CommonResponse) Validate() error {
return nil
}
func (this *UsersByTelRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
return nil
}
func (this *ListByIDsRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
return nil
}
func (this *SendMsgRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
return nil
}
var _regex_SendCustomMsgRequest_TelNum = regexp.MustCompile(`^1\d{10}$`)
func (this *SendCustomMsgRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
if !_regex_SendCustomMsgRequest_TelNum.MatchString(this.TelNum) {
return github_com_mwitkow_go_proto_validators.FieldError("TelNum", fmt.Errorf(`70002`))
}
return nil
}
func (this *CheckMsgRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
if this.Code == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Code", fmt.Errorf(`70003`))
}
return nil
}
func (this *SendMsgStatusResponse) Validate() error {
return nil
}
func (this *RemoveRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
if !(this.ID > 0) {
return github_com_mwitkow_go_proto_validators.FieldError("ID", fmt.Errorf(`70004`))
}
return nil
}
func (this *WriteOffRequest) Validate() error {
return nil
}
func (this *WriteOffListRequest) Validate() error {
return nil
}
func (this *WriteOffApproveRequest) Validate() error {
return nil
}
func (this *WriteOffListResponse) Validate() error {
for _, item := range this.WriteOffList {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("WriteOffList", err)
}
}
}
return nil
}
func (this *RemoveResponse) Validate() error {
return nil
}
func (this *UpdateRequest) Validate() error {
return nil
}
func (this *Operator) Validate() error {
return nil
}
func (this *TrainVideo) Validate() error {
return nil
}
func (this *UpdateResponse) Validate() error {
return nil
}
func (this *PrivacyInfoRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
return nil
}
func (this *ListRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
return nil
}
func (this *ListResponse) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *InfoRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
return nil
}
func (this *InfoResponse) Validate() error {
if this.Info != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Info); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Info", err)
}
}
return nil
}
func (this *DecryptJwtResponse) Validate() error {
return nil
}
func (this *DecryptJwtRequest) Validate() error {
return nil
}
func (this *CheckPwdRequest) Validate() error {
return nil
}
func (this *AuthenticationRequest) Validate() error {
if !(len(this.IDNum) == 18) {
return github_com_mwitkow_go_proto_validators.FieldError("IDNum", fmt.Errorf(`70006`))
}
return nil
}
func (this *RequestStatus) Validate() error {
return nil
}
func (this *RegistRequest) Validate() error {
return nil
}
func (this *LoginRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`70001`))
}
return nil
}
func (this *TokenInfo) Validate() error {
if this.AccountInfo != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.AccountInfo); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("AccountInfo", err)
}
}
return nil
}
func (this *Extend) Validate() error {
return nil
}
func (this *Department) Validate() error {
return nil
}
func (this *AccountInfo) Validate() error {
if this.Extend != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Extend); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Extend", err)
}
}
for _, item := range this.Departments {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Departments", err)
}
}
}
for _, item := range this.Positions {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Positions", err)
}
}
}
for _, item := range this.Clocks {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Clocks", err)
}
}
}
for _, item := range this.TrainVideos {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("TrainVideos", err)
}
}
}
if this.Operator != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Operator); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Operator", err)
}
}
return nil
}
func (this *UserInfoV2) Validate() error {
if this.Extend != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Extend); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Extend", err)
}
}
if this.Operator != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Operator); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Operator", err)
}
}
return nil
}
func (this *RefreshTokenRequest) Validate() error {
return nil
}
func (this *PositionUser) Validate() error {
return nil
}
func (this *JobNumGetInfoRequest) Validate() error {
return nil
}
func (this *SubNumGetInfoRequest) Validate() error {
return nil
}
func (this *CreateClockDeviceRequest) Validate() error {
return nil
}
func (this *UpdateClockDeviceRequest) Validate() error {
return nil
}
func (this *ClockDeviceResponse) Validate() error {
return nil
}
func (this *RemoveClockDeviceRequest) Validate() error {
return nil
}
func (this *ClockDeviceListRequest) Validate() error {
return nil
}
func (this *ClockDeviceListResponse) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *ClockUser) Validate() error {
if this.Device != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Device); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Device", err)
}
}
return nil
}
func (this *ClockDeviceInfo) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *ClockDeviceInfoResponse) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *ClockUserRel) Validate() error {
return nil
}
func (this *ClockDeviceInfoRequest) Validate() error {
return nil
}
func (this *ClockBatchBindRequest) Validate() error {
return nil
}
func (this *ClockBatchListResponse) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *ClockUserDeviceBatch) Validate() error {
return nil
}
func (this *ClockLogInfo) Validate() error {
return nil
}
func (this *ClockLogReq) Validate() error {
return nil
}
func (this *ClockLogListResponse) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *SubmitInfoRequest) Validate() error {
return nil
}
func (this *CommonMsg) Validate() error {
return nil
}
func (this *ChatRecordData) Validate() error {
for _, item := range this.Medias {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Medias", err)
}
}
}
return nil
}
func (this *CreateChatRecordResp) Validate() error {
if this.Data != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
return nil
}
func (this *DeleteChatRecordRequest) Validate() error {
return nil
}
func (this *GetChatRecordByIdRequest) Validate() error {
return nil
}
func (this *GetChatRecordListRequest) Validate() error {
if this.Query != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Query", err)
}
}
return nil
}
func (this *GetChatRecordListResp) Validate() error {
for _, item := range this.List {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
}
}
}
return nil
}
func (this *RegisterWaiterRequest) Validate() error {
return nil
}
func (this *RegisterWaiterResp) Validate() error {
return nil
}
func (this *ChatMediaData) Validate() error {
return nil
}
func (this *CreateChatMediaResp) Validate() error {
if this.Data != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
return nil
}
func (this *DeleteChatMediaRequest) Validate() error {
return nil
}
func (this *GetChatMediaByIdRequest) Validate() error {
return nil
}
func (this *GetChatMediaListRequest) Validate() error {
if this.Query != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Query", err)
}
}
return nil
}
func (this *GetChatMediaListResp) Validate() error {
for _, item := range this.List {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
}
}
}
return nil
}
func (this *GetChatUserListRequest2) Validate() error {
return nil
}
func (this *ChatUser2) Validate() error {
return nil
}
func (this *GetChatUserListResp2) Validate() error {
for _, item := range this.List {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
}
}
}
return nil
}
func (this *ChatAutoReplyRulerData) Validate() error {
return nil
}
func (this *CreateChatAutoReplyRulerResp) Validate() error {
if this.Data != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
return nil
}
func (this *DeleteChatAutoReplyRulerRequest) Validate() error {
return nil
}
func (this *GetChatAutoReplyRulerByIdRequest) Validate() error {
return nil
}
func (this *GetChatAutoReplyRulerListRequest) Validate() error {
if this.Query != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Query", err)
}
}
return nil
}
func (this *GetChatAutoReplyRulerListResp) Validate() error {
for _, item := range this.List {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
}
}
}
return nil
}
func (this *ChatUserData) Validate() error {
return nil
}
func (this *CreateChatUserResp) Validate() error {
if this.Data != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Data); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
return nil
}
func (this *DeleteChatUserRequest) Validate() error {
return nil
}
func (this *GetChatUserByIdRequest) Validate() error {
return nil
}
func (this *GetChatUserListRequest) Validate() error {
if this.Query != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Query); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Query", err)
}
}
return nil
}
func (this *GetChatUserListResp) Validate() error {
for _, item := range this.List {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("List", err)
}
}
}
return nil
}
func (this *CreateUserAndRealNameRequest) Validate() error {
return nil
}
func (this *CreateUserAndRealNameResponse) Validate() error {
return nil
}

File diff suppressed because it is too large Load Diff

View File

@ -1,80 +0,0 @@
// Copyright 2016 Michal Witkowski. All Rights Reserved.
// See LICENSE for licensing terms.
// Protocol Buffers extensions for defining auto-generateable validators for messages.
// TODO(mwitkow): Add example.
syntax = "proto2";
package validator;
import "google/protobuf/descriptor.proto";
option go_package = "github.com/mwitkow/go-proto-validators;validator";
// TODO(mwitkow): Email protobuf-global-extension-registry@google.com to get an extension ID.
extend google.protobuf.FieldOptions {
optional FieldValidator field = 65020;
}
extend google.protobuf.OneofOptions {
optional OneofValidator oneof = 65021;
}
message FieldValidator {
// Uses a Golang RE2-syntax regex to match the field contents.
optional string regex = 1;
// Field value of integer strictly greater than this value.
optional int64 int_gt = 2;
// Field value of integer strictly smaller than this value.
optional int64 int_lt = 3;
// Used for nested message types, requires that the message type exists.
optional bool msg_exists = 4;
// Human error specifies a user-customizable error that is visible to the user.
optional string human_error = 5;
// Field value of double strictly greater than this value.
// Note that this value can only take on a valid floating point
// value. Use together with float_epsilon if you need something more specific.
optional double float_gt = 6;
// Field value of double strictly smaller than this value.
// Note that this value can only take on a valid floating point
// value. Use together with float_epsilon if you need something more specific.
optional double float_lt = 7;
// Field value of double describing the epsilon within which
// any comparison should be considered to be true. For example,
// when using float_gt = 0.35, using a float_epsilon of 0.05
// would mean that any value above 0.30 is acceptable. It can be
// thought of as a {float_value_condition} +- {float_epsilon}.
// If unset, no correction for floating point inaccuracies in
// comparisons will be attempted.
optional double float_epsilon = 8;
// Floating-point value compared to which the field content should be greater or equal.
optional double float_gte = 9;
// Floating-point value compared to which the field content should be smaller or equal.
optional double float_lte = 10;
// Used for string fields, requires the string to be not empty (i.e different from "").
optional bool string_not_empty = 11;
// Repeated field with at least this number of elements.
optional int64 repeated_count_min = 12;
// Repeated field with at most this number of elements.
optional int64 repeated_count_max = 13;
// Field value of length greater than this value.
optional int64 length_gt = 14;
// Field value of length smaller than this value.
optional int64 length_lt = 15;
// Field value of length strictly equal to this value.
optional int64 length_eq = 16;
// Requires that the value is in the enum.
optional bool is_in_enum = 17;
// Ensures that a string value is in UUID format.
// uuid_ver specifies the valid UUID versions. Valid values are: 0-5.
// If uuid_ver is 0 all UUID versions are accepted.
optional int32 uuid_ver = 18;
}
message OneofValidator {
// Require that one of the oneof fields is set.
optional bool required = 1;
}

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
// - protoc-gen-go-triple v1.0.5
// - protoc v6.32.0
// - protoc-gen-go-triple v1.0.8
// - protoc v5.26.1
// source: api/accountFiee/accountFiee.proto
package accountFiee
@ -47,7 +47,6 @@ type AccountFieeClient interface {
DecryptJwt(ctx context.Context, in *DecryptJwtRequest, opts ...grpc_go.CallOption) (*DecryptJwtResponse, common.ErrorWithAttachment)
Info(ctx context.Context, in *InfoRequest, opts ...grpc_go.CallOption) (*UserInfoResponse, common.ErrorWithAttachment)
JobNumGetInfo(ctx context.Context, in *JobNumGetInfoRequest, opts ...grpc_go.CallOption) (*InfoResponse, common.ErrorWithAttachment)
SubNumGetInfo(ctx context.Context, in *SubNumGetInfoRequest, opts ...grpc_go.CallOption) (*UserInfoResponse, common.ErrorWithAttachment)
List(ctx context.Context, in *ListRequest, opts ...grpc_go.CallOption) (*ListResponse, common.ErrorWithAttachment)
RandList(ctx context.Context, in *ListRequest, opts ...grpc_go.CallOption) (*ListResponse, common.ErrorWithAttachment)
ListByIDs(ctx context.Context, in *ListByIDsRequest, opts ...grpc_go.CallOption) (*ListResponse, common.ErrorWithAttachment)
@ -125,7 +124,6 @@ type AccountFieeClientImpl struct {
DecryptJwt func(ctx context.Context, in *DecryptJwtRequest) (*DecryptJwtResponse, error)
Info func(ctx context.Context, in *InfoRequest) (*UserInfoResponse, error)
JobNumGetInfo func(ctx context.Context, in *JobNumGetInfoRequest) (*InfoResponse, error)
SubNumGetInfo func(ctx context.Context, in *SubNumGetInfoRequest) (*UserInfoResponse, error)
List func(ctx context.Context, in *ListRequest) (*ListResponse, error)
RandList func(ctx context.Context, in *ListRequest) (*ListResponse, error)
ListByIDs func(ctx context.Context, in *ListByIDsRequest) (*ListResponse, error)
@ -298,12 +296,6 @@ func (c *accountFieeClient) JobNumGetInfo(ctx context.Context, in *JobNumGetInfo
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/JobNumGetInfo", in, out)
}
func (c *accountFieeClient) SubNumGetInfo(ctx context.Context, in *SubNumGetInfoRequest, opts ...grpc_go.CallOption) (*UserInfoResponse, common.ErrorWithAttachment) {
out := new(UserInfoResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/SubNumGetInfo", in, out)
}
func (c *accountFieeClient) List(ctx context.Context, in *ListRequest, opts ...grpc_go.CallOption) (*ListResponse, common.ErrorWithAttachment) {
out := new(ListResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
@ -627,7 +619,6 @@ type AccountFieeServer interface {
DecryptJwt(context.Context, *DecryptJwtRequest) (*DecryptJwtResponse, error)
Info(context.Context, *InfoRequest) (*UserInfoResponse, error)
JobNumGetInfo(context.Context, *JobNumGetInfoRequest) (*InfoResponse, error)
SubNumGetInfo(context.Context, *SubNumGetInfoRequest) (*UserInfoResponse, error)
List(context.Context, *ListRequest) (*ListResponse, error)
RandList(context.Context, *ListRequest) (*ListResponse, error)
ListByIDs(context.Context, *ListByIDsRequest) (*ListResponse, error)
@ -742,9 +733,6 @@ func (UnimplementedAccountFieeServer) Info(context.Context, *InfoRequest) (*User
func (UnimplementedAccountFieeServer) JobNumGetInfo(context.Context, *JobNumGetInfoRequest) (*InfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method JobNumGetInfo not implemented")
}
func (UnimplementedAccountFieeServer) SubNumGetInfo(context.Context, *SubNumGetInfoRequest) (*UserInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SubNumGetInfo not implemented")
}
func (UnimplementedAccountFieeServer) List(context.Context, *ListRequest) (*ListResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
@ -1445,35 +1433,6 @@ func _AccountFiee_JobNumGetInfo_Handler(srv interface{}, ctx context.Context, de
return interceptor(ctx, in, info, handler)
}
func _AccountFiee_SubNumGetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(SubNumGetInfoRequest)
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("SubNumGetInfo", 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 _AccountFiee_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(ListRequest)
if err := dec(in); err != nil {
@ -3003,10 +2962,6 @@ var AccountFiee_ServiceDesc = grpc_go.ServiceDesc{
MethodName: "JobNumGetInfo",
Handler: _AccountFiee_JobNumGetInfo_Handler,
},
{
MethodName: "SubNumGetInfo",
Handler: _AccountFiee_SubNumGetInfo_Handler,
},
{
MethodName: "List",
Handler: _AccountFiee_List_Handler,

View File

@ -1,80 +0,0 @@
// Copyright 2016 Michal Witkowski. All Rights Reserved.
// See LICENSE for licensing terms.
// Protocol Buffers extensions for defining auto-generateable validators for messages.
// TODO(mwitkow): Add example.
syntax = "proto2";
package validator;
import "google/protobuf/descriptor.proto";
option go_package = "github.com/mwitkow/go-proto-validators;validator";
// TODO(mwitkow): Email protobuf-global-extension-registry@google.com to get an extension ID.
extend google.protobuf.FieldOptions {
optional FieldValidator field = 65020;
}
extend google.protobuf.OneofOptions {
optional OneofValidator oneof = 65021;
}
message FieldValidator {
// Uses a Golang RE2-syntax regex to match the field contents.
optional string regex = 1;
// Field value of integer strictly greater than this value.
optional int64 int_gt = 2;
// Field value of integer strictly smaller than this value.
optional int64 int_lt = 3;
// Used for nested message types, requires that the message type exists.
optional bool msg_exists = 4;
// Human error specifies a user-customizable error that is visible to the user.
optional string human_error = 5;
// Field value of double strictly greater than this value.
// Note that this value can only take on a valid floating point
// value. Use together with float_epsilon if you need something more specific.
optional double float_gt = 6;
// Field value of double strictly smaller than this value.
// Note that this value can only take on a valid floating point
// value. Use together with float_epsilon if you need something more specific.
optional double float_lt = 7;
// Field value of double describing the epsilon within which
// any comparison should be considered to be true. For example,
// when using float_gt = 0.35, using a float_epsilon of 0.05
// would mean that any value above 0.30 is acceptable. It can be
// thought of as a {float_value_condition} +- {float_epsilon}.
// If unset, no correction for floating point inaccuracies in
// comparisons will be attempted.
optional double float_epsilon = 8;
// Floating-point value compared to which the field content should be greater or equal.
optional double float_gte = 9;
// Floating-point value compared to which the field content should be smaller or equal.
optional double float_lte = 10;
// Used for string fields, requires the string to be not empty (i.e different from "").
optional bool string_not_empty = 11;
// Repeated field with at least this number of elements.
optional int64 repeated_count_min = 12;
// Repeated field with at most this number of elements.
optional int64 repeated_count_max = 13;
// Field value of length greater than this value.
optional int64 length_gt = 14;
// Field value of length smaller than this value.
optional int64 length_lt = 15;
// Field value of length strictly equal to this value.
optional int64 length_eq = 16;
// Requires that the value is in the enum.
optional bool is_in_enum = 17;
// Ensures that a string value is in UUID format.
// uuid_ver specifies the valid UUID versions. Valid values are: 0-5.
// If uuid_ver is 0 all UUID versions are accepted.
optional int32 uuid_ver = 18;
}
message OneofValidator {
// Require that one of the oneof fields is set.
optional bool required = 1;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,194 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: pb/ayrshare.proto
package aryshare
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
_ "google.golang.org/protobuf/types/descriptorpb"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *UserTag) Validate() error {
return nil
}
func (this *InstagramOptions) Validate() error {
for _, item := range this.UserTags {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("UserTags", err)
}
}
}
return nil
}
func (this *TikTokOptions) Validate() error {
return nil
}
func (this *PostRequest) Validate() error {
if this.Post == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Post", fmt.Errorf(`post内容不能为空`))
}
if len(this.Platforms) < 1 {
return github_com_mwitkow_go_proto_validators.FieldError("Platforms", fmt.Errorf(`platforms平台列表不能为空`))
}
if this.InstagramOptions != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.InstagramOptions); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("InstagramOptions", err)
}
}
if this.TikTokOptions != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.TikTokOptions); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("TikTokOptions", err)
}
}
return nil
}
func (this *PostId) Validate() error {
return nil
}
func (this *PostItem) Validate() error {
for _, item := range this.PostIds {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("PostIds", err)
}
}
}
return nil
}
func (this *PostResponse) Validate() error {
for _, item := range this.Posts {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Posts", err)
}
}
}
for _, item := range this.PostIds {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("PostIds", err)
}
}
}
return nil
}
func (this *GetPostRequest) Validate() error {
if this.Id == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Id", fmt.Errorf(`帖子ID不能为空`))
}
return nil
}
func (this *GetPostResponse) Validate() error {
for _, item := range this.PostIds {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("PostIds", err)
}
}
}
return nil
}
func (this *GetUserRequest) Validate() error {
return nil
}
func (this *Timestamp) Validate() error {
return nil
}
func (this *TwitterUsage) Validate() error {
return nil
}
func (this *DisplayName) Validate() error {
if this.TwitterUsage != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.TwitterUsage); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("TwitterUsage", err)
}
}
return nil
}
func (this *GetUserResponse) Validate() error {
if this.Created != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Created); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Created", err)
}
}
for _, item := range this.DisplayNames {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DisplayNames", err)
}
}
}
return nil
}
func (this *CreateProfileRequest) Validate() error {
if this.Title == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Title", fmt.Errorf(`title不能为空`))
}
return nil
}
func (this *CreateProfileResponse) Validate() error {
return nil
}
func (this *GetProfilesRequest) Validate() error {
return nil
}
func (this *ProfileItem) Validate() error {
if this.Created != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Created); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Created", err)
}
}
return nil
}
func (this *Pagination) Validate() error {
return nil
}
func (this *GetProfilesResponse) Validate() error {
for _, item := range this.Profiles {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Profiles", err)
}
}
}
if this.Pagination != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Pagination); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Pagination", err)
}
}
return nil
}
func (this *Email) Validate() error {
return nil
}
func (this *GenerateJWTRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`domain不能为空`))
}
if this.PrivateKey == "" {
return github_com_mwitkow_go_proto_validators.FieldError("PrivateKey", fmt.Errorf(`privateKey不能为空`))
}
if this.ProfileKey == "" {
return github_com_mwitkow_go_proto_validators.FieldError("ProfileKey", fmt.Errorf(`profileKey不能为空`))
}
if this.Email != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Email); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Email", err)
}
}
return nil
}
func (this *GenerateJWTResponse) Validate() error {
return nil
}

View File

@ -1,378 +0,0 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
// - protoc-gen-go-triple v1.0.8
// - protoc v3.21.1
// source: pb/ayrshare.proto
package aryshare
import (
context "context"
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
grpc_go "github.com/dubbogo/grpc-go"
codes "github.com/dubbogo/grpc-go/codes"
metadata "github.com/dubbogo/grpc-go/metadata"
status "github.com/dubbogo/grpc-go/status"
common "github.com/dubbogo/triple/pkg/common"
constant "github.com/dubbogo/triple/pkg/common/constant"
triple "github.com/dubbogo/triple/pkg/triple"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc_go.SupportPackageIsVersion7
// AyrshareClient is the client API for Ayrshare 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 AyrshareClient interface {
// 帖子相关 api
Post(ctx context.Context, in *PostRequest, opts ...grpc_go.CallOption) (*PostResponse, common.ErrorWithAttachment)
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc_go.CallOption) (*GetPostResponse, common.ErrorWithAttachment)
// 用户相关 api
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc_go.CallOption) (*GetUserResponse, common.ErrorWithAttachment)
// 用户配置相关 api
CreateProfile(ctx context.Context, in *CreateProfileRequest, opts ...grpc_go.CallOption) (*CreateProfileResponse, common.ErrorWithAttachment)
GetProfiles(ctx context.Context, in *GetProfilesRequest, opts ...grpc_go.CallOption) (*GetProfilesResponse, common.ErrorWithAttachment)
GenerateJWT(ctx context.Context, in *GenerateJWTRequest, opts ...grpc_go.CallOption) (*GenerateJWTResponse, common.ErrorWithAttachment)
}
type ayrshareClient struct {
cc *triple.TripleConn
}
type AyrshareClientImpl struct {
Post func(ctx context.Context, in *PostRequest) (*PostResponse, error)
GetPost func(ctx context.Context, in *GetPostRequest) (*GetPostResponse, error)
GetUser func(ctx context.Context, in *GetUserRequest) (*GetUserResponse, error)
CreateProfile func(ctx context.Context, in *CreateProfileRequest) (*CreateProfileResponse, error)
GetProfiles func(ctx context.Context, in *GetProfilesRequest) (*GetProfilesResponse, error)
GenerateJWT func(ctx context.Context, in *GenerateJWTRequest) (*GenerateJWTResponse, error)
}
func (c *AyrshareClientImpl) GetDubboStub(cc *triple.TripleConn) AyrshareClient {
return NewAyrshareClient(cc)
}
func (c *AyrshareClientImpl) XXX_InterfaceName() string {
return "aryshare.Ayrshare"
}
func NewAyrshareClient(cc *triple.TripleConn) AyrshareClient {
return &ayrshareClient{cc}
}
func (c *ayrshareClient) Post(ctx context.Context, in *PostRequest, opts ...grpc_go.CallOption) (*PostResponse, common.ErrorWithAttachment) {
out := new(PostResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Post", in, out)
}
func (c *ayrshareClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc_go.CallOption) (*GetPostResponse, common.ErrorWithAttachment) {
out := new(GetPostResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetPost", in, out)
}
func (c *ayrshareClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc_go.CallOption) (*GetUserResponse, common.ErrorWithAttachment) {
out := new(GetUserResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetUser", in, out)
}
func (c *ayrshareClient) CreateProfile(ctx context.Context, in *CreateProfileRequest, opts ...grpc_go.CallOption) (*CreateProfileResponse, common.ErrorWithAttachment) {
out := new(CreateProfileResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateProfile", in, out)
}
func (c *ayrshareClient) GetProfiles(ctx context.Context, in *GetProfilesRequest, opts ...grpc_go.CallOption) (*GetProfilesResponse, common.ErrorWithAttachment) {
out := new(GetProfilesResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetProfiles", in, out)
}
func (c *ayrshareClient) GenerateJWT(ctx context.Context, in *GenerateJWTRequest, opts ...grpc_go.CallOption) (*GenerateJWTResponse, common.ErrorWithAttachment) {
out := new(GenerateJWTResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GenerateJWT", in, out)
}
// AyrshareServer is the server API for Ayrshare service.
// All implementations must embed UnimplementedAyrshareServer
// for forward compatibility
type AyrshareServer interface {
// 帖子相关 api
Post(context.Context, *PostRequest) (*PostResponse, error)
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
// 用户相关 api
GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
// 用户配置相关 api
CreateProfile(context.Context, *CreateProfileRequest) (*CreateProfileResponse, error)
GetProfiles(context.Context, *GetProfilesRequest) (*GetProfilesResponse, error)
GenerateJWT(context.Context, *GenerateJWTRequest) (*GenerateJWTResponse, error)
mustEmbedUnimplementedAyrshareServer()
}
// UnimplementedAyrshareServer must be embedded to have forward compatible implementations.
type UnimplementedAyrshareServer struct {
proxyImpl protocol.Invoker
}
func (UnimplementedAyrshareServer) Post(context.Context, *PostRequest) (*PostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Post not implemented")
}
func (UnimplementedAyrshareServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedAyrshareServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
}
func (UnimplementedAyrshareServer) CreateProfile(context.Context, *CreateProfileRequest) (*CreateProfileResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateProfile not implemented")
}
func (UnimplementedAyrshareServer) GetProfiles(context.Context, *GetProfilesRequest) (*GetProfilesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetProfiles not implemented")
}
func (UnimplementedAyrshareServer) GenerateJWT(context.Context, *GenerateJWTRequest) (*GenerateJWTResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GenerateJWT not implemented")
}
func (s *UnimplementedAyrshareServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl
}
func (s *UnimplementedAyrshareServer) XXX_GetProxyImpl() protocol.Invoker {
return s.proxyImpl
}
func (s *UnimplementedAyrshareServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
return &Ayrshare_ServiceDesc
}
func (s *UnimplementedAyrshareServer) XXX_InterfaceName() string {
return "aryshare.Ayrshare"
}
func (UnimplementedAyrshareServer) mustEmbedUnimplementedAyrshareServer() {}
// UnsafeAyrshareServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AyrshareServer will
// result in compilation errors.
type UnsafeAyrshareServer interface {
mustEmbedUnimplementedAyrshareServer()
}
func RegisterAyrshareServer(s grpc_go.ServiceRegistrar, srv AyrshareServer) {
s.RegisterService(&Ayrshare_ServiceDesc, srv)
}
func _Ayrshare_Post_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(PostRequest)
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("Post", 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 _Ayrshare_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
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("GetPost", 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 _Ayrshare_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserRequest)
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("GetUser", 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 _Ayrshare_CreateProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateProfileRequest)
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("CreateProfile", 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 _Ayrshare_GetProfiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetProfilesRequest)
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("GetProfiles", 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 _Ayrshare_GenerateJWT_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GenerateJWTRequest)
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("GenerateJWT", 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)
}
// Ayrshare_ServiceDesc is the grpc_go.ServiceDesc for Ayrshare service.
// It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy)
var Ayrshare_ServiceDesc = grpc_go.ServiceDesc{
ServiceName: "aryshare.Ayrshare",
HandlerType: (*AyrshareServer)(nil),
Methods: []grpc_go.MethodDesc{
{
MethodName: "Post",
Handler: _Ayrshare_Post_Handler,
},
{
MethodName: "GetPost",
Handler: _Ayrshare_GetPost_Handler,
},
{
MethodName: "GetUser",
Handler: _Ayrshare_GetUser_Handler,
},
{
MethodName: "CreateProfile",
Handler: _Ayrshare_CreateProfile_Handler,
},
{
MethodName: "GetProfiles",
Handler: _Ayrshare_GetProfiles_Handler,
},
{
MethodName: "GenerateJWT",
Handler: _Ayrshare_GenerateJWT_Handler,
},
},
Streams: []grpc_go.StreamDesc{},
Metadata: "pb/ayrshare.proto",
}

File diff suppressed because it is too large Load Diff

View File

@ -95,13 +95,6 @@ func (this *BundleProfile) Validate() error {
}
}
}
for _, item := range this.SelectValueAdditionalService {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("SelectValueAdditionalService", err)
}
}
}
for _, item := range this.BundleProfileLang {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
@ -112,16 +105,6 @@ func (this *BundleProfile) Validate() error {
return nil
}
func (this *BundleProfileLang) Validate() error {
for _, item := range this.ServiceLangInfo {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("ServiceLangInfo", err)
}
}
}
return nil
}
func (this *ServiceLangInfo) Validate() error {
return nil
}
func (this *SaveResponse) Validate() error {
@ -130,9 +113,6 @@ func (this *SaveResponse) Validate() error {
func (this *SelectValueAddService) Validate() error {
return nil
}
func (this *SelectValueAdditionalService) Validate() error {
return nil
}
func (this *DelBundleRequest) Validate() error {
return nil
}
@ -370,22 +350,6 @@ func (this *GetBundleBalanceReq) Validate() error {
func (this *BundleBalanceItem) Validate() error {
return nil
}
func (this *BundleBalanceExportItem) Validate() error {
return nil
}
func (this *BundleBalanceExportReq) Validate() error {
return nil
}
func (this *BundleBalanceExportResp) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *GetBundleBalanceListResp) Validate() error {
for _, item := range this.Data {
if item != nil {
@ -502,268 +466,3 @@ func (this *UnfinishedInfo) Validate() error {
func (this *SoftDeleteUnfinishedInfoRequest) Validate() error {
return nil
}
func (this *BundleActivateReq) Validate() error {
return nil
}
func (this *BundleActivateResp) Validate() error {
return nil
}
func (this *TaskQueryRequest) Validate() error {
return nil
}
func (this *TaskQueryResponse) Validate() error {
for _, item := range this.Tasks {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Tasks", err)
}
}
}
return nil
}
func (this *TaskManagementInfo) Validate() error {
return nil
}
func (this *TaskAssignRequest) Validate() error {
return nil
}
func (this *UpdatePendingCountRequest) Validate() error {
return nil
}
func (this *AddHiddenTaskAssigneeRequest) Validate() error {
return nil
}
func (this *RecentAssignRecordsRequest) Validate() error {
return nil
}
func (this *RecentAssigneeItem) Validate() error {
return nil
}
func (this *RecentAssignRecordsResponse) Validate() error {
for _, item := range this.OperatorList {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("OperatorList", err)
}
}
}
return nil
}
func (this *EmployeeTaskQueryRequest) Validate() error {
return nil
}
func (this *EmployeeTaskQueryResponse) Validate() error {
for _, item := range this.Records {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Records", err)
}
}
}
return nil
}
func (this *TaskAssignRecordInfo) Validate() error {
return nil
}
func (this *BatchAssignTaskItem) Validate() error {
return nil
}
func (this *BatchAssignTaskRequest) Validate() error {
for _, item := range this.Items {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Items", err)
}
}
}
return nil
}
func (this *CompleteTaskManuallyRequest) Validate() error {
return nil
}
func (this *TerminateTaskByUUIDRequest) Validate() error {
return nil
}
func (this *BatchTerminateTaskRequest) Validate() error {
return nil
}
func (this *RevertTaskCompletionByUUIDItemRequest) Validate() error {
return nil
}
func (this *GetTaskActualStatusByUUIDRequest) Validate() error {
return nil
}
func (this *GetTaskActualStatusByUUIDResponse) Validate() error {
return nil
}
func (this *UpdateTaskProgressRequest) Validate() error {
return nil
}
func (this *TaskAssignRecordsQueryRequest) Validate() error {
return nil
}
func (this *ComResponse) Validate() error {
return nil
}
func (this *TaskAssignRecordsQueryResponse) Validate() error {
for _, item := range this.Records {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Records", err)
}
}
}
if this.Summary != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Summary); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Summary", err)
}
}
return nil
}
func (this *TaskAssignRecordsSummary) Validate() error {
return nil
}
func (this *ArtistUploadStatsItem) Validate() error {
return nil
}
func (this *ArtistUploadStatsResponse) Validate() error {
for _, item := range this.Items {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Items", err)
}
}
}
return nil
}
func (this *PendingUploadBreakdownRequest) Validate() error {
return nil
}
func (this *PendingUploadBreakdownItem) Validate() error {
return nil
}
func (this *PendingUploadBreakdownResponse) Validate() error {
for _, item := range this.Items {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Items", err)
}
}
}
return nil
}
func (this *PendingAssignRequest) Validate() error {
return nil
}
func (this *PendingAssignItem) Validate() error {
return nil
}
func (this *PendingAssignResponse) Validate() error {
for _, item := range this.Items {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Items", err)
}
}
}
return nil
}
func (this *ArtistBundleBalanceRequest) Validate() error {
return nil
}
func (this *ArtistBundleBalanceResponse) Validate() error {
return nil
}
func (this *SetBundleBalanceLayoutReq) Validate() error {
return nil
}
func (this *SetBundleBalanceLayoutResp) Validate() error {
return nil
}
func (this *GetBundleBalanceLayoutReq) Validate() error {
return nil
}
func (this *GetBundleBalanceLayoutResp) Validate() error {
return nil
}
func (this *GetPendingTaskLayoutReq) Validate() error {
return nil
}
func (this *GetPendingTaskLayoutResp) Validate() error {
return nil
}
func (this *SetPendingTaskLayoutReq) Validate() error {
return nil
}
func (this *SetPendingTaskLayoutResp) Validate() error {
return nil
}
func (this *MetricsBusinessReq) Validate() error {
return nil
}
func (this *MetricsBusinessResp) Validate() error {
return nil
}
func (this *MetricsOperatingCreateReq) Validate() error {
return nil
}
func (this *MetricsOperatingCreateResp) Validate() error {
return nil
}
func (this *MetricsOperatingStatusReq) Validate() error {
return nil
}
func (this *MetricsOperatingStatusResp) Validate() error {
return nil
}
func (this *MetricsBundlePurchaseExportReq) Validate() error {
return nil
}
func (this *MetricsBundlePurchaseExportResp) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *MetricsBundlePurchaseItem) Validate() error {
return nil
}
func (this *MetricsArtistAccountExportReq) Validate() error {
return nil
}
func (this *MetricsArtistAccountExportResp) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *MetricsArtistAccountExportItem) Validate() error {
return nil
}
func (this *MetricsVideoSubmitExportReq) Validate() error {
return nil
}
func (this *MetricsVideoSubmitExportResp) Validate() error {
for _, item := range this.Data {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
}
}
}
return nil
}
func (this *MetricsVideoSubmitExportItem) Validate() error {
return nil
}
func (this *MetricsBalanceDetailExportReq) Validate() error {
return nil
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v5.26.0
// protoc-gen-go v1.29.1
// protoc v3.20.3
// source: files.proto
package files
@ -25,12 +25,9 @@ type FileListReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"` // 目标文件夹路径
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath"` // 用户空间的路径
Sorting *Sorting `protobuf:"bytes,3,opt,name=sorting,proto3" json:"sorting"`
Page int32 `protobuf:"varint,4,opt,name=page,proto3" json:"page"`
PageSize int32 `protobuf:"varint,5,opt,name=pageSize,proto3" json:"pageSize"`
Total int32 `protobuf:"varint,6,opt,name=total,proto3" json:"total"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` // 目标文件夹路径
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath,omitempty"` // 用户空间的路径
Sorting *Sorting `protobuf:"bytes,3,opt,name=sorting,proto3" json:"sorting,omitempty"`
}
func (x *FileListReq) Reset() {
@ -86,42 +83,21 @@ func (x *FileListReq) GetSorting() *Sorting {
return nil
}
func (x *FileListReq) GetPage() int32 {
if x != nil {
return x.Page
}
return 0
}
func (x *FileListReq) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *FileListReq) GetTotal() int32 {
if x != nil {
return x.Total
}
return 0
}
type Items struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size"`
Extension string `protobuf:"bytes,4,opt,name=extension,proto3" json:"extension"`
Modified string `protobuf:"bytes,5,opt,name=modified,proto3" json:"modified"`
ModTime int64 `protobuf:"varint,6,opt,name=modTime,proto3" json:"modTime"`
Mode string `protobuf:"bytes,7,opt,name=mode,proto3" json:"mode"`
IsDir bool `protobuf:"varint,8,opt,name=isDir,proto3" json:"isDir"`
IsSymlink bool `protobuf:"varint,9,opt,name=isSymlink,proto3" json:"isSymlink"`
Type string `protobuf:"bytes,10,opt,name=type,proto3" json:"type"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
Extension string `protobuf:"bytes,4,opt,name=extension,proto3" json:"extension,omitempty"`
Modified string `protobuf:"bytes,5,opt,name=modified,proto3" json:"modified,omitempty"`
ModTime int64 `protobuf:"varint,6,opt,name=modTime,proto3" json:"modTime,omitempty"`
Mode string `protobuf:"bytes,7,opt,name=mode,proto3" json:"mode,omitempty"`
IsDir bool `protobuf:"varint,8,opt,name=isDir,proto3" json:"isDir,omitempty"`
IsSymlink bool `protobuf:"varint,9,opt,name=isSymlink,proto3" json:"isSymlink,omitempty"`
Type string `protobuf:"bytes,10,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *Items) Reset() {
@ -231,8 +207,8 @@ type Sorting struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
By string `protobuf:"bytes,1,opt,name=by,proto3" json:"by"`
Asc bool `protobuf:"varint,2,opt,name=asc,proto3" json:"asc"`
By string `protobuf:"bytes,1,opt,name=by,proto3" json:"by,omitempty"`
Asc bool `protobuf:"varint,2,opt,name=asc,proto3" json:"asc,omitempty"`
}
func (x *Sorting) Reset() {
@ -286,23 +262,20 @@ type FileListResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Items []*Items `protobuf:"bytes,1,rep,name=items,proto3" json:"items"`
NumDirs int32 `protobuf:"varint,2,opt,name=numDirs,proto3" json:"numDirs"`
NumFiles int32 `protobuf:"varint,3,opt,name=numFiles,proto3" json:"numFiles"`
Sorting *Sorting `protobuf:"bytes,4,opt,name=sorting,proto3" json:"sorting"`
Path string `protobuf:"bytes,5,opt,name=path,proto3" json:"path"`
Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name"`
Size int64 `protobuf:"varint,7,opt,name=size,proto3" json:"size"`
Extension string `protobuf:"bytes,8,opt,name=extension,proto3" json:"extension"`
Modified string `protobuf:"bytes,9,opt,name=modified,proto3" json:"modified"`
ModTime int64 `protobuf:"varint,10,opt,name=modTime,proto3" json:"modTime"`
Mode string `protobuf:"bytes,11,opt,name=mode,proto3" json:"mode"`
IsDir bool `protobuf:"varint,12,opt,name=isDir,proto3" json:"isDir"`
IsSymlink bool `protobuf:"varint,13,opt,name=isSymlink,proto3" json:"isSymlink"`
Type string `protobuf:"bytes,14,opt,name=type,proto3" json:"type"`
Page int32 `protobuf:"varint,15,opt,name=page,proto3" json:"page"`
PageSize int32 `protobuf:"varint,16,opt,name=pageSize,proto3" json:"pageSize"`
Total int32 `protobuf:"varint,17,opt,name=total,proto3" json:"total"`
Items []*Items `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
NumDirs int32 `protobuf:"varint,2,opt,name=numDirs,proto3" json:"numDirs,omitempty"`
NumFiles int32 `protobuf:"varint,3,opt,name=numFiles,proto3" json:"numFiles,omitempty"`
Sorting *Sorting `protobuf:"bytes,4,opt,name=sorting,proto3" json:"sorting,omitempty"`
Path string `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"`
Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"`
Size int64 `protobuf:"varint,7,opt,name=size,proto3" json:"size,omitempty"`
Extension string `protobuf:"bytes,8,opt,name=extension,proto3" json:"extension,omitempty"`
Modified string `protobuf:"bytes,9,opt,name=modified,proto3" json:"modified,omitempty"`
ModTime int64 `protobuf:"varint,10,opt,name=modTime,proto3" json:"modTime,omitempty"`
Mode string `protobuf:"bytes,11,opt,name=mode,proto3" json:"mode,omitempty"`
IsDir bool `protobuf:"varint,12,opt,name=isDir,proto3" json:"isDir,omitempty"`
IsSymlink bool `protobuf:"varint,13,opt,name=isSymlink,proto3" json:"isSymlink,omitempty"`
Type string `protobuf:"bytes,14,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *FileListResp) Reset() {
@ -435,34 +408,13 @@ func (x *FileListResp) GetType() string {
return ""
}
func (x *FileListResp) GetPage() int32 {
if x != nil {
return x.Page
}
return 0
}
func (x *FileListResp) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *FileListResp) GetTotal() int32 {
if x != nil {
return x.Total
}
return 0
}
type CreateReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath,omitempty"`
}
func (x *CreateReq) Reset() {
@ -554,8 +506,8 @@ type DeleteReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath,omitempty"`
}
func (x *DeleteReq) Reset() {
@ -647,9 +599,9 @@ type UploadReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath"`
Content []byte `protobuf:"bytes,3,opt,name=content,proto3" json:"content"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath,omitempty"`
Content []byte `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
}
func (x *UploadReq) Reset() {
@ -748,9 +700,9 @@ type SearchReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath"`
Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath,omitempty"`
Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"`
}
func (x *SearchReq) Reset() {
@ -811,7 +763,7 @@ type SearchResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Items []*SearchResp_Nested `protobuf:"bytes,1,rep,name=items,proto3" json:"items"`
Items []*SearchResp_Nested `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
}
func (x *SearchResp) Reset() {
@ -858,9 +810,9 @@ type TusCreateReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath"`
Override bool `protobuf:"varint,3,opt,name=override,proto3" json:"override"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath,omitempty"`
Override bool `protobuf:"varint,3,opt,name=override,proto3" json:"override,omitempty"`
}
func (x *TusCreateReq) Reset() {
@ -921,8 +873,8 @@ type TusCreateResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UploadLength int64 `protobuf:"varint,1,opt,name=uploadLength,proto3" json:"uploadLength"`
UploadOffset int64 `protobuf:"varint,2,opt,name=uploadOffset,proto3" json:"uploadOffset"`
UploadLength int64 `protobuf:"varint,1,opt,name=uploadLength,proto3" json:"uploadLength,omitempty"`
UploadOffset int64 `protobuf:"varint,2,opt,name=uploadOffset,proto3" json:"uploadOffset,omitempty"`
}
func (x *TusCreateResp) Reset() {
@ -976,10 +928,10 @@ type TusUploadReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath"`
UploadOffset int64 `protobuf:"varint,3,opt,name=uploadOffset,proto3" json:"uploadOffset"`
Content []byte `protobuf:"bytes,4,opt,name=content,proto3" json:"content"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath,omitempty"`
UploadOffset int64 `protobuf:"varint,3,opt,name=uploadOffset,proto3" json:"uploadOffset,omitempty"`
Content []byte `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"`
}
func (x *TusUploadReq) Reset() {
@ -1047,7 +999,7 @@ type TusUploadResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UploadOffset int64 `protobuf:"varint,1,opt,name=uploadOffset,proto3" json:"uploadOffset"`
UploadOffset int64 `protobuf:"varint,1,opt,name=uploadOffset,proto3" json:"uploadOffset,omitempty"`
}
func (x *TusUploadResp) Reset() {
@ -1094,10 +1046,10 @@ type ResumableTransferReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath"`
Offset int64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset"`
Length int64 `protobuf:"varint,4,opt,name=length,proto3" json:"length"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath,omitempty"`
Offset int64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
Length int64 `protobuf:"varint,4,opt,name=length,proto3" json:"length,omitempty"`
}
func (x *ResumableTransferReq) Reset() {
@ -1165,7 +1117,7 @@ type ResumableTransferResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content"`
Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
}
func (x *ResumableTransferResp) Reset() {
@ -1212,8 +1164,8 @@ type FileInfoReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath,omitempty"`
}
func (x *FileInfoReq) Reset() {
@ -1267,16 +1219,16 @@ type FileInfoResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size"`
Extension string `protobuf:"bytes,4,opt,name=extension,proto3" json:"extension"`
Modified string `protobuf:"bytes,5,opt,name=modified,proto3" json:"modified"`
Mode string `protobuf:"bytes,6,opt,name=mode,proto3" json:"mode"`
ModTime int64 `protobuf:"varint,7,opt,name=modTime,proto3" json:"modTime"`
IsDir bool `protobuf:"varint,8,opt,name=isDir,proto3" json:"isDir"`
IsSymlink bool `protobuf:"varint,9,opt,name=isSymlink,proto3" json:"isSymlink"`
Type string `protobuf:"bytes,10,opt,name=type,proto3" json:"type"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
Extension string `protobuf:"bytes,4,opt,name=extension,proto3" json:"extension,omitempty"`
Modified string `protobuf:"bytes,5,opt,name=modified,proto3" json:"modified,omitempty"`
Mode string `protobuf:"bytes,6,opt,name=mode,proto3" json:"mode,omitempty"`
ModTime int64 `protobuf:"varint,7,opt,name=modTime,proto3" json:"modTime,omitempty"`
IsDir bool `protobuf:"varint,8,opt,name=isDir,proto3" json:"isDir,omitempty"`
IsSymlink bool `protobuf:"varint,9,opt,name=isSymlink,proto3" json:"isSymlink,omitempty"`
Type string `protobuf:"bytes,10,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *FileInfoResp) Reset() {
@ -1386,9 +1338,9 @@ type PreviewReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath"`
Size uint32 `protobuf:"varint,3,opt,name=size,proto3" json:"size"` // 预览大小 0256x256, 1:1080x1080
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath,omitempty"`
Size uint32 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` // 预览大小 0256x256, 1:1080x1080
}
func (x *PreviewReq) Reset() {
@ -1449,9 +1401,9 @@ type PreviewResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content"`
FileName string `protobuf:"bytes,2,opt,name=fileName,proto3" json:"fileName"`
ModTime int64 `protobuf:"varint,3,opt,name=modTime,proto3" json:"modTime"`
Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
FileName string `protobuf:"bytes,2,opt,name=fileName,proto3" json:"fileName,omitempty"`
ModTime int64 `protobuf:"varint,3,opt,name=modTime,proto3" json:"modTime,omitempty"`
}
func (x *PreviewResp) Reset() {
@ -1512,12 +1464,12 @@ type ActionReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath"`
Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action"`
Destination string `protobuf:"bytes,4,opt,name=destination,proto3" json:"destination"`
Override bool `protobuf:"varint,5,opt,name=override,proto3" json:"override"`
Rename bool `protobuf:"varint,6,opt,name=rename,proto3" json:"rename"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath,omitempty"`
Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"`
Destination string `protobuf:"bytes,4,opt,name=destination,proto3" json:"destination,omitempty"`
Override bool `protobuf:"varint,5,opt,name=override,proto3" json:"override,omitempty"`
Rename bool `protobuf:"varint,6,opt,name=rename,proto3" json:"rename,omitempty"`
}
func (x *ActionReq) Reset() {
@ -1637,10 +1589,10 @@ type DirDownloadReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath"`
Files []string `protobuf:"bytes,3,rep,name=files,proto3" json:"files"`
Algo string `protobuf:"bytes,4,opt,name=algo,proto3" json:"algo"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath,omitempty"`
Files []string `protobuf:"bytes,3,rep,name=files,proto3" json:"files,omitempty"`
Algo string `protobuf:"bytes,4,opt,name=algo,proto3" json:"algo,omitempty"`
}
func (x *DirDownloadReq) Reset() {
@ -1708,7 +1660,7 @@ type DirDownloadResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content"`
Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
}
func (x *DirDownloadResp) Reset() {
@ -1755,8 +1707,8 @@ type UsageReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
UserSpacePath string `protobuf:"bytes,2,opt,name=userSpacePath,proto3" json:"userSpacePath,omitempty"`
}
func (x *UsageReq) Reset() {
@ -1810,8 +1762,8 @@ type UsageResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
Used int64 `protobuf:"varint,2,opt,name=used,proto3" json:"used"`
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
Used int64 `protobuf:"varint,2,opt,name=used,proto3" json:"used,omitempty"`
}
func (x *UsageResp) Reset() {
@ -1865,11 +1817,11 @@ type SearchResp_Nested struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
IsDir bool `protobuf:"varint,1,opt,name=isDir,proto3" json:"isDir"`
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name"`
Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size"`
ModTime int64 `protobuf:"varint,5,opt,name=modTime,proto3" json:"modTime"`
IsDir bool `protobuf:"varint,1,opt,name=isDir,proto3" json:"isDir,omitempty"`
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
ModTime int64 `protobuf:"varint,5,opt,name=modTime,proto3" json:"modTime,omitempty"`
}
func (x *SearchResp_Nested) Reset() {
@ -1943,243 +1895,234 @@ var File_files_proto protoreflect.FileDescriptor
var file_files_proto_rawDesc = []byte{
0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x66,
0x69, 0x6c, 0x65, 0x73, 0x22, 0xb7, 0x01, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73,
0x74, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72,
0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x28,
0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0e, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x52,
0x07, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08,
0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61,
0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0xf3,
0x01, 0x0a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
0x73, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x05,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x18,
0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52,
0x07, 0x6d, 0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65,
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05,
0x69, 0x73, 0x44, 0x69, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x44,
0x69, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x18,
0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b,
0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x74, 0x79, 0x70, 0x65, 0x22, 0x2b, 0x0a, 0x07, 0x53, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x12,
0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x12,
0x10, 0x0a, 0x03, 0x61, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x73,
0x63, 0x22, 0xc4, 0x03, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
0x73, 0x70, 0x12, 0x22, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x0c, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52,
0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x75, 0x6d, 0x44, 0x69, 0x72,
0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6e, 0x75, 0x6d, 0x44, 0x69, 0x72, 0x73,
0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x75, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01,
0x28, 0x05, 0x52, 0x08, 0x6e, 0x75, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x07,
0x73, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e,
0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73,
0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69,
0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18,
0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07,
0x6d, 0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d,
0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0b,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73,
0x44, 0x69, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x44, 0x69, 0x72,
0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x0d, 0x20,
0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x12,
0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79,
0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05,
0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69,
0x7a, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69,
0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28,
0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x45, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0d, 0x75, 0x73, 0x65,
0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x22,
0x0c, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x45, 0x0a,
0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61,
0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24,
0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65,
0x50, 0x61, 0x74, 0x68, 0x22, 0x0c, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65,
0x73, 0x70, 0x22, 0x5f, 0x0a, 0x09, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x12,
0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70,
0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65,
0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72,
0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74,
0x65, 0x6e, 0x74, 0x22, 0x0c, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73,
0x70, 0x22, 0x5b, 0x0a, 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x12, 0x12,
0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61,
0x74, 0x68, 0x12, 0x24, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50,
0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53,
0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72,
0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0xb2,
0x01, 0x0a, 0x0a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2e, 0x0a,
0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x66,
0x69, 0x6c, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x2e,
0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x74, 0x0a,
0x06, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x44, 0x69, 0x72,
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x44, 0x69, 0x72, 0x12, 0x12, 0x0a,
0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74,
0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20,
0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x64,
0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x54,
0x69, 0x6d, 0x65, 0x22, 0x64, 0x0a, 0x0c, 0x54, 0x75, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x69, 0x6c, 0x65, 0x73, 0x22, 0x71, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74,
0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53,
0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a,
0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0x57, 0x0a, 0x0d, 0x54, 0x75, 0x73,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x75, 0x70,
0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0c, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x22,
0x0a, 0x0c, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x66, 0x66, 0x73,
0x65, 0x74, 0x22, 0x86, 0x01, 0x0a, 0x0c, 0x54, 0x75, 0x73, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64,
0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53,
0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x22, 0x0a,
0x0c, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20,
0x01, 0x28, 0x03, 0x52, 0x0c, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65,
0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x33, 0x0a, 0x0d, 0x54,
0x75, 0x73, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x0c,
0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x03, 0x52, 0x0c, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74,
0x22, 0x80, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72,
0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74,
0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a,
0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50,
0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20,
0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c,
0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6c, 0x65, 0x6e,
0x67, 0x74, 0x68, 0x22, 0x31, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65,
0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x47, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e,
0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0d, 0x75, 0x73, 0x65,
0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x22,
0xfa, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70,
0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09,
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x6f,
0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x6f,
0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x06,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f,
0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x6f, 0x64,
0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x44, 0x69, 0x72, 0x18, 0x08, 0x20,
0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x44, 0x69, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73,
0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69,
0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x5a, 0x0a, 0x0a,
0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61,
0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24,
0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65,
0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x5d, 0x0a, 0x0b, 0x50, 0x72, 0x65, 0x76,
0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a,
0x07, 0x6d, 0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07,
0x6d, 0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xb3, 0x01, 0x0a, 0x09, 0x41, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0d, 0x75, 0x73, 0x65,
0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12,
0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69,
0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x76, 0x65,
0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6f, 0x76, 0x65,
0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x0c, 0x0a,
0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x74, 0x0a, 0x0e, 0x44,
0x69, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a,
0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x28, 0x0a,
0x07, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e,
0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07,
0x73, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x22, 0xf3, 0x01, 0x0a, 0x05, 0x49, 0x74, 0x65, 0x6d,
0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a,
0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d,
0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d,
0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x54, 0x69,
0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x54, 0x69, 0x6d,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x44, 0x69, 0x72, 0x18, 0x08,
0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x44, 0x69, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x69,
0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09,
0x69, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70,
0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x2b, 0x0a,
0x07, 0x53, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x62, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x73, 0x63, 0x18,
0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x73, 0x63, 0x22, 0xfe, 0x02, 0x0a, 0x0c, 0x46,
0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x05, 0x69,
0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x66, 0x69, 0x6c,
0x65, 0x73, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12,
0x18, 0x0a, 0x07, 0x6e, 0x75, 0x6d, 0x44, 0x69, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x07, 0x6e, 0x75, 0x6d, 0x44, 0x69, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x75, 0x6d,
0x46, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x75, 0x6d,
0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67,
0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x53,
0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x12,
0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70,
0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18,
0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x65,
0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x6f, 0x64,
0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x6f, 0x64,
0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65,
0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d,
0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x44, 0x69, 0x72, 0x18, 0x0c, 0x20, 0x01,
0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x44, 0x69, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x53,
0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73,
0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x45, 0x0a, 0x09, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0d,
0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61,
0x74, 0x68, 0x22, 0x0c, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70,
0x22, 0x45, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a,
0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74,
0x68, 0x12, 0x24, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61,
0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70,
0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73,
0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x12, 0x0a,
0x04, 0x61, 0x6c, 0x67, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x6c, 0x67,
0x6f, 0x22, 0x2b, 0x0a, 0x0f, 0x44, 0x69, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64,
0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x44,
0x0a, 0x08, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61,
0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24,
0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65,
0x50, 0x61, 0x74, 0x68, 0x22, 0x35, 0x0a, 0x09, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73,
0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x75, 0x73, 0x65, 0x64, 0x32, 0xcb, 0x05, 0x0a, 0x04,
0x46, 0x69, 0x6c, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x2e, 0x66,
0x69, 0x6c, 0x65, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71,
0x1a, 0x13, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73,
0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12,
0x12, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f,
0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x22, 0x0c, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x5f, 0x0a, 0x09, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52,
0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70,
0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75,
0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x0c, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64,
0x52, 0x65, 0x73, 0x70, 0x22, 0x5b, 0x0a, 0x09, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65,
0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61,
0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73,
0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x71,
0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72,
0x79, 0x22, 0xb2, 0x01, 0x0a, 0x0a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70,
0x12, 0x2e, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x18, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65,
0x73, 0x70, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73,
0x1a, 0x74, 0x0a, 0x06, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73,
0x44, 0x69, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x44, 0x69, 0x72,
0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x18, 0x0a, 0x07,
0x6d, 0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d,
0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x64, 0x0a, 0x0c, 0x54, 0x75, 0x73, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0d, 0x75, 0x73,
0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68,
0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x08, 0x52, 0x08, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0x57, 0x0a, 0x0d,
0x54, 0x75, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a,
0x0c, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x0c, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74,
0x68, 0x12, 0x22, 0x0a, 0x0c, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65,
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4f,
0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x86, 0x01, 0x0a, 0x0c, 0x54, 0x75, 0x73, 0x55, 0x70, 0x6c,
0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0d, 0x75, 0x73,
0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68,
0x12, 0x22, 0x0a, 0x0c, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74,
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x66,
0x66, 0x73, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x33,
0x0a, 0x0d, 0x54, 0x75, 0x73, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12,
0x22, 0x0a, 0x0c, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18,
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4f, 0x66, 0x66,
0x73, 0x65, 0x74, 0x22, 0x80, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c,
0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04,
0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68,
0x12, 0x24, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74,
0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61,
0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74,
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16,
0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x31, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61,
0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12,
0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x47, 0x0a, 0x0b, 0x46, 0x69, 0x6c,
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0d,
0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61,
0x74, 0x68, 0x22, 0xfa, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52,
0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73,
0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12,
0x1c, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a,
0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x08, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64,
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a,
0x07, 0x6d, 0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07,
0x6d, 0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x44, 0x69, 0x72,
0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x44, 0x69, 0x72, 0x12, 0x1c, 0x0a,
0x09, 0x69, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08,
0x52, 0x09, 0x69, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x74,
0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22,
0x5a, 0x0a, 0x0a, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a,
0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74,
0x68, 0x12, 0x24, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61,
0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70,
0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x5d, 0x0a, 0x0b, 0x50,
0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65,
0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x03, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xb3, 0x01, 0x0a, 0x09, 0x41,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0d,
0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61,
0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08,
0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08,
0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65,
0x22, 0x0c, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x74,
0x0a, 0x0e, 0x44, 0x69, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71,
0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x70, 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63,
0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65,
0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69,
0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73,
0x12, 0x12, 0x0a, 0x04, 0x61, 0x6c, 0x67, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x61, 0x6c, 0x67, 0x6f, 0x22, 0x2b, 0x0a, 0x0f, 0x44, 0x69, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x6c,
0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x22, 0x44, 0x0a, 0x08, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a,
0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74,
0x68, 0x12, 0x24, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70, 0x61, 0x63, 0x65, 0x50, 0x61,
0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x53, 0x70,
0x61, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x22, 0x35, 0x0a, 0x09, 0x55, 0x73, 0x61, 0x67, 0x65,
0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73,
0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x75, 0x73, 0x65, 0x64, 0x32, 0xcb,
0x05, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12,
0x12, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74,
0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x06, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x12, 0x10, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x06, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x10, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x06,
0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x10, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x73,
0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73,
0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a,
0x06, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x10, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e,
0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65,
0x73, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x38,
0x0a, 0x09, 0x54, 0x75, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x13, 0x2e, 0x66, 0x69,
0x6c, 0x65, 0x73, 0x2e, 0x54, 0x75, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
0x1a, 0x14, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x54, 0x75, 0x73, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x09, 0x54, 0x75, 0x73, 0x55,
0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x13, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x54, 0x75,
0x73, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x66, 0x69, 0x6c,
0x65, 0x73, 0x2e, 0x54, 0x75, 0x73, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70,
0x22, 0x00, 0x12, 0x50, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x54,
0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x04, 0x49, 0x6e,
0x66, 0x6f, 0x12, 0x12, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x46,
0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a,
0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x10, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65,
0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x2f,
0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x10, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73,
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x66, 0x69, 0x6c,
0x65, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12,
0x2f, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x10, 0x2e, 0x66, 0x69, 0x6c, 0x65,
0x73, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x66, 0x69,
0x6c, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00,
0x12, 0x2f, 0x0a, 0x06, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x10, 0x2e, 0x66, 0x69, 0x6c,
0x65, 0x73, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x66,
0x69, 0x6c, 0x65, 0x73, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22,
0x00, 0x12, 0x38, 0x0a, 0x09, 0x54, 0x75, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x13,
0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x54, 0x75, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x54, 0x75, 0x73, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x09, 0x54,
0x75, 0x73, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x13, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73,
0x2e, 0x54, 0x75, 0x73, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e,
0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x54, 0x75, 0x73, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52,
0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62,
0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x66, 0x69, 0x6c,
0x65, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e,
0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e,
0x52, 0x65, 0x73, 0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65,
0x72, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x73,
0x75, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65,
0x73, 0x70, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x07, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12,
0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x52,
0x65, 0x71, 0x1a, 0x12, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69,
0x65, 0x77, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x10, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x41, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0b, 0x44, 0x69, 0x72,
0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x15, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73,
0x2e, 0x44, 0x69, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a,
0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x44, 0x69, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x6c,
0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x30, 0x01, 0x12, 0x2c, 0x0a, 0x05, 0x55,
0x73, 0x61, 0x67, 0x65, 0x12, 0x0f, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x61,
0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x55, 0x73,
0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x3b,
0x66, 0x69, 0x6c, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x07, 0x50, 0x72, 0x65, 0x76, 0x69,
0x65, 0x77, 0x12, 0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69,
0x65, 0x77, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x50, 0x72,
0x65, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x06, 0x41,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x41, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e,
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0b,
0x44, 0x69, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x15, 0x2e, 0x66, 0x69,
0x6c, 0x65, 0x73, 0x2e, 0x44, 0x69, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52,
0x65, 0x71, 0x1a, 0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x44, 0x69, 0x72, 0x44, 0x6f,
0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x30, 0x01, 0x12, 0x2c,
0x0a, 0x05, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0f, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e,
0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73,
0x2e, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x0a, 0x5a, 0x08,
0x2e, 0x2f, 0x3b, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

194
api/files/files.proto Normal file
View File

@ -0,0 +1,194 @@
syntax = "proto3";
package files;
option go_package = "./;files";
service File {
rpc List(FileListReq) returns (FileListResp) {} //
rpc Info(FileInfoReq) returns (FileInfoResp) {} //
rpc Create(CreateReq) returns (CreateResp) {} //
rpc Delete(DeleteReq) returns (DeleteResp) {} //
rpc Search(searchReq) returns (searchResp) {} //
rpc Upload(UploadReq) returns (UploadResp) {} //
rpc TusCreate(TusCreateReq) returns (TusCreateResp) {
} //
rpc TusUpload(TusUploadReq) returns (TusUploadResp) {
} //
rpc ResumableTransfer(ResumableTransferReq) returns (ResumableTransferResp) {
} // grpc实现
rpc Preview(PreviewReq) returns (PreviewResp) {} //
rpc Action(ActionReq) returns (ActionResp) {} //
rpc DirDownload(DirDownloadReq) returns (stream DirDownloadResp) {
} //
rpc Usage(UsageReq) returns (UsageResp) {} //使
}
message FileListReq {
string path = 1; //
string userSpacePath = 2; //
Sorting sorting = 3;
}
message Items {
string path = 1;
string name = 2;
int64 size = 3;
string extension = 4;
string modified = 5;
int64 modTime = 6;
string mode = 7;
bool isDir = 8;
bool isSymlink = 9;
string type = 10;
}
message Sorting {
string by = 1;
bool asc = 2;
}
message FileListResp {
repeated Items items = 1;
int32 numDirs = 2;
int32 numFiles = 3;
Sorting sorting = 4;
string path = 5;
string name = 6;
int64 size = 7;
string extension = 8;
string modified = 9;
int64 modTime = 10;
string mode = 11;
bool isDir = 12;
bool isSymlink = 13;
string type = 14;
}
message CreateReq {
string path = 1;
string userSpacePath = 2;
}
message CreateResp {}
message DeleteReq {
string path = 1;
string userSpacePath = 2;
}
message DeleteResp {}
message UploadReq {
string path = 1;
string userSpacePath = 2;
bytes content = 3;
}
message UploadResp {}
message searchReq {
string path = 1;
string userSpacePath = 2;
string query = 3;
}
message searchResp {
message Nested {
bool isDir = 1;
string path = 2;
string name = 3;
int64 size = 4;
int64 modTime = 5;
}
repeated Nested items = 1;
}
message TusCreateReq {
string path = 1;
string userSpacePath = 2;
bool override = 3;
}
message TusCreateResp {
int64 uploadLength = 1;
int64 uploadOffset = 2;
}
message TusUploadReq {
string path = 1;
string userSpacePath = 2;
int64 uploadOffset = 3;
bytes content = 4;
}
message TusUploadResp { int64 uploadOffset = 1; }
message ResumableTransferReq {
string path = 1;
string userSpacePath = 2;
int64 offset = 3;
int64 length = 4;
}
message ResumableTransferResp { bytes content = 1; }
message FileInfoReq {
string path = 1;
string userSpacePath = 2;
}
message FileInfoResp {
string path = 1;
string name = 2;
int64 size = 3;
string extension = 4;
string modified = 5;
string mode = 6;
int64 modTime = 7;
bool isDir = 8;
bool isSymlink = 9;
string type = 10;
}
message PreviewReq {
string path = 1;
string userSpacePath = 2;
uint32 size = 3; // 0256x256, 1:1080x1080
}
message PreviewResp {
bytes content = 1;
string fileName = 2;
int64 modTime = 3;
}
message ActionReq {
string path = 1;
string userSpacePath = 2;
string action = 3;
string destination = 4;
bool override = 5;
bool rename = 6;
}
message ActionResp {}
message DirDownloadReq {
string path = 1;
string userSpacePath = 2;
repeated string files = 3;
string algo = 4;
}
message DirDownloadResp { bytes content = 1; }
message UsageReq {
string path = 1;
string userSpacePath = 2;
}
message UsageResp {
int64 total = 1;
int64 used = 2;
}

View File

@ -1,13 +1,14 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
// - protoc-gen-go-triple v1.0.5
// - protoc v5.26.0
// - protoc-gen-go-triple v1.0.8
// - protoc v3.20.3
// source: files.proto
package files
import (
context "context"
constant1 "dubbo.apache.org/dubbo-go/v3/common/constant"
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
@ -594,6 +595,13 @@ func _File_Action_Handler(srv interface{}, ctx context.Context, dec func(interfa
func _File_DirDownload_Handler(srv interface{}, stream grpc_go.ServerStream) error {
_, ok := srv.(dubbo3.Dubbo3GrpcService)
ctx := stream.Context()
md, _ := metadata.FromIncomingContext(ctx)
invAttachment := make(map[string]interface{}, len(md))
for k, v := range md {
invAttachment[k] = v
}
stream.(grpc_go.CtxSetterStream).SetContext(context.WithValue(ctx, constant1.AttachmentKey, invAttachment))
invo := invocation.NewRPCInvocation("DirDownload", nil, nil)
if !ok {
fmt.Println(invo)

File diff suppressed because it is too large Load Diff

View File

@ -1,194 +0,0 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: pb/ayrshare.proto
package aryshare
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
_ "google.golang.org/protobuf/types/descriptorpb"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *UserTag) Validate() error {
return nil
}
func (this *InstagramOptions) Validate() error {
for _, item := range this.UserTags {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("UserTags", err)
}
}
}
return nil
}
func (this *TikTokOptions) Validate() error {
return nil
}
func (this *PostRequest) Validate() error {
if this.Post == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Post", fmt.Errorf(`post内容不能为空`))
}
if len(this.Platforms) < 1 {
return github_com_mwitkow_go_proto_validators.FieldError("Platforms", fmt.Errorf(`platforms平台列表不能为空`))
}
if this.InstagramOptions != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.InstagramOptions); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("InstagramOptions", err)
}
}
if this.TikTokOptions != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.TikTokOptions); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("TikTokOptions", err)
}
}
return nil
}
func (this *PostId) Validate() error {
return nil
}
func (this *PostItem) Validate() error {
for _, item := range this.PostIds {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("PostIds", err)
}
}
}
return nil
}
func (this *PostResponse) Validate() error {
for _, item := range this.Posts {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Posts", err)
}
}
}
for _, item := range this.PostIds {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("PostIds", err)
}
}
}
return nil
}
func (this *GetPostRequest) Validate() error {
if this.Id == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Id", fmt.Errorf(`帖子ID不能为空`))
}
return nil
}
func (this *GetPostResponse) Validate() error {
for _, item := range this.PostIds {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("PostIds", err)
}
}
}
return nil
}
func (this *GetUserRequest) Validate() error {
return nil
}
func (this *Timestamp) Validate() error {
return nil
}
func (this *TwitterUsage) Validate() error {
return nil
}
func (this *DisplayName) Validate() error {
if this.TwitterUsage != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.TwitterUsage); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("TwitterUsage", err)
}
}
return nil
}
func (this *GetUserResponse) Validate() error {
if this.Created != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Created); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Created", err)
}
}
for _, item := range this.DisplayNames {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("DisplayNames", err)
}
}
}
return nil
}
func (this *CreateProfileRequest) Validate() error {
if this.Title == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Title", fmt.Errorf(`title不能为空`))
}
return nil
}
func (this *CreateProfileResponse) Validate() error {
return nil
}
func (this *GetProfilesRequest) Validate() error {
return nil
}
func (this *ProfileItem) Validate() error {
if this.Created != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Created); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Created", err)
}
}
return nil
}
func (this *Pagination) Validate() error {
return nil
}
func (this *GetProfilesResponse) Validate() error {
for _, item := range this.Profiles {
if item != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Profiles", err)
}
}
}
if this.Pagination != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Pagination); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Pagination", err)
}
}
return nil
}
func (this *Email) Validate() error {
return nil
}
func (this *GenerateJWTRequest) Validate() error {
if this.Domain == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Domain", fmt.Errorf(`domain不能为空`))
}
if this.PrivateKey == "" {
return github_com_mwitkow_go_proto_validators.FieldError("PrivateKey", fmt.Errorf(`privateKey不能为空`))
}
if this.ProfileKey == "" {
return github_com_mwitkow_go_proto_validators.FieldError("ProfileKey", fmt.Errorf(`profileKey不能为空`))
}
if this.Email != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Email); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Email", err)
}
}
return nil
}
func (this *GenerateJWTResponse) Validate() error {
return nil
}

View File

@ -1,378 +0,0 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
// - protoc-gen-go-triple v1.0.8
// - protoc v3.21.1
// source: pb/ayrshare.proto
package aryshare
import (
context "context"
protocol "dubbo.apache.org/dubbo-go/v3/protocol"
dubbo3 "dubbo.apache.org/dubbo-go/v3/protocol/dubbo3"
invocation "dubbo.apache.org/dubbo-go/v3/protocol/invocation"
grpc_go "github.com/dubbogo/grpc-go"
codes "github.com/dubbogo/grpc-go/codes"
metadata "github.com/dubbogo/grpc-go/metadata"
status "github.com/dubbogo/grpc-go/status"
common "github.com/dubbogo/triple/pkg/common"
constant "github.com/dubbogo/triple/pkg/common/constant"
triple "github.com/dubbogo/triple/pkg/triple"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc_go.SupportPackageIsVersion7
// AyrshareClient is the client API for Ayrshare 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 AyrshareClient interface {
// 帖子相关 api
Post(ctx context.Context, in *PostRequest, opts ...grpc_go.CallOption) (*PostResponse, common.ErrorWithAttachment)
GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc_go.CallOption) (*GetPostResponse, common.ErrorWithAttachment)
// 用户相关 api
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc_go.CallOption) (*GetUserResponse, common.ErrorWithAttachment)
// 用户配置相关 api
CreateProfile(ctx context.Context, in *CreateProfileRequest, opts ...grpc_go.CallOption) (*CreateProfileResponse, common.ErrorWithAttachment)
GetProfiles(ctx context.Context, in *GetProfilesRequest, opts ...grpc_go.CallOption) (*GetProfilesResponse, common.ErrorWithAttachment)
GenerateJWT(ctx context.Context, in *GenerateJWTRequest, opts ...grpc_go.CallOption) (*GenerateJWTResponse, common.ErrorWithAttachment)
}
type ayrshareClient struct {
cc *triple.TripleConn
}
type AyrshareClientImpl struct {
Post func(ctx context.Context, in *PostRequest) (*PostResponse, error)
GetPost func(ctx context.Context, in *GetPostRequest) (*GetPostResponse, error)
GetUser func(ctx context.Context, in *GetUserRequest) (*GetUserResponse, error)
CreateProfile func(ctx context.Context, in *CreateProfileRequest) (*CreateProfileResponse, error)
GetProfiles func(ctx context.Context, in *GetProfilesRequest) (*GetProfilesResponse, error)
GenerateJWT func(ctx context.Context, in *GenerateJWTRequest) (*GenerateJWTResponse, error)
}
func (c *AyrshareClientImpl) GetDubboStub(cc *triple.TripleConn) AyrshareClient {
return NewAyrshareClient(cc)
}
func (c *AyrshareClientImpl) XXX_InterfaceName() string {
return "aryshare.Ayrshare"
}
func NewAyrshareClient(cc *triple.TripleConn) AyrshareClient {
return &ayrshareClient{cc}
}
func (c *ayrshareClient) Post(ctx context.Context, in *PostRequest, opts ...grpc_go.CallOption) (*PostResponse, common.ErrorWithAttachment) {
out := new(PostResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/Post", in, out)
}
func (c *ayrshareClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc_go.CallOption) (*GetPostResponse, common.ErrorWithAttachment) {
out := new(GetPostResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetPost", in, out)
}
func (c *ayrshareClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc_go.CallOption) (*GetUserResponse, common.ErrorWithAttachment) {
out := new(GetUserResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetUser", in, out)
}
func (c *ayrshareClient) CreateProfile(ctx context.Context, in *CreateProfileRequest, opts ...grpc_go.CallOption) (*CreateProfileResponse, common.ErrorWithAttachment) {
out := new(CreateProfileResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateProfile", in, out)
}
func (c *ayrshareClient) GetProfiles(ctx context.Context, in *GetProfilesRequest, opts ...grpc_go.CallOption) (*GetProfilesResponse, common.ErrorWithAttachment) {
out := new(GetProfilesResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetProfiles", in, out)
}
func (c *ayrshareClient) GenerateJWT(ctx context.Context, in *GenerateJWTRequest, opts ...grpc_go.CallOption) (*GenerateJWTResponse, common.ErrorWithAttachment) {
out := new(GenerateJWTResponse)
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GenerateJWT", in, out)
}
// AyrshareServer is the server API for Ayrshare service.
// All implementations must embed UnimplementedAyrshareServer
// for forward compatibility
type AyrshareServer interface {
// 帖子相关 api
Post(context.Context, *PostRequest) (*PostResponse, error)
GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error)
// 用户相关 api
GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
// 用户配置相关 api
CreateProfile(context.Context, *CreateProfileRequest) (*CreateProfileResponse, error)
GetProfiles(context.Context, *GetProfilesRequest) (*GetProfilesResponse, error)
GenerateJWT(context.Context, *GenerateJWTRequest) (*GenerateJWTResponse, error)
mustEmbedUnimplementedAyrshareServer()
}
// UnimplementedAyrshareServer must be embedded to have forward compatible implementations.
type UnimplementedAyrshareServer struct {
proxyImpl protocol.Invoker
}
func (UnimplementedAyrshareServer) Post(context.Context, *PostRequest) (*PostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Post not implemented")
}
func (UnimplementedAyrshareServer) GetPost(context.Context, *GetPostRequest) (*GetPostResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPost not implemented")
}
func (UnimplementedAyrshareServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
}
func (UnimplementedAyrshareServer) CreateProfile(context.Context, *CreateProfileRequest) (*CreateProfileResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateProfile not implemented")
}
func (UnimplementedAyrshareServer) GetProfiles(context.Context, *GetProfilesRequest) (*GetProfilesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetProfiles not implemented")
}
func (UnimplementedAyrshareServer) GenerateJWT(context.Context, *GenerateJWTRequest) (*GenerateJWTResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GenerateJWT not implemented")
}
func (s *UnimplementedAyrshareServer) XXX_SetProxyImpl(impl protocol.Invoker) {
s.proxyImpl = impl
}
func (s *UnimplementedAyrshareServer) XXX_GetProxyImpl() protocol.Invoker {
return s.proxyImpl
}
func (s *UnimplementedAyrshareServer) XXX_ServiceDesc() *grpc_go.ServiceDesc {
return &Ayrshare_ServiceDesc
}
func (s *UnimplementedAyrshareServer) XXX_InterfaceName() string {
return "aryshare.Ayrshare"
}
func (UnimplementedAyrshareServer) mustEmbedUnimplementedAyrshareServer() {}
// UnsafeAyrshareServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AyrshareServer will
// result in compilation errors.
type UnsafeAyrshareServer interface {
mustEmbedUnimplementedAyrshareServer()
}
func RegisterAyrshareServer(s grpc_go.ServiceRegistrar, srv AyrshareServer) {
s.RegisterService(&Ayrshare_ServiceDesc, srv)
}
func _Ayrshare_Post_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(PostRequest)
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("Post", 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 _Ayrshare_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetPostRequest)
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("GetPost", 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 _Ayrshare_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserRequest)
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("GetUser", 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 _Ayrshare_CreateProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateProfileRequest)
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("CreateProfile", 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 _Ayrshare_GetProfiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GetProfilesRequest)
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("GetProfiles", 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 _Ayrshare_GenerateJWT_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
in := new(GenerateJWTRequest)
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("GenerateJWT", 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)
}
// Ayrshare_ServiceDesc is the grpc_go.ServiceDesc for Ayrshare service.
// It's only intended for direct use with grpc_go.RegisterService,
// and not to be introspected or modified (even as a copy)
var Ayrshare_ServiceDesc = grpc_go.ServiceDesc{
ServiceName: "aryshare.Ayrshare",
HandlerType: (*AyrshareServer)(nil),
Methods: []grpc_go.MethodDesc{
{
MethodName: "Post",
Handler: _Ayrshare_Post_Handler,
},
{
MethodName: "GetPost",
Handler: _Ayrshare_GetPost_Handler,
},
{
MethodName: "GetUser",
Handler: _Ayrshare_GetUser_Handler,
},
{
MethodName: "CreateProfile",
Handler: _Ayrshare_CreateProfile_Handler,
},
{
MethodName: "GetProfiles",
Handler: _Ayrshare_GetProfiles_Handler,
},
{
MethodName: "GenerateJWT",
Handler: _Ayrshare_GenerateJWT_Handler,
},
},
Streams: []grpc_go.StreamDesc{},
Metadata: "pb/ayrshare.proto",
}

View File

@ -1,297 +0,0 @@
syntax = "proto3";
package aryshare;
option go_package = "./aryshare";
import "pb/descriptor.proto";
import "pb/validator.proto";
service Ayrshare {
// api
rpc Post(PostRequest) returns (PostResponse);
rpc GetPost(GetPostRequest) returns (GetPostResponse);
// api
rpc GetUser(GetUserRequest) returns (GetUserResponse);
// api
rpc CreateProfile(CreateProfileRequest) returns (CreateProfileResponse);
rpc GetProfiles(GetProfilesRequest) returns (GetProfilesResponse);
rpc GenerateJWT(GenerateJWTRequest) returns (GenerateJWTResponse);
}
// Instagram
message UserTag {
string username = 1 [json_name = "username"];
double x = 2 [json_name = "x"]; // Required for images, cannot be used with Reels
double y = 3 [json_name = "y"]; // Required for images, cannot be used with Reels
}
// Instagram
message InstagramOptions {
bool shareReelsFeed = 1 [json_name = "shareReelsFeed"]; // Whether Reel can appear in both Feed and Reels tabs
string audioName = 2 [json_name = "audioName"]; // Name of the audio music for Reels
string thumbNail = 3 [json_name = "thumbNail"]; // URL of the Reel cover image (thumbnail)
int32 thumbNailOffset = 4 [json_name = "thumbNailOffset"]; // Offset in milliseconds of the thumbnail frame
bool stories = 5 [json_name = "stories"]; // Whether to post as Instagram Story
repeated string altText = 6 [json_name = "altText"]; // Array of alternative text for images (up to 1000 chars per image)
string locationId = 7 [json_name = "locationId"]; // Facebook Page ID or Page name
repeated UserTag userTags = 8 [json_name = "userTags"]; // Array of user tags with username and coordinates
repeated string collaborators = 9 [json_name = "collaborators"]; // Array of Instagram usernames (up to 3)
bool autoResize = 10 [json_name = "autoResize"]; // Auto resize images to 1080x1080px (Max Pack required)
bool disableComments = 11 [json_name = "disableComments"]; // Disable comments on the published post
}
// TikTok
message TikTokOptions {
bool autoAddMusic = 1 [json_name = "autoAddMusic"]; // Whether to automatically add recommended music (image only)
bool disableComments = 2 [json_name = "disableComments"]; // Whether to disable comments on the published post
bool disableDuet = 3 [json_name = "disableDuet"]; // Disable duets on the published video (video only)
bool disableStitch = 4 [json_name = "disableStitch"]; // Disable stitch on the published video (video only)
bool draft = 5 [json_name = "draft"]; // Whether to create a draft post
bool isAIGenerated = 6 [json_name = "isAIGenerated"]; // Whether to enable AI-generated content toggle (video only)
bool isBrandedContent = 7 [json_name = "isBrandedContent"]; // Whether to enable Branded Content toggle
bool isBrandOrganic = 8 [json_name = "isBrandOrganic"]; // Whether to enable Brand Organic Content toggle
int32 imageCoverIndex = 9 [json_name = "imageCoverIndex"]; // Index of mediaUrls to be used as cover (image only, default 0)
string title = 10 [json_name = "title"]; // Title of the post (image only)
int32 thumbNailOffset = 11 [json_name = "thumbNailOffset"]; // Frame to use for video cover in milliseconds (video only)
string thumbNail = 12 [json_name = "thumbNail"]; // URL of thumbnail image for video (video only)
string visibility = 13 [json_name = "visibility"]; // How the post is shared: "public", "private", "followers", "friends" (image only, default "public")
}
//
message PostRequest {
string post = 1 [json_name = "post", (validator.field) = {string_not_empty: true, human_error: "post内容不能为空"}];
repeated string platforms = 2 [json_name = "platforms", (validator.field) = {repeated_count_min: 1, human_error: "platforms平台列表不能为空"}];
repeated string mediaUrls = 3 [json_name = "mediaUrls"];
bool isVideo = 4 [json_name = "isVideo"];
string scheduleDate = 5 [json_name = "scheduleDate"];
bool validateScheduled = 6 [json_name = "validateScheduled"];
bool shortenLinks = 7 [json_name = "shortenLinks"];
bool disableComments = 8 [json_name = "disableComments"];
InstagramOptions instagramOptions = 9 [json_name = "instagramOptions"];
TikTokOptions tikTokOptions = 10 [json_name = "tikTokOptions"];
string profileKey = 11 [json_name = "profileKey"];
}
// ID响应
message PostId {
string status = 1 [json_name = "status"];
string id = 2 [json_name = "id"];
string cid = 3 [json_name = "cid"];
string postUrl = 4 [json_name = "postUrl"];
string platform = 5 [json_name = "platform"];
string type = 6 [json_name = "type"];
string owner = 7 [json_name = "owner"];
string mediaId = 8 [json_name = "mediaId"];
string ended = 9 [json_name = "ended"];
string idShare = 10 [json_name = "idShare"];
bool isVideo = 11 [json_name = "isVideo"];
int32 usedQuota = 12 [json_name = "usedQuota"];
}
// 使 profile key
message PostItem {
string status = 1 [json_name = "status"];
repeated string errors = 2 [json_name = "errors"];
repeated PostId postIds = 3 [json_name = "postIds"];
string id = 4 [json_name = "id"];
string refId = 5 [json_name = "refId"];
string profileTitle = 6 [json_name = "profileTitle"];
string post = 7 [json_name = "post"];
}
//
message PostResponse {
string status = 1 [json_name = "status"];
repeated PostItem posts = 2 [json_name = "posts"];
// 使 profile key
repeated string errors = 3 [json_name = "errors"];
repeated PostId postIds = 4 [json_name = "postIds"];
string id = 5 [json_name = "id"];
}
//
message GetPostRequest {
string id = 1 [json_name = "id", (validator.field) = {string_not_empty: true, human_error: "帖子ID不能为空"}];
string profileKey = 2 [json_name = "profileKey"];
}
//
message GetPostResponse {
string created = 1 [json_name = "created"];
repeated string errors = 2 [json_name = "errors"];
string id = 3 [json_name = "id"];
repeated string mediaUrls = 4 [json_name = "mediaUrls"];
repeated string platforms = 5 [json_name = "platforms"];
string post = 6 [json_name = "post"];
repeated PostId postIds = 7 [json_name = "postIds"];
string profileTitle = 8 [json_name = "profileTitle"];
string refId = 9 [json_name = "refId"];
string scheduleDate = 10 [json_name = "scheduleDate"];
bool shortenLinks = 11 [json_name = "shortenLinks"];
string status = 12 [json_name = "status"];
string type = 13 [json_name = "type"];
}
//
message GetUserRequest {
string profileKey = 1 [json_name = "profileKey"];
bool instagramDetails = 2 [json_name = "instagramDetails"];
}
//
message Timestamp {
int64 seconds = 1 [json_name = "_seconds"];
int64 nanoseconds = 2 [json_name = "_nanoseconds"];
string utc = 3 [json_name = "utc"];
}
// Twitter 使
message TwitterUsage {
int32 monthlyUsage = 1 [json_name = "monthlyUsage"];
int32 monthlyLimit = 2 [json_name = "monthlyLimit"];
string monthlyReset = 3 [json_name = "monthlyReset"];
}
//
message DisplayName {
string created = 1 [json_name = "created"];
string displayName = 2 [json_name = "displayName"];
string id = 3 [json_name = "id"];
string platform = 4 [json_name = "platform"];
string profileUrl = 5 [json_name = "profileUrl"];
string userImage = 6 [json_name = "userImage"];
string username = 7 [json_name = "username"];
string description = 8 [json_name = "description"];
bool messagingActive = 9 [json_name = "messagingActive"];
string pageName = 10 [json_name = "pageName"];
string userId = 11 [json_name = "userId"];
string mapsUrl = 12 [json_name = "mapsUrl"];
string placeId = 13 [json_name = "placeId"];
string reviewUrl = 14 [json_name = "reviewUrl"];
string igId = 15 [json_name = "igId"];
string type = 16 [json_name = "type"];
int32 usedQuota = 17 [json_name = "usedQuota"];
int32 refreshDaysRemaining = 18 [json_name = "refreshDaysRemaining"];
string refreshRequired = 19 [json_name = "refreshRequired"];
bool isEligibleForGeoRestrictions = 20 [json_name = "isEligibleForGeoRestrictions"];
bool isVerified = 21 [json_name = "isVerified"];
string subscriptionType = 22 [json_name = "subscriptionType"];
TwitterUsage twitterUsage = 23 [json_name = "twitterUsage"];
string verifiedType = 24 [json_name = "verifiedType"];
}
//
message GetUserResponse {
repeated string activeSocialAccounts = 1 [json_name = "activeSocialAccounts"];
Timestamp created = 2 [json_name = "created"];
repeated DisplayName displayNames = 3 [json_name = "displayNames"];
string email = 4 [json_name = "email"];
string lastApiCall = 5 [json_name = "lastApiCall"];
int32 messagingConversationMonthlyCount = 6 [json_name = "messagingConversationMonthlyCount"];
bool messagingEnabled = 7 [json_name = "messagingEnabled"];
int32 monthlyApiCalls = 8 [json_name = "monthlyApiCalls"];
int32 monthlyPostCount = 9 [json_name = "monthlyPostCount"];
int32 monthlyPostQuota = 10 [json_name = "monthlyPostQuota"];
int32 monthlyApiCallsQuota = 11 [json_name = "monthlyApiCallsQuota"];
string refId = 12 [json_name = "refId"];
string title = 13 [json_name = "title"];
string lastUpdated = 14 [json_name = "lastUpdated"];
string nextUpdate = 15 [json_name = "nextUpdate"];
}
//
message CreateProfileRequest {
string title = 1 [json_name = "title", (validator.field) = {string_not_empty: true, human_error: "title不能为空"}];
bool messagingActive = 2 [json_name = "messagingActive"];
bool hideTopHeader = 3 [json_name = "hideTopHeader"];
string topHeader = 4 [json_name = "topHeader"];
repeated string disableSocial = 5 [json_name = "disableSocial"];
bool team = 6 [json_name = "team"];
string email = 7 [json_name = "email"];
string subHeader = 8 [json_name = "subHeader"];
repeated string tags = 9 [json_name = "tags"];
}
//
message CreateProfileResponse {
string status = 1 [json_name = "status"];
string title = 2 [json_name = "title"];
string refId = 3 [json_name = "refId"];
string profileKey = 4 [json_name = "profileKey"];
bool messagingActive = 5 [json_name = "messagingActive"];
}
//
message GetProfilesRequest {
string title = 1 [json_name = "title"];
string refId = 2 [json_name = "refId"];
bool hasActiveSocialAccounts = 3 [json_name = "hasActiveSocialAccounts"];
repeated string includesActiveSocialAccounts = 4 [json_name = "includesActiveSocialAccounts"];
oneof actionLog {
bool actionLogBool = 5 [json_name = "actionLogBool"];
int32 actionLogInt = 6 [json_name = "actionLogInt"];
}
int32 limit = 7 [json_name = "limit"];
string cursor = 8 [json_name = "cursor"];
}
//
message ProfileItem {
string status = 1 [json_name = "status"];
string title = 2 [json_name = "title"];
string displayTitle = 3 [json_name = "displayTitle"];
Timestamp created = 4 [json_name = "created"];
string createdUTC = 5 [json_name = "createdUTC"];
string refId = 6 [json_name = "refId"];
repeated string activeSocialAccounts = 7 [json_name = "activeSocialAccounts"];
bool suspended = 8 [json_name = "suspended"];
}
//
message Pagination {
bool hasMore = 1 [json_name = "hasMore"];
string nextCursor = 2 [json_name = "nextCursor"];
int32 limit = 3 [json_name = "limit"];
}
//
message GetProfilesResponse {
repeated ProfileItem profiles = 1 [json_name = "profiles"];
int32 count = 2 [json_name = "count"];
string lastUpdated = 3 [json_name = "lastUpdated"];
string nextUpdate = 4 [json_name = "nextUpdate"];
Pagination pagination = 5 [json_name = "pagination"];
}
//
message Email {
string to = 1 [json_name = "to"];
string subject = 2 [json_name = "subject"];
string body = 3 [json_name = "body"];
}
// JWT请求
message GenerateJWTRequest {
string domain = 1 [json_name = "domain", (validator.field) = {string_not_empty: true, human_error: "domain不能为空"}];
string privateKey = 2 [json_name = "privateKey", (validator.field) = {string_not_empty: true, human_error: "privateKey不能为空"}];
string profileKey = 3 [json_name = "profileKey", (validator.field) = {string_not_empty: true, human_error: "profileKey不能为空"}];
bool logout = 4 [json_name = "logout"];
string redirect = 5 [json_name = "redirect"];
repeated string allowedSocial = 6 [json_name = "allowedSocial"];
bool verify = 7 [json_name = "verify"];
bool base64 = 8 [json_name = "base64"];
int32 expiresIn = 9 [json_name = "expiresIn"];
Email email = 10 [json_name = "email"];
}
// JWT响应
message GenerateJWTResponse {
string status = 1 [json_name = "status"];
string title = 2 [json_name = "title"];
string token = 3 [json_name = "token"];
string url = 4 [json_name = "url"];
bool emailSent = 5 [json_name = "emailSent"];
string expiresIn = 6 [json_name = "expiresIn"];
}

View File

@ -1,923 +0,0 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Author: kenton@google.com (Kenton Varda)
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
//
// The messages in this file describe the definitions found in .proto files.
// A valid .proto file can be translated directly to a FileDescriptorProto
// without any other information (e.g. without reading its imports).
syntax = "proto2";
package google.protobuf;
option go_package = "google.golang.org/protobuf/types/descriptorpb";
option java_package = "com.google.protobuf";
option java_outer_classname = "DescriptorProtos";
option csharp_namespace = "Google.Protobuf.Reflection";
option objc_class_prefix = "GPB";
option cc_enable_arenas = true;
// descriptor.proto must be optimized for speed because reflection-based
// algorithms don't work during bootstrapping.
option optimize_for = SPEED;
// The protocol compiler can output a FileDescriptorSet containing the .proto
// files it parses.
message FileDescriptorSet {
repeated FileDescriptorProto file = 1;
}
// Describes a complete .proto file.
message FileDescriptorProto {
optional string name = 1; // file name, relative to root of source tree
optional string package = 2; // e.g. "foo", "foo.bar", etc.
// Names of files imported by this file.
repeated string dependency = 3;
// Indexes of the public imported files in the dependency list above.
repeated int32 public_dependency = 10;
// Indexes of the weak imported files in the dependency list.
// For Google-internal migration only. Do not use.
repeated int32 weak_dependency = 11;
// All top-level definitions in this file.
repeated DescriptorProto message_type = 4;
repeated EnumDescriptorProto enum_type = 5;
repeated ServiceDescriptorProto service = 6;
repeated FieldDescriptorProto extension = 7;
optional FileOptions options = 8;
// This field contains optional information about the original source code.
// You may safely remove this entire field without harming runtime
// functionality of the descriptors -- the information is needed only by
// development tools.
optional SourceCodeInfo source_code_info = 9;
// The syntax of the proto file.
// The supported values are "proto2", "proto3", and "editions".
//
// If `edition` is present, this value must be "editions".
optional string syntax = 12;
// The edition of the proto file, which is an opaque string.
optional string edition = 13;
}
// Describes a message type.
message DescriptorProto {
optional string name = 1;
repeated FieldDescriptorProto field = 2;
repeated FieldDescriptorProto extension = 6;
repeated DescriptorProto nested_type = 3;
repeated EnumDescriptorProto enum_type = 4;
message ExtensionRange {
optional int32 start = 1; // Inclusive.
optional int32 end = 2; // Exclusive.
optional ExtensionRangeOptions options = 3;
}
repeated ExtensionRange extension_range = 5;
repeated OneofDescriptorProto oneof_decl = 8;
optional MessageOptions options = 7;
// Range of reserved tag numbers. Reserved tag numbers may not be used by
// fields or extension ranges in the same message. Reserved ranges may
// not overlap.
message ReservedRange {
optional int32 start = 1; // Inclusive.
optional int32 end = 2; // Exclusive.
}
repeated ReservedRange reserved_range = 9;
// Reserved field names, which may not be used by fields in the same message.
// A given name may only be reserved once.
repeated string reserved_name = 10;
}
message ExtensionRangeOptions {
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
// Clients can define custom options in extensions of this message. See above.
extensions 1000 to max;
}
// Describes a field within a message.
message FieldDescriptorProto {
enum Type {
// 0 is reserved for errors.
// Order is weird for historical reasons.
TYPE_DOUBLE = 1;
TYPE_FLOAT = 2;
// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
// negative values are likely.
TYPE_INT64 = 3;
TYPE_UINT64 = 4;
// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
// negative values are likely.
TYPE_INT32 = 5;
TYPE_FIXED64 = 6;
TYPE_FIXED32 = 7;
TYPE_BOOL = 8;
TYPE_STRING = 9;
// Tag-delimited aggregate.
// Group type is deprecated and not supported in proto3. However, Proto3
// implementations should still be able to parse the group wire format and
// treat group fields as unknown fields.
TYPE_GROUP = 10;
TYPE_MESSAGE = 11; // Length-delimited aggregate.
// New in version 2.
TYPE_BYTES = 12;
TYPE_UINT32 = 13;
TYPE_ENUM = 14;
TYPE_SFIXED32 = 15;
TYPE_SFIXED64 = 16;
TYPE_SINT32 = 17; // Uses ZigZag encoding.
TYPE_SINT64 = 18; // Uses ZigZag encoding.
}
enum Label {
// 0 is reserved for errors
LABEL_OPTIONAL = 1;
LABEL_REQUIRED = 2;
LABEL_REPEATED = 3;
}
optional string name = 1;
optional int32 number = 3;
optional Label label = 4;
// If type_name is set, this need not be set. If both this and type_name
// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
optional Type type = 5;
// For message and enum types, this is the name of the type. If the name
// starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
// rules are used to find the type (i.e. first the nested types within this
// message are searched, then within the parent, on up to the root
// namespace).
optional string type_name = 6;
// For extensions, this is the name of the type being extended. It is
// resolved in the same manner as type_name.
optional string extendee = 2;
// For numeric types, contains the original text representation of the value.
// For booleans, "true" or "false".
// For strings, contains the default text contents (not escaped in any way).
// For bytes, contains the C escaped value. All bytes >= 128 are escaped.
optional string default_value = 7;
// If set, gives the index of a oneof in the containing type's oneof_decl
// list. This field is a member of that oneof.
optional int32 oneof_index = 9;
// JSON name of this field. The value is set by protocol compiler. If the
// user has set a "json_name" option on this field, that option's value
// will be used. Otherwise, it's deduced from the field's name by converting
// it to camelCase.
optional string json_name = 10;
optional FieldOptions options = 8;
// If true, this is a proto3 "optional". When a proto3 field is optional, it
// tracks presence regardless of field type.
//
// When proto3_optional is true, this field must be belong to a oneof to
// signal to old proto3 clients that presence is tracked for this field. This
// oneof is known as a "synthetic" oneof, and this field must be its sole
// member (each proto3 optional field gets its own synthetic oneof). Synthetic
// oneofs exist in the descriptor only, and do not generate any API. Synthetic
// oneofs must be ordered after all "real" oneofs.
//
// For message fields, proto3_optional doesn't create any semantic change,
// since non-repeated message fields always track presence. However it still
// indicates the semantic detail of whether the user wrote "optional" or not.
// This can be useful for round-tripping the .proto file. For consistency we
// give message fields a synthetic oneof also, even though it is not required
// to track presence. This is especially important because the parser can't
// tell if a field is a message or an enum, so it must always create a
// synthetic oneof.
//
// Proto2 optional fields do not set this flag, because they already indicate
// optional with `LABEL_OPTIONAL`.
optional bool proto3_optional = 17;
}
// Describes a oneof.
message OneofDescriptorProto {
optional string name = 1;
optional OneofOptions options = 2;
}
// Describes an enum type.
message EnumDescriptorProto {
optional string name = 1;
repeated EnumValueDescriptorProto value = 2;
optional EnumOptions options = 3;
// Range of reserved numeric values. Reserved values may not be used by
// entries in the same enum. Reserved ranges may not overlap.
//
// Note that this is distinct from DescriptorProto.ReservedRange in that it
// is inclusive such that it can appropriately represent the entire int32
// domain.
message EnumReservedRange {
optional int32 start = 1; // Inclusive.
optional int32 end = 2; // Inclusive.
}
// Range of reserved numeric values. Reserved numeric values may not be used
// by enum values in the same enum declaration. Reserved ranges may not
// overlap.
repeated EnumReservedRange reserved_range = 4;
// Reserved enum value names, which may not be reused. A given name may only
// be reserved once.
repeated string reserved_name = 5;
}
// Describes a value within an enum.
message EnumValueDescriptorProto {
optional string name = 1;
optional int32 number = 2;
optional EnumValueOptions options = 3;
}
// Describes a service.
message ServiceDescriptorProto {
optional string name = 1;
repeated MethodDescriptorProto method = 2;
optional ServiceOptions options = 3;
}
// Describes a method of a service.
message MethodDescriptorProto {
optional string name = 1;
// Input and output type names. These are resolved in the same way as
// FieldDescriptorProto.type_name, but must refer to a message type.
optional string input_type = 2;
optional string output_type = 3;
optional MethodOptions options = 4;
// Identifies if client streams multiple client messages
optional bool client_streaming = 5 [default = false];
// Identifies if server streams multiple server messages
optional bool server_streaming = 6 [default = false];
}
// ===================================================================
// Options
// Each of the definitions above may have "options" attached. These are
// just annotations which may cause code to be generated slightly differently
// or may contain hints for code that manipulates protocol messages.
//
// Clients may define custom options as extensions of the *Options messages.
// These extensions may not yet be known at parsing time, so the parser cannot
// store the values in them. Instead it stores them in a field in the *Options
// message called uninterpreted_option. This field must have the same name
// across all *Options messages. We then use this field to populate the
// extensions when we build a descriptor, at which point all protos have been
// parsed and so all extensions are known.
//
// Extension numbers for custom options may be chosen as follows:
// * For options which will only be used within a single application or
// organization, or for experimental options, use field numbers 50000
// through 99999. It is up to you to ensure that you do not use the
// same number for multiple options.
// * For options which will be published and used publicly by multiple
// independent entities, e-mail protobuf-global-extension-registry@google.com
// to reserve extension numbers. Simply provide your project name (e.g.
// Objective-C plugin) and your project website (if available) -- there's no
// need to explain how you intend to use them. Usually you only need one
// extension number. You can declare multiple options with only one extension
// number by putting them in a sub-message. See the Custom Options section of
// the docs for examples:
// https://developers.google.com/protocol-buffers/docs/proto#options
// If this turns out to be popular, a web service will be set up
// to automatically assign option numbers.
message FileOptions {
// Sets the Java package where classes generated from this .proto will be
// placed. By default, the proto package is used, but this is often
// inappropriate because proto packages do not normally start with backwards
// domain names.
optional string java_package = 1;
// Controls the name of the wrapper Java class generated for the .proto file.
// That class will always contain the .proto file's getDescriptor() method as
// well as any top-level extensions defined in the .proto file.
// If java_multiple_files is disabled, then all the other classes from the
// .proto file will be nested inside the single wrapper outer class.
optional string java_outer_classname = 8;
// If enabled, then the Java code generator will generate a separate .java
// file for each top-level message, enum, and service defined in the .proto
// file. Thus, these types will *not* be nested inside the wrapper class
// named by java_outer_classname. However, the wrapper class will still be
// generated to contain the file's getDescriptor() method as well as any
// top-level extensions defined in the file.
optional bool java_multiple_files = 10 [default = false];
// This option does nothing.
optional bool java_generate_equals_and_hash = 20 [deprecated=true];
// If set true, then the Java2 code generator will generate code that
// throws an exception whenever an attempt is made to assign a non-UTF-8
// byte sequence to a string field.
// Message reflection will do the same.
// However, an extension field still accepts non-UTF-8 byte sequences.
// This option has no effect on when used with the lite runtime.
optional bool java_string_check_utf8 = 27 [default = false];
// Generated classes can be optimized for speed or code size.
enum OptimizeMode {
SPEED = 1; // Generate complete code for parsing, serialization,
// etc.
CODE_SIZE = 2; // Use ReflectionOps to implement these methods.
LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.
}
optional OptimizeMode optimize_for = 9 [default = SPEED];
// Sets the Go package where structs generated from this .proto will be
// placed. If omitted, the Go package will be derived from the following:
// - The basename of the package import path, if provided.
// - Otherwise, the package statement in the .proto file, if present.
// - Otherwise, the basename of the .proto file, without extension.
optional string go_package = 11;
// Should generic services be generated in each language? "Generic" services
// are not specific to any particular RPC system. They are generated by the
// main code generators in each language (without additional plugins).
// Generic services were the only kind of service generation supported by
// early versions of google.protobuf.
//
// Generic services are now considered deprecated in favor of using plugins
// that generate code specific to your particular RPC system. Therefore,
// these default to false. Old code which depends on generic services should
// explicitly set them to true.
optional bool cc_generic_services = 16 [default = false];
optional bool java_generic_services = 17 [default = false];
optional bool py_generic_services = 18 [default = false];
optional bool php_generic_services = 42 [default = false];
// Is this file deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for everything in the file, or it will be completely ignored; in the very
// least, this is a formalization for deprecating files.
optional bool deprecated = 23 [default = false];
// Enables the use of arenas for the proto messages in this file. This applies
// only to generated classes for C++.
optional bool cc_enable_arenas = 31 [default = true];
// Sets the objective c class prefix which is prepended to all objective c
// generated classes from this .proto. There is no default.
optional string objc_class_prefix = 36;
// Namespace for generated classes; defaults to the package.
optional string csharp_namespace = 37;
// By default Swift generators will take the proto package and CamelCase it
// replacing '.' with underscore and use that to prefix the types/symbols
// defined. When this options is provided, they will use this value instead
// to prefix the types/symbols defined.
optional string swift_prefix = 39;
// Sets the php class prefix which is prepended to all php generated classes
// from this .proto. Default is empty.
optional string php_class_prefix = 40;
// Use this option to change the namespace of php generated classes. Default
// is empty. When this option is empty, the package name will be used for
// determining the namespace.
optional string php_namespace = 41;
// Use this option to change the namespace of php generated metadata classes.
// Default is empty. When this option is empty, the proto file name will be
// used for determining the namespace.
optional string php_metadata_namespace = 44;
// Use this option to change the package of ruby generated classes. Default
// is empty. When this option is not set, the package name will be used for
// determining the ruby package.
optional string ruby_package = 45;
// The parser stores options it doesn't recognize here.
// See the documentation for the "Options" section above.
repeated UninterpretedOption uninterpreted_option = 999;
// Clients can define custom options in extensions of this message.
// See the documentation for the "Options" section above.
extensions 1000 to max;
reserved 38;
}
message MessageOptions {
// Set true to use the old proto1 MessageSet wire format for extensions.
// This is provided for backwards-compatibility with the MessageSet wire
// format. You should not use this for any other reason: It's less
// efficient, has fewer features, and is more complicated.
//
// The message must be defined exactly as follows:
// message Foo {
// option message_set_wire_format = true;
// extensions 4 to max;
// }
// Note that the message cannot have any defined fields; MessageSets only
// have extensions.
//
// All extensions of your type must be singular messages; e.g. they cannot
// be int32s, enums, or repeated messages.
//
// Because this is an option, the above two restrictions are not enforced by
// the protocol compiler.
optional bool message_set_wire_format = 1 [default = false];
// Disables the generation of the standard "descriptor()" accessor, which can
// conflict with a field of the same name. This is meant to make migration
// from proto1 easier; new code should avoid fields named "descriptor".
optional bool no_standard_descriptor_accessor = 2 [default = false];
// Is this message deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for the message, or it will be completely ignored; in the very least,
// this is a formalization for deprecating messages.
optional bool deprecated = 3 [default = false];
reserved 4, 5, 6;
// Whether the message is an automatically generated map entry type for the
// maps field.
//
// For maps fields:
// map<KeyType, ValueType> map_field = 1;
// The parsed descriptor looks like:
// message MapFieldEntry {
// option map_entry = true;
// optional KeyType key = 1;
// optional ValueType value = 2;
// }
// repeated MapFieldEntry map_field = 1;
//
// Implementations may choose not to generate the map_entry=true message, but
// use a native map in the target language to hold the keys and values.
// The reflection APIs in such implementations still need to work as
// if the field is a repeated message field.
//
// NOTE: Do not set the option in .proto files. Always use the maps syntax
// instead. The option should only be implicitly set by the proto compiler
// parser.
optional bool map_entry = 7;
reserved 8; // javalite_serializable
reserved 9; // javanano_as_lite
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
// Clients can define custom options in extensions of this message. See above.
extensions 1000 to max;
}
message FieldOptions {
// The ctype option instructs the C++ code generator to use a different
// representation of the field than it normally would. See the specific
// options below. This option is not yet implemented in the open source
// release -- sorry, we'll try to include it in a future version!
optional CType ctype = 1 [default = STRING];
enum CType {
// Default mode.
STRING = 0;
CORD = 1;
STRING_PIECE = 2;
}
// The packed option can be enabled for repeated primitive fields to enable
// a more efficient representation on the wire. Rather than repeatedly
// writing the tag and type for each element, the entire array is encoded as
// a single length-delimited blob. In proto3, only explicit setting it to
// false will avoid using packed encoding.
optional bool packed = 2;
// The jstype option determines the JavaScript type used for values of the
// field. The option is permitted only for 64 bit integral and fixed types
// (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
// is represented as JavaScript string, which avoids loss of precision that
// can happen when a large value is converted to a floating point JavaScript.
// Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
// use the JavaScript "number" type. The behavior of the default option
// JS_NORMAL is implementation dependent.
//
// This option is an enum to permit additional types to be added, e.g.
// goog.math.Integer.
optional JSType jstype = 6 [default = JS_NORMAL];
enum JSType {
// Use the default type.
JS_NORMAL = 0;
// Use JavaScript strings.
JS_STRING = 1;
// Use JavaScript numbers.
JS_NUMBER = 2;
}
// Should this field be parsed lazily? Lazy applies only to message-type
// fields. It means that when the outer message is initially parsed, the
// inner message's contents will not be parsed but instead stored in encoded
// form. The inner message will actually be parsed when it is first accessed.
//
// This is only a hint. Implementations are free to choose whether to use
// eager or lazy parsing regardless of the value of this option. However,
// setting this option true suggests that the protocol author believes that
// using lazy parsing on this field is worth the additional bookkeeping
// overhead typically needed to implement it.
//
// This option does not affect the public interface of any generated code;
// all method signatures remain the same. Furthermore, thread-safety of the
// interface is not affected by this option; const methods remain safe to
// call from multiple threads concurrently, while non-const methods continue
// to require exclusive access.
//
//
// Note that implementations may choose not to check required fields within
// a lazy sub-message. That is, calling IsInitialized() on the outer message
// may return true even if the inner message has missing required fields.
// This is necessary because otherwise the inner message would have to be
// parsed in order to perform the check, defeating the purpose of lazy
// parsing. An implementation which chooses not to check required fields
// must be consistent about it. That is, for any particular sub-message, the
// implementation must either *always* check its required fields, or *never*
// check its required fields, regardless of whether or not the message has
// been parsed.
//
// As of May 2022, lazy verifies the contents of the byte stream during
// parsing. An invalid byte stream will cause the overall parsing to fail.
optional bool lazy = 5 [default = false];
// unverified_lazy does no correctness checks on the byte stream. This should
// only be used where lazy with verification is prohibitive for performance
// reasons.
optional bool unverified_lazy = 15 [default = false];
// Is this field deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for accessors, or it will be completely ignored; in the very least, this
// is a formalization for deprecating fields.
optional bool deprecated = 3 [default = false];
// For Google-internal migration only. Do not use.
optional bool weak = 10 [default = false];
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
// Clients can define custom options in extensions of this message. See above.
extensions 1000 to max;
reserved 4; // removed jtype
}
message OneofOptions {
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
// Clients can define custom options in extensions of this message. See above.
extensions 1000 to max;
}
message EnumOptions {
// Set this option to true to allow mapping different tag names to the same
// value.
optional bool allow_alias = 2;
// Is this enum deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for the enum, or it will be completely ignored; in the very least, this
// is a formalization for deprecating enums.
optional bool deprecated = 3 [default = false];
reserved 5; // javanano_as_lite
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
// Clients can define custom options in extensions of this message. See above.
extensions 1000 to max;
}
message EnumValueOptions {
// Is this enum value deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for the enum value, or it will be completely ignored; in the very least,
// this is a formalization for deprecating enum values.
optional bool deprecated = 1 [default = false];
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
// Clients can define custom options in extensions of this message. See above.
extensions 1000 to max;
}
message ServiceOptions {
// Note: Field numbers 1 through 32 are reserved for Google's internal RPC
// framework. We apologize for hoarding these numbers to ourselves, but
// we were already using them long before we decided to release Protocol
// Buffers.
// Is this service deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for the service, or it will be completely ignored; in the very least,
// this is a formalization for deprecating services.
optional bool deprecated = 33 [default = false];
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
// Clients can define custom options in extensions of this message. See above.
extensions 1000 to max;
}
message MethodOptions {
// Note: Field numbers 1 through 32 are reserved for Google's internal RPC
// framework. We apologize for hoarding these numbers to ourselves, but
// we were already using them long before we decided to release Protocol
// Buffers.
// Is this method deprecated?
// Depending on the target platform, this can emit Deprecated annotations
// for the method, or it will be completely ignored; in the very least,
// this is a formalization for deprecating methods.
optional bool deprecated = 33 [default = false];
// Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
// or neither? HTTP based RPC implementation may choose GET verb for safe
// methods, and PUT verb for idempotent methods instead of the default POST.
enum IdempotencyLevel {
IDEMPOTENCY_UNKNOWN = 0;
NO_SIDE_EFFECTS = 1; // implies idempotent
IDEMPOTENT = 2; // idempotent, but may have side effects
}
optional IdempotencyLevel idempotency_level = 34
[default = IDEMPOTENCY_UNKNOWN];
// The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999;
// Clients can define custom options in extensions of this message. See above.
extensions 1000 to max;
}
// A message representing a option the parser does not recognize. This only
// appears in options protos created by the compiler::Parser class.
// DescriptorPool resolves these when building Descriptor objects. Therefore,
// options protos in descriptor objects (e.g. returned by Descriptor::options(),
// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
// in them.
message UninterpretedOption {
// The name of the uninterpreted option. Each string represents a segment in
// a dot-separated name. is_extension is true iff a segment represents an
// extension (denoted with parentheses in options specs in .proto files).
// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
// "foo.(bar.baz).moo".
message NamePart {
required string name_part = 1;
required bool is_extension = 2;
}
repeated NamePart name = 2;
// The value of the uninterpreted option, in whatever type the tokenizer
// identified it as during parsing. Exactly one of these should be set.
optional string identifier_value = 3;
optional uint64 positive_int_value = 4;
optional int64 negative_int_value = 5;
optional double double_value = 6;
optional bytes string_value = 7;
optional string aggregate_value = 8;
}
// ===================================================================
// Optional source code info
// Encapsulates information about the original source file from which a
// FileDescriptorProto was generated.
message SourceCodeInfo {
// A Location identifies a piece of source code in a .proto file which
// corresponds to a particular definition. This information is intended
// to be useful to IDEs, code indexers, documentation generators, and similar
// tools.
//
// For example, say we have a file like:
// message Foo {
// optional string foo = 1;
// }
// Let's look at just the field definition:
// optional string foo = 1;
// ^ ^^ ^^ ^ ^^^
// a bc de f ghi
// We have the following locations:
// span path represents
// [a,i) [ 4, 0, 2, 0 ] The whole field definition.
// [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
// [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
// [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
// [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
//
// Notes:
// - A location may refer to a repeated field itself (i.e. not to any
// particular index within it). This is used whenever a set of elements are
// logically enclosed in a single code segment. For example, an entire
// extend block (possibly containing multiple extension definitions) will
// have an outer location whose path refers to the "extensions" repeated
// field without an index.
// - Multiple locations may have the same path. This happens when a single
// logical declaration is spread out across multiple places. The most
// obvious example is the "extend" block again -- there may be multiple
// extend blocks in the same scope, each of which will have the same path.
// - A location's span is not always a subset of its parent's span. For
// example, the "extendee" of an extension declaration appears at the
// beginning of the "extend" block and is shared by all extensions within
// the block.
// - Just because a location's span is a subset of some other location's span
// does not mean that it is a descendant. For example, a "group" defines
// both a type and a field in a single declaration. Thus, the locations
// corresponding to the type and field and their components will overlap.
// - Code which tries to interpret locations should probably be designed to
// ignore those that it doesn't understand, as more types of locations could
// be recorded in the future.
repeated Location location = 1;
message Location {
// Identifies which part of the FileDescriptorProto was defined at this
// location.
//
// Each element is a field number or an index. They form a path from
// the root FileDescriptorProto to the place where the definition occurs.
// For example, this path:
// [ 4, 3, 2, 7, 1 ]
// refers to:
// file.message_type(3) // 4, 3
// .field(7) // 2, 7
// .name() // 1
// This is because FileDescriptorProto.message_type has field number 4:
// repeated DescriptorProto message_type = 4;
// and DescriptorProto.field has field number 2:
// repeated FieldDescriptorProto field = 2;
// and FieldDescriptorProto.name has field number 1:
// optional string name = 1;
//
// Thus, the above path gives the location of a field name. If we removed
// the last element:
// [ 4, 3, 2, 7 ]
// this path refers to the whole field declaration (from the beginning
// of the label to the terminating semicolon).
repeated int32 path = 1 [packed = true];
// Always has exactly three or four elements: start line, start column,
// end line (optional, otherwise assumed same as start line), end column.
// These are packed into a single field for efficiency. Note that line
// and column numbers are zero-based -- typically you will want to add
// 1 to each before displaying to a user.
repeated int32 span = 2 [packed = true];
// If this SourceCodeInfo represents a complete declaration, these are any
// comments appearing before and after the declaration which appear to be
// attached to the declaration.
//
// A series of line comments appearing on consecutive lines, with no other
// tokens appearing on those lines, will be treated as a single comment.
//
// leading_detached_comments will keep paragraphs of comments that appear
// before (but not connected to) the current element. Each paragraph,
// separated by empty lines, will be one comment element in the repeated
// field.
//
// Only the comment content is provided; comment markers (e.g. //) are
// stripped out. For block comments, leading whitespace and an asterisk
// will be stripped from the beginning of each line other than the first.
// Newlines are included in the output.
//
// Examples:
//
// optional int32 foo = 1; // Comment attached to foo.
// // Comment attached to bar.
// optional int32 bar = 2;
//
// optional string baz = 3;
// // Comment attached to baz.
// // Another line attached to baz.
//
// // Comment attached to moo.
// //
// // Another line attached to moo.
// optional double moo = 4;
//
// // Detached comment for corge. This is not leading or trailing comments
// // to moo or corge because there are blank lines separating it from
// // both.
//
// // Detached comment for corge paragraph 2.
//
// optional string corge = 5;
// /* Block comment attached
// * to corge. Leading asterisks
// * will be removed. */
// /* Block comment attached to
// * grault. */
// optional int32 grault = 6;
//
// // ignored detached comments.
optional string leading_comments = 3;
optional string trailing_comments = 4;
repeated string leading_detached_comments = 6;
}
}
// Describes the relationship between generated code and its original source
// file. A GeneratedCodeInfo message is associated with only one generated
// source file, but may contain references to different source .proto files.
message GeneratedCodeInfo {
// An Annotation connects some span of text in generated code to an element
// of its generating .proto file.
repeated Annotation annotation = 1;
message Annotation {
// Identifies the element in the original source .proto file. This field
// is formatted the same as SourceCodeInfo.Location.path.
repeated int32 path = 1 [packed = true];
// Identifies the filesystem path to the original source .proto.
optional string source_file = 2;
// Identifies the starting offset in bytes in the generated code
// that relates to the identified object.
optional int32 begin = 3;
// Identifies the ending offset in bytes in the generated code that
// relates to the identified offset. The end offset should be one past
// the last relevant byte (so the length of the text = end - begin).
optional int32 end = 4;
}
}

View File

@ -1,862 +0,0 @@
syntax = "proto2";
package validate;
option go_package = "github.com/envoyproxy/protoc-gen-validate/validate";
option java_package = "io.envoyproxy.pgv.validate";
import "google/protobuf/descriptor.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
// Validation rules applied at the message level
extend google.protobuf.MessageOptions {
// Disabled nullifies any validation rules for this message, including any
// message fields associated with it that do support validation.
optional bool disabled = 1071;
// Ignore skips generation of validation methods for this message.
optional bool ignored = 1072;
}
// Validation rules applied at the oneof level
extend google.protobuf.OneofOptions {
// Required ensures that exactly one the field options in a oneof is set;
// validation fails if no fields in the oneof are set.
optional bool required = 1071;
}
// Validation rules applied at the field level
extend google.protobuf.FieldOptions {
// Rules specify the validations to be performed on this field. By default,
// no validation is performed against a field.
optional FieldRules rules = 1071;
}
// FieldRules encapsulates the rules for each type of field. Depending on the
// field, the correct set should be used to ensure proper validations.
message FieldRules {
optional MessageRules message = 17;
oneof type {
// Scalar Field Types
FloatRules float = 1;
DoubleRules double = 2;
Int32Rules int32 = 3;
Int64Rules int64 = 4;
UInt32Rules uint32 = 5;
UInt64Rules uint64 = 6;
SInt32Rules sint32 = 7;
SInt64Rules sint64 = 8;
Fixed32Rules fixed32 = 9;
Fixed64Rules fixed64 = 10;
SFixed32Rules sfixed32 = 11;
SFixed64Rules sfixed64 = 12;
BoolRules bool = 13;
StringRules string = 14;
BytesRules bytes = 15;
// Complex Field Types
EnumRules enum = 16;
RepeatedRules repeated = 18;
MapRules map = 19;
// Well-Known Field Types
AnyRules any = 20;
DurationRules duration = 21;
TimestampRules timestamp = 22;
}
}
// FloatRules describes the constraints applied to `float` values
message FloatRules {
// Const specifies that this field must be exactly the specified value
optional float const = 1;
// Lt specifies that this field must be less than the specified value,
// exclusive
optional float lt = 2;
// Lte specifies that this field must be less than or equal to the
// specified value, inclusive
optional float lte = 3;
// Gt specifies that this field must be greater than the specified value,
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
// range is reversed.
optional float gt = 4;
// Gte specifies that this field must be greater than or equal to the
// specified value, inclusive. If the value of Gte is larger than a
// specified Lt or Lte, the range is reversed.
optional float gte = 5;
// In specifies that this field must be equal to one of the specified
// values
repeated float in = 6;
// NotIn specifies that this field cannot be equal to one of the specified
// values
repeated float not_in = 7;
// IgnoreEmpty specifies that the validation rules of this field should be
// evaluated only if the field is not empty
optional bool ignore_empty = 8;
}
// DoubleRules describes the constraints applied to `double` values
message DoubleRules {
// Const specifies that this field must be exactly the specified value
optional double const = 1;
// Lt specifies that this field must be less than the specified value,
// exclusive
optional double lt = 2;
// Lte specifies that this field must be less than or equal to the
// specified value, inclusive
optional double lte = 3;
// Gt specifies that this field must be greater than the specified value,
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
// range is reversed.
optional double gt = 4;
// Gte specifies that this field must be greater than or equal to the
// specified value, inclusive. If the value of Gte is larger than a
// specified Lt or Lte, the range is reversed.
optional double gte = 5;
// In specifies that this field must be equal to one of the specified
// values
repeated double in = 6;
// NotIn specifies that this field cannot be equal to one of the specified
// values
repeated double not_in = 7;
// IgnoreEmpty specifies that the validation rules of this field should be
// evaluated only if the field is not empty
optional bool ignore_empty = 8;
}
// Int32Rules describes the constraints applied to `int32` values
message Int32Rules {
// Const specifies that this field must be exactly the specified value
optional int32 const = 1;
// Lt specifies that this field must be less than the specified value,
// exclusive
optional int32 lt = 2;
// Lte specifies that this field must be less than or equal to the
// specified value, inclusive
optional int32 lte = 3;
// Gt specifies that this field must be greater than the specified value,
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
// range is reversed.
optional int32 gt = 4;
// Gte specifies that this field must be greater than or equal to the
// specified value, inclusive. If the value of Gte is larger than a
// specified Lt or Lte, the range is reversed.
optional int32 gte = 5;
// In specifies that this field must be equal to one of the specified
// values
repeated int32 in = 6;
// NotIn specifies that this field cannot be equal to one of the specified
// values
repeated int32 not_in = 7;
// IgnoreEmpty specifies that the validation rules of this field should be
// evaluated only if the field is not empty
optional bool ignore_empty = 8;
}
// Int64Rules describes the constraints applied to `int64` values
message Int64Rules {
// Const specifies that this field must be exactly the specified value
optional int64 const = 1;
// Lt specifies that this field must be less than the specified value,
// exclusive
optional int64 lt = 2;
// Lte specifies that this field must be less than or equal to the
// specified value, inclusive
optional int64 lte = 3;
// Gt specifies that this field must be greater than the specified value,
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
// range is reversed.
optional int64 gt = 4;
// Gte specifies that this field must be greater than or equal to the
// specified value, inclusive. If the value of Gte is larger than a
// specified Lt or Lte, the range is reversed.
optional int64 gte = 5;
// In specifies that this field must be equal to one of the specified
// values
repeated int64 in = 6;
// NotIn specifies that this field cannot be equal to one of the specified
// values
repeated int64 not_in = 7;
// IgnoreEmpty specifies that the validation rules of this field should be
// evaluated only if the field is not empty
optional bool ignore_empty = 8;
}
// UInt32Rules describes the constraints applied to `uint32` values
message UInt32Rules {
// Const specifies that this field must be exactly the specified value
optional uint32 const = 1;
// Lt specifies that this field must be less than the specified value,
// exclusive
optional uint32 lt = 2;
// Lte specifies that this field must be less than or equal to the
// specified value, inclusive
optional uint32 lte = 3;
// Gt specifies that this field must be greater than the specified value,
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
// range is reversed.
optional uint32 gt = 4;
// Gte specifies that this field must be greater than or equal to the
// specified value, inclusive. If the value of Gte is larger than a
// specified Lt or Lte, the range is reversed.
optional uint32 gte = 5;
// In specifies that this field must be equal to one of the specified
// values
repeated uint32 in = 6;
// NotIn specifies that this field cannot be equal to one of the specified
// values
repeated uint32 not_in = 7;
// IgnoreEmpty specifies that the validation rules of this field should be
// evaluated only if the field is not empty
optional bool ignore_empty = 8;
}
// UInt64Rules describes the constraints applied to `uint64` values
message UInt64Rules {
// Const specifies that this field must be exactly the specified value
optional uint64 const = 1;
// Lt specifies that this field must be less than the specified value,
// exclusive
optional uint64 lt = 2;
// Lte specifies that this field must be less than or equal to the
// specified value, inclusive
optional uint64 lte = 3;
// Gt specifies that this field must be greater than the specified value,
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
// range is reversed.
optional uint64 gt = 4;
// Gte specifies that this field must be greater than or equal to the
// specified value, inclusive. If the value of Gte is larger than a
// specified Lt or Lte, the range is reversed.
optional uint64 gte = 5;
// In specifies that this field must be equal to one of the specified
// values
repeated uint64 in = 6;
// NotIn specifies that this field cannot be equal to one of the specified
// values
repeated uint64 not_in = 7;
// IgnoreEmpty specifies that the validation rules of this field should be
// evaluated only if the field is not empty
optional bool ignore_empty = 8;
}
// SInt32Rules describes the constraints applied to `sint32` values
message SInt32Rules {
// Const specifies that this field must be exactly the specified value
optional sint32 const = 1;
// Lt specifies that this field must be less than the specified value,
// exclusive
optional sint32 lt = 2;
// Lte specifies that this field must be less than or equal to the
// specified value, inclusive
optional sint32 lte = 3;
// Gt specifies that this field must be greater than the specified value,
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
// range is reversed.
optional sint32 gt = 4;
// Gte specifies that this field must be greater than or equal to the
// specified value, inclusive. If the value of Gte is larger than a
// specified Lt or Lte, the range is reversed.
optional sint32 gte = 5;
// In specifies that this field must be equal to one of the specified
// values
repeated sint32 in = 6;
// NotIn specifies that this field cannot be equal to one of the specified
// values
repeated sint32 not_in = 7;
// IgnoreEmpty specifies that the validation rules of this field should be
// evaluated only if the field is not empty
optional bool ignore_empty = 8;
}
// SInt64Rules describes the constraints applied to `sint64` values
message SInt64Rules {
// Const specifies that this field must be exactly the specified value
optional sint64 const = 1;
// Lt specifies that this field must be less than the specified value,
// exclusive
optional sint64 lt = 2;
// Lte specifies that this field must be less than or equal to the
// specified value, inclusive
optional sint64 lte = 3;
// Gt specifies that this field must be greater than the specified value,
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
// range is reversed.
optional sint64 gt = 4;
// Gte specifies that this field must be greater than or equal to the
// specified value, inclusive. If the value of Gte is larger than a
// specified Lt or Lte, the range is reversed.
optional sint64 gte = 5;
// In specifies that this field must be equal to one of the specified
// values
repeated sint64 in = 6;
// NotIn specifies that this field cannot be equal to one of the specified
// values
repeated sint64 not_in = 7;
// IgnoreEmpty specifies that the validation rules of this field should be
// evaluated only if the field is not empty
optional bool ignore_empty = 8;
}
// Fixed32Rules describes the constraints applied to `fixed32` values
message Fixed32Rules {
// Const specifies that this field must be exactly the specified value
optional fixed32 const = 1;
// Lt specifies that this field must be less than the specified value,
// exclusive
optional fixed32 lt = 2;
// Lte specifies that this field must be less than or equal to the
// specified value, inclusive
optional fixed32 lte = 3;
// Gt specifies that this field must be greater than the specified value,
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
// range is reversed.
optional fixed32 gt = 4;
// Gte specifies that this field must be greater than or equal to the
// specified value, inclusive. If the value of Gte is larger than a
// specified Lt or Lte, the range is reversed.
optional fixed32 gte = 5;
// In specifies that this field must be equal to one of the specified
// values
repeated fixed32 in = 6;
// NotIn specifies that this field cannot be equal to one of the specified
// values
repeated fixed32 not_in = 7;
// IgnoreEmpty specifies that the validation rules of this field should be
// evaluated only if the field is not empty
optional bool ignore_empty = 8;
}
// Fixed64Rules describes the constraints applied to `fixed64` values
message Fixed64Rules {
// Const specifies that this field must be exactly the specified value
optional fixed64 const = 1;
// Lt specifies that this field must be less than the specified value,
// exclusive
optional fixed64 lt = 2;
// Lte specifies that this field must be less than or equal to the
// specified value, inclusive
optional fixed64 lte = 3;
// Gt specifies that this field must be greater than the specified value,
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
// range is reversed.
optional fixed64 gt = 4;
// Gte specifies that this field must be greater than or equal to the
// specified value, inclusive. If the value of Gte is larger than a
// specified Lt or Lte, the range is reversed.
optional fixed64 gte = 5;
// In specifies that this field must be equal to one of the specified
// values
repeated fixed64 in = 6;
// NotIn specifies that this field cannot be equal to one of the specified
// values
repeated fixed64 not_in = 7;
// IgnoreEmpty specifies that the validation rules of this field should be
// evaluated only if the field is not empty
optional bool ignore_empty = 8;
}
// SFixed32Rules describes the constraints applied to `sfixed32` values
message SFixed32Rules {
// Const specifies that this field must be exactly the specified value
optional sfixed32 const = 1;
// Lt specifies that this field must be less than the specified value,
// exclusive
optional sfixed32 lt = 2;
// Lte specifies that this field must be less than or equal to the
// specified value, inclusive
optional sfixed32 lte = 3;
// Gt specifies that this field must be greater than the specified value,
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
// range is reversed.
optional sfixed32 gt = 4;
// Gte specifies that this field must be greater than or equal to the
// specified value, inclusive. If the value of Gte is larger than a
// specified Lt or Lte, the range is reversed.
optional sfixed32 gte = 5;
// In specifies that this field must be equal to one of the specified
// values
repeated sfixed32 in = 6;
// NotIn specifies that this field cannot be equal to one of the specified
// values
repeated sfixed32 not_in = 7;
// IgnoreEmpty specifies that the validation rules of this field should be
// evaluated only if the field is not empty
optional bool ignore_empty = 8;
}
// SFixed64Rules describes the constraints applied to `sfixed64` values
message SFixed64Rules {
// Const specifies that this field must be exactly the specified value
optional sfixed64 const = 1;
// Lt specifies that this field must be less than the specified value,
// exclusive
optional sfixed64 lt = 2;
// Lte specifies that this field must be less than or equal to the
// specified value, inclusive
optional sfixed64 lte = 3;
// Gt specifies that this field must be greater than the specified value,
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
// range is reversed.
optional sfixed64 gt = 4;
// Gte specifies that this field must be greater than or equal to the
// specified value, inclusive. If the value of Gte is larger than a
// specified Lt or Lte, the range is reversed.
optional sfixed64 gte = 5;
// In specifies that this field must be equal to one of the specified
// values
repeated sfixed64 in = 6;
// NotIn specifies that this field cannot be equal to one of the specified
// values
repeated sfixed64 not_in = 7;
// IgnoreEmpty specifies that the validation rules of this field should be
// evaluated only if the field is not empty
optional bool ignore_empty = 8;
}
// BoolRules describes the constraints applied to `bool` values
message BoolRules {
// Const specifies that this field must be exactly the specified value
optional bool const = 1;
}
// StringRules describe the constraints applied to `string` values
message StringRules {
// Const specifies that this field must be exactly the specified value
optional string const = 1;
// Len specifies that this field must be the specified number of
// characters (Unicode code points). Note that the number of
// characters may differ from the number of bytes in the string.
optional uint64 len = 19;
// MinLen specifies that this field must be the specified number of
// characters (Unicode code points) at a minimum. Note that the number of
// characters may differ from the number of bytes in the string.
optional uint64 min_len = 2;
// MaxLen specifies that this field must be the specified number of
// characters (Unicode code points) at a maximum. Note that the number of
// characters may differ from the number of bytes in the string.
optional uint64 max_len = 3;
// LenBytes specifies that this field must be the specified number of bytes
optional uint64 len_bytes = 20;
// MinBytes specifies that this field must be the specified number of bytes
// at a minimum
optional uint64 min_bytes = 4;
// MaxBytes specifies that this field must be the specified number of bytes
// at a maximum
optional uint64 max_bytes = 5;
// Pattern specifes that this field must match against the specified
// regular expression (RE2 syntax). The included expression should elide
// any delimiters.
optional string pattern = 6;
// Prefix specifies that this field must have the specified substring at
// the beginning of the string.
optional string prefix = 7;
// Suffix specifies that this field must have the specified substring at
// the end of the string.
optional string suffix = 8;
// Contains specifies that this field must have the specified substring
// anywhere in the string.
optional string contains = 9;
// NotContains specifies that this field cannot have the specified substring
// anywhere in the string.
optional string not_contains = 23;
// In specifies that this field must be equal to one of the specified
// values
repeated string in = 10;
// NotIn specifies that this field cannot be equal to one of the specified
// values
repeated string not_in = 11;
// WellKnown rules provide advanced constraints against common string
// patterns
oneof well_known {
// Email specifies that the field must be a valid email address as
// defined by RFC 5322
bool email = 12;
// Hostname specifies that the field must be a valid hostname as
// defined by RFC 1034. This constraint does not support
// internationalized domain names (IDNs).
bool hostname = 13;
// Ip specifies that the field must be a valid IP (v4 or v6) address.
// Valid IPv6 addresses should not include surrounding square brackets.
bool ip = 14;
// Ipv4 specifies that the field must be a valid IPv4 address.
bool ipv4 = 15;
// Ipv6 specifies that the field must be a valid IPv6 address. Valid
// IPv6 addresses should not include surrounding square brackets.
bool ipv6 = 16;
// Uri specifies that the field must be a valid, absolute URI as defined
// by RFC 3986
bool uri = 17;
// UriRef specifies that the field must be a valid URI as defined by RFC
// 3986 and may be relative or absolute.
bool uri_ref = 18;
// Address specifies that the field must be either a valid hostname as
// defined by RFC 1034 (which does not support internationalized domain
// names or IDNs), or it can be a valid IP (v4 or v6).
bool address = 21;
// Uuid specifies that the field must be a valid UUID as defined by
// RFC 4122
bool uuid = 22;
// WellKnownRegex specifies a common well known pattern defined as a regex.
KnownRegex well_known_regex = 24;
}
// This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable
// strict header validation.
// By default, this is true, and HTTP header validations are RFC-compliant.
// Setting to false will enable a looser validations that only disallows
// \r\n\0 characters, which can be used to bypass header matching rules.
optional bool strict = 25 [default = true];
// IgnoreEmpty specifies that the validation rules of this field should be
// evaluated only if the field is not empty
optional bool ignore_empty = 26;
}
// WellKnownRegex contain some well-known patterns.
enum KnownRegex {
UNKNOWN = 0;
// HTTP header name as defined by RFC 7230.
HTTP_HEADER_NAME = 1;
// HTTP header value as defined by RFC 7230.
HTTP_HEADER_VALUE = 2;
}
// BytesRules describe the constraints applied to `bytes` values
message BytesRules {
// Const specifies that this field must be exactly the specified value
optional bytes const = 1;
// Len specifies that this field must be the specified number of bytes
optional uint64 len = 13;
// MinLen specifies that this field must be the specified number of bytes
// at a minimum
optional uint64 min_len = 2;
// MaxLen specifies that this field must be the specified number of bytes
// at a maximum
optional uint64 max_len = 3;
// Pattern specifes that this field must match against the specified
// regular expression (RE2 syntax). The included expression should elide
// any delimiters.
optional string pattern = 4;
// Prefix specifies that this field must have the specified bytes at the
// beginning of the string.
optional bytes prefix = 5;
// Suffix specifies that this field must have the specified bytes at the
// end of the string.
optional bytes suffix = 6;
// Contains specifies that this field must have the specified bytes
// anywhere in the string.
optional bytes contains = 7;
// In specifies that this field must be equal to one of the specified
// values
repeated bytes in = 8;
// NotIn specifies that this field cannot be equal to one of the specified
// values
repeated bytes not_in = 9;
// WellKnown rules provide advanced constraints against common byte
// patterns
oneof well_known {
// Ip specifies that the field must be a valid IP (v4 or v6) address in
// byte format
bool ip = 10;
// Ipv4 specifies that the field must be a valid IPv4 address in byte
// format
bool ipv4 = 11;
// Ipv6 specifies that the field must be a valid IPv6 address in byte
// format
bool ipv6 = 12;
}
// IgnoreEmpty specifies that the validation rules of this field should be
// evaluated only if the field is not empty
optional bool ignore_empty = 14;
}
// EnumRules describe the constraints applied to enum values
message EnumRules {
// Const specifies that this field must be exactly the specified value
optional int32 const = 1;
// DefinedOnly specifies that this field must be only one of the defined
// values for this enum, failing on any undefined value.
optional bool defined_only = 2;
// In specifies that this field must be equal to one of the specified
// values
repeated int32 in = 3;
// NotIn specifies that this field cannot be equal to one of the specified
// values
repeated int32 not_in = 4;
}
// MessageRules describe the constraints applied to embedded message values.
// For message-type fields, validation is performed recursively.
message MessageRules {
// Skip specifies that the validation rules of this field should not be
// evaluated
optional bool skip = 1;
// Required specifies that this field must be set
optional bool required = 2;
}
// RepeatedRules describe the constraints applied to `repeated` values
message RepeatedRules {
// MinItems specifies that this field must have the specified number of
// items at a minimum
optional uint64 min_items = 1;
// MaxItems specifies that this field must have the specified number of
// items at a maximum
optional uint64 max_items = 2;
// Unique specifies that all elements in this field must be unique. This
// contraint is only applicable to scalar and enum types (messages are not
// supported).
optional bool unique = 3;
// Items specifies the contraints to be applied to each item in the field.
// Repeated message fields will still execute validation against each item
// unless skip is specified here.
optional FieldRules items = 4;
// IgnoreEmpty specifies that the validation rules of this field should be
// evaluated only if the field is not empty
optional bool ignore_empty = 5;
}
// MapRules describe the constraints applied to `map` values
message MapRules {
// MinPairs specifies that this field must have the specified number of
// KVs at a minimum
optional uint64 min_pairs = 1;
// MaxPairs specifies that this field must have the specified number of
// KVs at a maximum
optional uint64 max_pairs = 2;
// NoSparse specifies values in this field cannot be unset. This only
// applies to map's with message value types.
optional bool no_sparse = 3;
// Keys specifies the constraints to be applied to each key in the field.
optional FieldRules keys = 4;
// Values specifies the constraints to be applied to the value of each key
// in the field. Message values will still have their validations evaluated
// unless skip is specified here.
optional FieldRules values = 5;
// IgnoreEmpty specifies that the validation rules of this field should be
// evaluated only if the field is not empty
optional bool ignore_empty = 6;
}
// AnyRules describe constraints applied exclusively to the
// `google.protobuf.Any` well-known type
message AnyRules {
// Required specifies that this field must be set
optional bool required = 1;
// In specifies that this field's `type_url` must be equal to one of the
// specified values.
repeated string in = 2;
// NotIn specifies that this field's `type_url` must not be equal to any of
// the specified values.
repeated string not_in = 3;
}
// DurationRules describe the constraints applied exclusively to the
// `google.protobuf.Duration` well-known type
message DurationRules {
// Required specifies that this field must be set
optional bool required = 1;
// Const specifies that this field must be exactly the specified value
optional google.protobuf.Duration const = 2;
// Lt specifies that this field must be less than the specified value,
// exclusive
optional google.protobuf.Duration lt = 3;
// Lt specifies that this field must be less than the specified value,
// inclusive
optional google.protobuf.Duration lte = 4;
// Gt specifies that this field must be greater than the specified value,
// exclusive
optional google.protobuf.Duration gt = 5;
// Gte specifies that this field must be greater than the specified value,
// inclusive
optional google.protobuf.Duration gte = 6;
// In specifies that this field must be equal to one of the specified
// values
repeated google.protobuf.Duration in = 7;
// NotIn specifies that this field cannot be equal to one of the specified
// values
repeated google.protobuf.Duration not_in = 8;
}
// TimestampRules describe the constraints applied exclusively to the
// `google.protobuf.Timestamp` well-known type
message TimestampRules {
// Required specifies that this field must be set
optional bool required = 1;
// Const specifies that this field must be exactly the specified value
optional google.protobuf.Timestamp const = 2;
// Lt specifies that this field must be less than the specified value,
// exclusive
optional google.protobuf.Timestamp lt = 3;
// Lte specifies that this field must be less than the specified value,
// inclusive
optional google.protobuf.Timestamp lte = 4;
// Gt specifies that this field must be greater than the specified value,
// exclusive
optional google.protobuf.Timestamp gt = 5;
// Gte specifies that this field must be greater than the specified value,
// inclusive
optional google.protobuf.Timestamp gte = 6;
// LtNow specifies that this must be less than the current time. LtNow
// can only be used with the Within rule.
optional bool lt_now = 7;
// GtNow specifies that this must be greater than the current time. GtNow
// can only be used with the Within rule.
optional bool gt_now = 8;
// Within specifies that this field must be within this duration of the
// current time. This constraint can be used alone or with the LtNow and
// GtNow rules.
optional google.protobuf.Duration within = 9;
}

View File

@ -1,78 +0,0 @@
// Copyright 2016 Michal Witkowski. All Rights Reserved.
// See LICENSE for licensing terms.
// Protocol Buffers extensions for defining auto-generateable validators for messages.
syntax = "proto2";
package validator;
import "pb/descriptor.proto";
option go_package = "github.com/mwitkow/go-proto-validators;validator";
extend google.protobuf.FieldOptions {
optional FieldValidator field = 65020;
}
extend google.protobuf.OneofOptions {
optional OneofValidator oneof = 65021;
}
message FieldValidator {
// Uses a Golang RE2-syntax regex to match the field contents.
optional string regex = 1;
// Field value of integer strictly greater than this value.
optional int64 int_gt = 2;
// Field value of integer strictly smaller than this value.
optional int64 int_lt = 3;
// Used for nested message types, requires that the message type exists.
optional bool msg_exists = 4;
// Human error specifies a user-customizable error that is visible to the user.
optional string human_error = 5;
// Field value of double strictly greater than this value.
// Note that this value can only take on a valid floating point
// value. Use together with float_epsilon if you need something more specific.
optional double float_gt = 6;
// Field value of double strictly smaller than this value.
// Note that this value can only take on a valid floating point
// value. Use together with float_epsilon if you need something more specific.
optional double float_lt = 7;
// Field value of double describing the epsilon within which
// any comparison should be considered to be true. For example,
// when using float_gt = 0.35, using a float_epsilon of 0.05
// would mean that any value above 0.30 is acceptable. It can be
// thought of as a {float_value_condition} +- {float_epsilon}.
// If unset, no correction for floating point inaccuracies in
// comparisons will be attempted.
optional double float_epsilon = 8;
// Floating-point value compared to which the field content should be greater or equal.
optional double float_gte = 9;
// Floating-point value compared to which the field content should be smaller or equal.
optional double float_lte = 10;
// Used for string fields, requires the string to be not empty (i.e different from "").
optional bool string_not_empty = 11;
// Repeated field with at least this number of elements.
optional int64 repeated_count_min = 12;
// Repeated field with at most this number of elements.
optional int64 repeated_count_max = 13;
// Field value of length greater than this value.
optional int64 length_gt = 14;
// Field value of length smaller than this value.
optional int64 length_lt = 15;
// Field value of length strictly equal to this value.
optional int64 length_eq = 16;
// Requires that the value is in the enum.
optional bool is_in_enum = 17;
// Ensures that a string value is in UUID format.
// uuid_ver specifies the valid UUID versions. Valid values are: 0-5.
// If uuid_ver is 0 all UUID versions are accepted.
optional int32 uuid_ver = 18;
}
message OneofValidator {
// Require that one of the oneof fields is set.
optional bool required = 1;
}

1
cmd/.gitignore vendored
View File

@ -1 +0,0 @@
data

View File

@ -21,8 +21,6 @@ import (
"fmt"
"fonchain-fiee/cmd/config"
"fonchain-fiee/pkg/cache"
"fonchain-fiee/pkg/common"
cronpkg "fonchain-fiee/pkg/cron"
"fonchain-fiee/pkg/logger"
"fonchain-fiee/pkg/router"
)
@ -33,7 +31,6 @@ func main() {
if err := bootstrap(); err != nil {
panic(err)
}
r := router.NewRouter()
_ = r.Run(config.AppConfig.System.HttpPort)
select {}
@ -58,13 +55,7 @@ func bootstrap() (err error) {
}
cache.LoadRedis(redisConfig)
common.Init()
if configEnv.System.CronOpen {
fmt.Println("启动定时任务管理器...")
if err = cronpkg.InitTasks(); err != nil {
fmt.Printf("定时任务启动失败: %v\n", err)
}
}
//
//gpt.InitSet(configEnv.Ai.Host, configEnv.Ai.TelNum, configEnv.Ai.Password)
return nil
}

View File

@ -4,11 +4,10 @@ import (
"errors"
"fmt"
"fonchain-fiee/pkg/common"
"os"
"strconv"
"github.com/BurntSushi/toml"
"gopkg.in/ini.v1"
"os"
"strconv"
)
var (
@ -109,19 +108,15 @@ type Redis struct {
}
type System struct {
Mode string
AppMode string
Version string
HttpPort string
Host string
RedirectUri string
Domain string
ErpHost string
FieeHost string
AuthRedirectUrl string
AuthCallback string
CronOpen bool
ProxyUrl string
Mode string
AppMode string
Version string
HttpPort string
Host string
RedirectUri string
Domain string
ErpHost string
FieeHost string
}
type Oss struct {
AccessKeyId string

View File

@ -1,16 +0,0 @@
#=========== 阿里云内容安全配置 ===========
# STS登录模式配置
# RAM用户AccessKey ID用于获取STS临时凭证
RAM_ACCESS_KEY_ID=LTAI5tNBzbeEbG1yCitvHsMb
# RAM用户AccessKey Secret
RAM_ACCESS_KEY_SECRET=G1xAUB8G6WDVo0SLr6DJaJjNWIlpmO
# 要扮演的RAM角色ARN
RAM_ROLE_ARN=acs:ram::5828544250383902:role/content-secret
# 阿里云区域可选默认为cn-shanghai
ALIBABA_CLOUD_REGION=ap-southeast-1
# 阿里云端点可选默认为green.cn-shanghai.aliyuncs.com
ALIBABA_CLOUD_ENDPOINT=green-cip.ap-southeast-1.aliyuncs.com

View File

@ -14,12 +14,12 @@ BosBaseDir = "fonchain-main"
BosHttp = "https://"
BosDomain = "cdns.fontree.cn"
[oss]
AccessKeyId = "${OSS_AK}"
AccessKeySecret = "${OSS_SK}"
Endpoint = "${OSS_ENDPOINTT}"
BucketName = "${OSS_BUCKETNAME}"
AccessKeyId = "LTAI5tLz1fSK53FQAEC9uNSb"
AccessKeySecret = "oGB9chrQzQzITXR2IGv37Ji5WxZh4j"
Endpoint = "oss-cn-hangzhou.aliyuncs.com"
BucketName = "fontree-test"
BaseDir = "fonchain-main"
CdnHost = "${OSS_CDN}"
CdnHost = "https://cdn-test.szjixun.cn"
[redis]
RedisDB = "2"
RedisAddr = "127.0.0.1:6379"

View File

@ -27,6 +27,7 @@ dubbo:
protocol: tri
retries: 0
interface: com.fontree.microservices.fiee.bundle # must be compatible with grpc or dubbo-java
CastClientImpl:
SecFilingsClientImpl:
protocol: tri
interface: com.fontree.microservices.fiee.multicast
retries: 0
interface: com.fontree.microservices.fiee.SecFiling

View File

@ -1,15 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>隐私政策</title>
<style>
body { font-family: Arial, sans-serif; line-height: 1.6; }
</style>
</head>
<body>
<p>H5系统隐私政策</p><p>生效日期2025年9月2日</p><p>1. 信息收集与使用</p><p>收集的个人信息类型</p><p>基础信息手机号、微信昵称、头像、设备信息IMEI、操作系统版本</p><p>支付信息:订单号、支付金额、交易时间(通过加密方式传输,不存储银行卡信息)。</p><p>自媒体平台授权信息,例如:</p><p>抖音API接口权限仅限内容同步</p><p>内容生成数据:用户输入的关键词、风格偏好、历史生成内容。</p><p>收集目的</p><p>账号验证与支付:手机号用于身份核验,支付信息用于完成交易。</p><p>内容发布通过授权信息调用第三方平台API执行用户指令。</p><p>2. 信息共享与转让</p><p>第三方平台接口仅在用户授权范围内调用API不共享用户平台账号密码。</p><p>支付合作方:与微信支付、支付宝等服务商共享订单信息以完成交易。</p><p>法律要求:如配合司法机关调查或响应政府要求,可能披露必要信息。</p><p>3. 用户权利</p><p>访问与控制:</p><p>可随时在“个人中心”查看历史生成内容、订单记录及授权状态。</p><p>删除与撤回:</p><p>可申请删除个人账户及生成内容(不包含已同步至第三方平台的内容)。</p><p>4. 数据安全</p><p>技术措施采用HTTPS加密传输、数据库脱敏存储定期进行安全漏洞检测。</p><p>第三方SDK仅接入必要SDK如微信登录、地图服务等并签署数据保密协议。</p><p>5. 隐私政策更新</p><p>如涉及重大变更(如新增数据收集项),将通过短信/邮件通知并要求重新授权。</p><p>6. 联系我们</p><p>如有疑问,请通过以下方式联系:</p><p>客服邮箱develop@fiee.com</p>
</body>
</html>

View File

@ -1,15 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>服务条款</title>
<style>
body { font-family: Arial, sans-serif; line-height: 1.6; }
</style>
</head>
<body>
<p>服务条款</p><p>生效日期2025年9月2日</p><p>1. 接受条款</p><p>通过注册或使用本系统(以下简称“服务”),您确认已阅读、理解并同意以下条款。若您不同意本条款,请立即停止使用本服务。</p><p>2. 服务内容</p><p>本系统提供自媒体内容生成与发布服务,用户可购买套餐后生成图文、短视频等原创内容,并通过系统接口同步至指定自媒体平台(如微信公众号、抖音、小红书等)。</p><p>服务包含AI辅助创作、内容优化建议、一键发布功能具体内容以实际功能模块为准。</p><p>3. 用户权利与义务</p><p>账号与支付</p><p>注册需提供手机号或微信授权,购买套餐需通过系统支持的支付方式(如微信支付、支付宝)。</p><p>您需确保支付账户信息真实有效,因虚假信息导致的损失由您自行承担。</p><p>内容生成与发布</p><p>生成内容为原创作品,最终发布权归用户所有。</p><p>用户需对生成内容进行人工审核,确认无误后方可发布。因内容违规导致的平台处罚或法律纠纷,责任由用户承担。</p><p>系统不对用户未审核内容的合规性负责,但有权对明显违法内容(如涉黄、涉政)进行过滤拦截。</p><p>第三方平台接口</p><p>用户需授权系统调用其自媒体平台API如tiktok开发者接口授权范围限于内容发布及数据同步。</p><p>授权信息仅用于执行用户指令,系统不存储用户平台账号密码等敏感信息。</p><p>4. 套餐与退款</p><p>套餐有效期自购买成功日起计算,逾期未使用的套餐不支持退款。</p><p>如因系统故障或服务瑕疵导致无法正常使用,可联系客服协商退款。</p><p>5. 知识产权</p><p>由系统生成的内容(如文案、图片)默认无版权归属限制,但用户需遵守以下规则:</p><p>不得将内容用于商业用途(如转售、批量分发);</p><p>不得篡改系统生成内容的署名或标识;</p><p>若内容包含第三方素材(如音乐、图片),用户需自行确保使用合法性。</p><p>6. 责任限制</p><p>系统不对以下情形承担责任:</p><p>用户未审核内容导致的平台封禁、投诉或法律风险;</p><p>第三方平台接口变更或服务中断;</p><p>因不可抗力(如网络故障)导致的发布延迟。</p><p>7. 其他</p><p>本条款解释权归服务提供方所有,更新后将在系统内公示,用户继续使用即视为同意。</p>
</body>
</html>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,16 +0,0 @@
#=========== 阿里云内容安全配置 ===========
# STS登录模式配置
# RAM用户AccessKey ID用于获取STS临时凭证
RAM_ACCESS_KEY_ID=LTAI5tNBzbeEbG1yCitvHsMb
# RAM用户AccessKey Secret
RAM_ACCESS_KEY_SECRET=G1xAUB8G6WDVo0SLr6DJaJjNWIlpmO
# 要扮演的RAM角色ARN
RAM_ROLE_ARN=acs:ram::5828544250383902:role/content-secret
# 阿里云区域可选默认为cn-shanghai
ALIBABA_CLOUD_REGION=ap-southeast-1
# 阿里云端点可选默认为green.cn-shanghai.aliyuncs.com
ALIBABA_CLOUD_ENDPOINT=green-cip.ap-southeast-1.aliyuncs.com

View File

@ -4,12 +4,8 @@ AppMode = "dev"
HttpPort = ":8085"
Host = "https://common.szjixun.cn"
RedirectUri = "/api/redirect/url"
ErpHost = "http://erpapi.test.fontree.cn:8081"
FieeHost = "http://erpapi.test.fontree.cn:8081"
AuthRedirectUrl = "http://saas-erp.test.fontree.cn:8081/media_account"
AuthCallback = "https://saas-test.szjixun.cn/api/fiee/media/as-oauth2callback"
CronOpen = false
proxyUrl = "http://47.84.75.255:6785"
ErpHost = "http://114.218.158.24:9020"
FieeHost = "http://114.218.158.24:9020"
[bos]
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
Sk = "d2ecaa9d75114d3b9f42b99014198306"
@ -19,12 +15,12 @@ BosBaseDir = "fiee"
BosHttp = "https://"
BosDomain = "cdns.fontree.cn"
[oss]
AccessKeyId = "OSS_AK"
AccessKeySecret = "OSS_SK"
Endpoint = "OSS_ENDPOINTT"
BucketName = "OSS_BUCKETNAME"
BaseDir = "fontree-fiee-test"
CdnHost = "OSS_CDN"
AccessKeyId = "LTAI5tLz1fSK53FQAEC9uNSb"
AccessKeySecret = "oGB9chrQzQzITXR2IGv37Ji5WxZh4j"
Endpoint = "oss-cn-hangzhou.aliyuncs.com"
BucketName = "fontree-test"
BaseDir = "fiee"
CdnHost = "https://cdn-test.szjixun.cn"
[redis]
RedisDB = "2"

View File

@ -4,12 +4,12 @@ dubbo:
protocol: zookeeper
timeout: 3s
# address: 121.229.45.214:9004
address: zookeeper:2181
address: 172.16.100.93:2181
# address: 127.0.0.1:2181
# address: 114.218.158.24:2181
consumer:
filter: tracing
request-timeout: 300s
request-timeout: 30s
references:
OrderClientImpl:
protocol: tri
@ -47,9 +47,6 @@ dubbo:
protocol: tri
retries: 0
interface: com.fontree.microservices.fiee.SecFiling
AyrshareClientImpl:
protocol: tri
interface: com.fontree.microservices.fiee.ayrshare
logger:
zap-config:
level: error # 日志级别

View File

@ -1,16 +0,0 @@
#=========== 阿里云内容安全配置 ===========
# STS登录模式配置
# RAM用户AccessKey ID用于获取STS临时凭证
RAM_ACCESS_KEY_ID=LTAI5tNBzbeEbG1yCitvHsMb
# RAM用户AccessKey Secret
RAM_ACCESS_KEY_SECRET=G1xAUB8G6WDVo0SLr6DJaJjNWIlpmO
# 要扮演的RAM角色ARN
RAM_ROLE_ARN=acs:ram::5828544250383902:role/content-secret
# 阿里云区域可选默认为cn-shanghai
ALIBABA_CLOUD_REGION=ap-southeast-1
# 阿里云端点可选默认为green.cn-shanghai.aliyuncs.com
ALIBABA_CLOUD_ENDPOINT=green-cip.ap-southeast-1.aliyuncs.com

View File

@ -6,10 +6,6 @@ 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"
AuthCallback = "https://erpapi.fiee.com/api/fiee/media/as-oauth2callback"
CronOpen = true
proxyUrl = ""
[bos]
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
Sk = "d2ecaa9d75114d3b9f42b99014198306"
@ -30,12 +26,12 @@ TelNum = "18021272627"
Password = "Gy.123456"
[oss]
AccessKeyId = "OSS_AK"
AccessKeySecret = "OSS_SK"
Endpoint = "OSS_ENDPOINTT"
BucketName = "OSS_BUCKETNAME"
BaseDir = "fontree-fiee"
CdnHost = "OSS_CDN"
AccessKeyId = "LTAI5tHfjSmWXHqfWgaL7Uo5"
AccessKeySecret = "kOPctFZ3DHsbdSSym1fLyDK39hkzPI"
Endpoint = "oss-cn-hangzhou.aliyuncs.com"
BucketName = "erp-k8s-store"
BaseDir = "fiee"
CdnHost = "https://e-cdn.fontree.cn"
[stripe]
Webhookkey = "whsec_Mol32WD1KcKHUdYsSwap0LR03q2g9qNY"

View File

@ -8,7 +8,7 @@ dubbo:
# address: 114.218.158.24:2181
consumer:
filter: tracing
request-timeout: 300s
request-timeout: 30s
references:
OrderClientImpl:
protocol: tri
@ -49,9 +49,6 @@ dubbo:
protocol: tri
retries: 0
interface: com.fontree.microservices.fiee.SecFiling
AyrshareClientImpl:
protocol: tri
interface: com.fontree.microservices.fiee.ayrshare
logger:
zap-config:
level: error # 日志级别

View File

@ -1,16 +0,0 @@
#=========== 阿里云内容安全配置 ===========
# STS登录模式配置
# RAM用户AccessKey ID用于获取STS临时凭证
RAM_ACCESS_KEY_ID=LTAI5tNBzbeEbG1yCitvHsMb
# RAM用户AccessKey Secret
RAM_ACCESS_KEY_SECRET=G1xAUB8G6WDVo0SLr6DJaJjNWIlpmO
# 要扮演的RAM角色ARN
RAM_ROLE_ARN=acs:ram::5828544250383902:role/content-secret
# 阿里云区域可选默认为cn-shanghai
ALIBABA_CLOUD_REGION=ap-southeast-1
# 阿里云端点可选默认为green.cn-shanghai.aliyuncs.com
ALIBABA_CLOUD_ENDPOINT=green-cip.ap-southeast-1.aliyuncs.com

View File

@ -4,13 +4,8 @@ AppMode = "test"
HttpPort = ":8085"
Host = "https://common.szjixun.cn"
RedirectUri = "/api/redirect/url"
ErpHost = "http://erpapi.test.fontree.cn:8081"
FieeHost = "http://erpapi.test.fontree.cn:8081"
FieeApiHost = "https://saas-test.szjixun.cn"
AuthRedirectUrl = "http://saas-erp.test.fontree.cn:8081/media_account"
AuthCallback = "https://saas-test.szjixun.cn/api/fiee/media/as-oauth2callback"
CronOpen = true
proxyUrl = "http://taifeng:fontree008@8.220.199.204:1081"
ErpHost = "http://114.218.158.24:9020"
FieeHost = "http://114.218.158.24:9020"
[bos]
Ak = "ALTAKxrqOQHnAN525Tb2GX4Bhe"
Sk = "d2ecaa9d75114d3b9f42b99014198306"
@ -20,12 +15,20 @@ BosBaseDir = "fiee"
BosHttp = "https://"
BosDomain = "cdns.fontree.cn"
[oss]
AccessKeyId = "OSS_AK"
AccessKeySecret = "OSS_SK"
Endpoint = "OSS_ENDPOINTT"
BucketName = "OSS_BUCKETNAME"
BaseDir = "fontree-fiee-test"
CdnHost = "OSS_CDN"
AccessKeyId = "LTAI5tLz1fSK53FQAEC9uNSb"
AccessKeySecret = "oGB9chrQzQzITXR2IGv37Ji5WxZh4j"
Endpoint = "oss-cn-hangzhou.aliyuncs.com"
BucketName = "fontree-test"
BaseDir = "fiee"
CdnHost = "https://cdn-test.szjixun.cn"
[oss]
AccessKeyId="LTAI5tLz1fSK53FQAEC9uNSb"
AccessKeysecret ="oGB9chrQzQzITXR2IGv37Ji5WxZh4j"
Endpoint = "oss-cn-hangzhou.aliyuncs.com"
BucketName = "fontree-test"
BaseDir = "fiee"
CdnHost = "https://cdn-test.szjixun.cn"
[redis]
RedisDB = "2"

View File

@ -9,7 +9,7 @@ dubbo:
# address: 114.218.158.24:2181
consumer:
filter: tracing
request-timeout: 300s
request-timeout: 30s
references:
OrderClientImpl:
protocol: tri
@ -47,9 +47,6 @@ dubbo:
protocol: tri
retries: 0
interface: com.fontree.microservices.fiee.SecFiling
AyrshareClientImpl:
protocol: tri
interface: com.fontree.microservices.fiee.ayrshare
logger:
zap-config:
level: error # 日志级别

56
go.mod
View File

@ -1,11 +1,10 @@
module fonchain-fiee
go 1.23.0
go 1.21.3
toolchain go1.23.10
toolchain go1.23.6
replace (
github.com/fonchain/utils/security => ../utils/security
//github.com/fonchain_enterprise/utils/objstorage => ../../tyfon-/utils/objstorage
github.com/fonchain/utils/voice => ../utils/voice
github.com/fonchain_enterprise/utils/aes => ../utils/aes
@ -72,7 +71,7 @@ require (
github.com/mschoch/smat v0.2.0 // indirect
github.com/nacos-group/nacos-sdk-go v1.1.1 // indirect
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pelletier/go-toml v1.7.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/prometheus/client_golang v1.12.2 // indirect
@ -80,20 +79,20 @@ require (
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/prometheus/statsd_exporter v0.21.0 // indirect
github.com/robfig/cron/v3 v3.0.1
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b
github.com/shirou/gopsutil v3.20.11+incompatible // indirect
github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect
github.com/uber/jaeger-client-go v2.29.1+incompatible // indirect
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
go.opencensus.io v0.23.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.21.0
golang.org/x/crypto v0.38.0 // indirect
golang.org/x/net v0.40.0 // indirect
golang.org/x/sys v0.33.0 // indirect
golang.org/x/text v0.25.0 // indirect
golang.org/x/crypto v0.19.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto v0.0.0-20211104193956-4c6863e31247 // indirect
google.golang.org/grpc v1.47.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
@ -105,39 +104,24 @@ require (
github.com/BurntSushi/toml v1.2.1
github.com/PuerkitoBio/goquery v1.8.1
github.com/disintegration/imaging v1.6.2
github.com/duke-git/lancet/v2 v2.3.8
github.com/envoyproxy/protoc-gen-validate v0.1.0
github.com/fonchain/utils/security v0.0.0-00010101000000-000000000000
github.com/fonchain/utils/voice v0.0.0-00010101000000-000000000000
github.com/fonchain_enterprise/utils/objstorage v0.0.0-00010101000000-000000000000
github.com/gin-contrib/pprof v1.4.0
github.com/go-redis/redis v6.15.9+incompatible
github.com/mholt/archiver v3.1.1+incompatible
github.com/natefinch/lumberjack v2.0.0+incompatible
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd
github.com/samber/lo v1.52.0
github.com/shopspring/decimal v1.4.0
github.com/signintech/gopdf v0.29.2
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
github.com/spf13/viper v1.7.1
github.com/tealeg/xlsx v1.0.5
github.com/u2takey/ffmpeg-go v0.5.0
github.com/xuri/excelize/v2 v2.9.1
golang.org/x/image v0.25.0
golang.org/x/image v0.0.0-20220902085622-e7cb96979f69
)
require (
cloud.google.com/go v0.65.0 // indirect
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 // indirect
github.com/alibaba/sentinel-golang v1.0.4 // indirect
github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.5 // indirect
github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.12 // indirect
github.com/alibabacloud-go/debug v1.0.1 // indirect
github.com/alibabacloud-go/green-20220302/v2 v2.23.0 // indirect
github.com/alibabacloud-go/tea v1.3.13 // indirect
github.com/alibabacloud-go/tea-utils/v2 v2.0.7 // indirect
github.com/aliyun/alibaba-cloud-sdk-go v1.63.107 // indirect
github.com/aliyun/credentials-go v1.4.5 // indirect
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1376 // indirect
github.com/andybalholm/cascadia v1.3.1 // indirect
github.com/aws/aws-sdk-go v1.38.20 // indirect
github.com/baidubce/bce-sdk-go v0.9.123 // indirect
@ -145,13 +129,11 @@ require (
github.com/bytedance/sonic v1.9.1 // indirect
github.com/census-instrumentation/opencensus-proto v0.2.1 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/clbanning/mxj/v2 v2.7.0 // indirect
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 // indirect
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/dorlolo/simpleRequest v1.2.7 // indirect
github.com/dsnet/compress v0.0.1 // indirect
github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5 // indirect
github.com/emicklei/go-restful/v3 v3.7.4 // indirect
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 // indirect
@ -163,26 +145,25 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-resty/resty/v2 v2.7.0 // indirect
github.com/golang/mock v1.5.0 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/vault/sdk v0.3.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/joho/godotenv v1.5.1 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/nwaples/rardecode v1.1.3 // indirect
github.com/natefinch/lumberjack v2.0.0+incompatible // indirect
github.com/nxadm/tail v1.4.11 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.18.1 // indirect
github.com/phpdave11/gofpdi v1.0.14-0.20211212211723-1f10f9844311 // indirect
github.com/pierrec/lz4 v2.5.2+incompatible // indirect
github.com/polarismesh/polaris-go v1.1.0 // indirect
github.com/richardlehane/mscfb v1.0.4 // indirect
github.com/richardlehane/msoleps v1.0.4 // indirect
github.com/shirou/gopsutil/v3 v3.21.6 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/smartystreets/assertions v1.1.1 // indirect
@ -192,16 +173,11 @@ require (
github.com/spf13/jwalterweatherman v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/tiendc/go-deepcopy v1.6.0 // indirect
github.com/tjfoc/gmsm v1.4.1 // indirect
github.com/tealeg/xlsx v1.0.5 // indirect
github.com/tklauser/go-sysconf v0.3.6 // indirect
github.com/tklauser/numcpus v0.2.2 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/u2takey/go-utils v0.3.1 // indirect
github.com/ulikunitz/xz v0.5.12 // indirect
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
github.com/xuri/efp v0.0.1 // indirect
github.com/xuri/nfp v0.0.1 // indirect
github.com/zouyx/agollo/v3 v3.4.5 // indirect
go.etcd.io/etcd/api/v3 v3.5.4 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.4 // indirect
@ -210,7 +186,7 @@ require (
go.opentelemetry.io/otel/trace v1.7.0 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.6 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect

180
go.sum
View File

@ -71,59 +71,12 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/alibaba/sentinel-golang v1.0.4 h1:i0wtMvNVdy7vM4DdzYrlC4r/Mpk1OKUUBurKKkWhEo8=
github.com/alibaba/sentinel-golang v1.0.4/go.mod h1:Lag5rIYyJiPOylK8Kku2P+a23gdKMMqzQS7wTnjWEpk=
github.com/alibabacloud-go/alibabacloud-gateway-pop v0.0.6 h1:eIf+iGJxdU4U9ypaUfbtOWCsZSbTb8AUHvyPrxu6mAA=
github.com/alibabacloud-go/alibabacloud-gateway-pop v0.0.6/go.mod h1:4EUIoxs/do24zMOGGqYVWgw0s9NtiylnJglOeEB5UJo=
github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4/go.mod h1:sCavSAvdzOjul4cEqeVtvlSaSScfNsTQ+46HwlTL1hc=
github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.5 h1:zE8vH9C7JiZLNJJQ5OwjU9mSi4T9ef9u3BURT6LCLC8=
github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.5/go.mod h1:tWnyE9AjF8J8qqLk645oUmVUnFybApTQWklQmi5tY6g=
github.com/alibabacloud-go/darabonba-array v0.1.0 h1:vR8s7b1fWAQIjEjWnuF0JiKsCvclSRTfDzZHTYqfufY=
github.com/alibabacloud-go/darabonba-array v0.1.0/go.mod h1:BLKxr0brnggqOJPqT09DFJ8g3fsDshapUD3C3aOEFaI=
github.com/alibabacloud-go/darabonba-encode-util v0.0.2 h1:1uJGrbsGEVqWcWxrS9MyC2NG0Ax+GpOM5gtupki31XE=
github.com/alibabacloud-go/darabonba-encode-util v0.0.2/go.mod h1:JiW9higWHYXm7F4PKuMgEUETNZasrDM6vqVr/Can7H8=
github.com/alibabacloud-go/darabonba-map v0.0.2 h1:qvPnGB4+dJbJIxOOfawxzF3hzMnIpjmafa0qOTp6udc=
github.com/alibabacloud-go/darabonba-map v0.0.2/go.mod h1:28AJaX8FOE/ym8OUFWga+MtEzBunJwQGceGQlvaPGPc=
github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.12 h1:e2yCrhtWd6Qcsy4he2OL+jIAU+93Lx9OcLlPRoFLT1w=
github.com/alibabacloud-go/darabonba-openapi/v2 v2.1.12/go.mod h1:f2wDpbM7hK9SvLIH09zSKVU1TsyemUNOqErMscMMl7c=
github.com/alibabacloud-go/darabonba-signature-util v0.0.7 h1:UzCnKvsjPFzApvODDNEYqBHMFt1w98wC7FOo0InLyxg=
github.com/alibabacloud-go/darabonba-signature-util v0.0.7/go.mod h1:oUzCYV2fcCH797xKdL6BDH8ADIHlzrtKVjeRtunBNTQ=
github.com/alibabacloud-go/darabonba-string v1.0.2 h1:E714wms5ibdzCqGeYJ9JCFywE5nDyvIXIIQbZVFkkqo=
github.com/alibabacloud-go/darabonba-string v1.0.2/go.mod h1:93cTfV3vuPhhEwGGpKKqhVW4jLe7tDpo3LUM0i0g6mA=
github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68/go.mod h1:6pb/Qy8c+lqua8cFpEy7g39NRRqOWc3rOwAy8m5Y2BY=
github.com/alibabacloud-go/debug v1.0.0/go.mod h1:8gfgZCCAC3+SCzjWtY053FrOcd4/qlH6IHTI4QyICOc=
github.com/alibabacloud-go/debug v1.0.1 h1:MsW9SmUtbb1Fnt3ieC6NNZi6aEwrXfDksD4QA6GSbPg=
github.com/alibabacloud-go/debug v1.0.1/go.mod h1:8gfgZCCAC3+SCzjWtY053FrOcd4/qlH6IHTI4QyICOc=
github.com/alibabacloud-go/endpoint-util v1.1.0 h1:r/4D3VSw888XGaeNpP994zDUaxdgTSHBbVfZlzf6b5Q=
github.com/alibabacloud-go/endpoint-util v1.1.0/go.mod h1:O5FuCALmCKs2Ff7JFJMudHs0I5EBgecXXxZRyswlEjE=
github.com/alibabacloud-go/green-20220302/v2 v2.23.0 h1:t2WsqrKt/ztPq4X2Orh3cvG5PsFdes/IQDkxZmB/f5k=
github.com/alibabacloud-go/green-20220302/v2 v2.23.0/go.mod h1:iZWuUEakwGct+e0NDnTBzOMaoblCUXH8Lf7S5v4kGKg=
github.com/alibabacloud-go/openapi-util v0.1.0 h1:0z75cIULkDrdEhkLWgi9tnLe+KhAFE/r5Pb3312/eAY=
github.com/alibabacloud-go/openapi-util v0.1.0/go.mod h1:sQuElr4ywwFRlCCberQwKRFhRzIyG4QTP/P4y1CJ6Ws=
github.com/alibabacloud-go/tea v1.1.0/go.mod h1:IkGyUSX4Ba1V+k4pCtJUc6jDpZLFph9QMy2VUPTwukg=
github.com/alibabacloud-go/tea v1.1.7/go.mod h1:/tmnEaQMyb4Ky1/5D+SE1BAsa5zj/KeGOFfwYm3N/p4=
github.com/alibabacloud-go/tea v1.1.8/go.mod h1:/tmnEaQMyb4Ky1/5D+SE1BAsa5zj/KeGOFfwYm3N/p4=
github.com/alibabacloud-go/tea v1.1.11/go.mod h1:/tmnEaQMyb4Ky1/5D+SE1BAsa5zj/KeGOFfwYm3N/p4=
github.com/alibabacloud-go/tea v1.1.17/go.mod h1:nXxjm6CIFkBhwW4FQkNrolwbfon8Svy6cujmKFUq98A=
github.com/alibabacloud-go/tea v1.1.20/go.mod h1:nXxjm6CIFkBhwW4FQkNrolwbfon8Svy6cujmKFUq98A=
github.com/alibabacloud-go/tea v1.2.2/go.mod h1:CF3vOzEMAG+bR4WOql8gc2G9H3EkH3ZLAQdpmpXMgwk=
github.com/alibabacloud-go/tea v1.3.12/go.mod h1:A560v/JTQ1n5zklt2BEpurJzZTI8TUT+Psg2drWlxRg=
github.com/alibabacloud-go/tea v1.3.13 h1:WhGy6LIXaMbBM6VBYcsDCz6K/TPsT1Ri2hPmmZffZ94=
github.com/alibabacloud-go/tea v1.3.13/go.mod h1:A560v/JTQ1n5zklt2BEpurJzZTI8TUT+Psg2drWlxRg=
github.com/alibabacloud-go/tea-utils v1.3.1 h1:iWQeRzRheqCMuiF3+XkfybB3kTgUXkXX+JMrqfLeB2I=
github.com/alibabacloud-go/tea-utils v1.3.1/go.mod h1:EI/o33aBfj3hETm4RLiAxF/ThQdSngxrpF8rKUDJjPE=
github.com/alibabacloud-go/tea-utils/v2 v2.0.5/go.mod h1:dL6vbUT35E4F4bFTHL845eUloqaerYBYPsdWR2/jhe4=
github.com/alibabacloud-go/tea-utils/v2 v2.0.7 h1:WDx5qW3Xa5ZgJ1c8NfqJkF6w+AU5wB8835UdhPr6Ax0=
github.com/alibabacloud-go/tea-utils/v2 v2.0.7/go.mod h1:qxn986l+q33J5VkialKMqT/TTs3E+U9MJpd001iWQ9I=
github.com/aliyun/alibaba-cloud-sdk-go v1.61.18/go.mod h1:v8ESoHo4SyHmuB4b1tJqDHxfTGEciD+yhvOU/5s1Rfk=
github.com/aliyun/alibaba-cloud-sdk-go v1.63.107 h1:qagvUyrgOnBIlVRQWOyCZGVKUIYbMBdGdJ104vBpRFU=
github.com/aliyun/alibaba-cloud-sdk-go v1.63.107/go.mod h1:SOSDHfe1kX91v3W5QiBsWSLqeLxImobbMX1mxrFHsVQ=
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1376 h1:lExo7heZgdFn5AbaNJEllbA0KSJ/Z8T7MphvMREJOOo=
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1376/go.mod h1:9CMdKNL3ynIGPpfTcdwTvIm8SGuAZYYC4jFVSSvE1YQ=
github.com/aliyun/aliyun-oss-go-sdk v2.2.4+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible h1:KXeJoM1wo9I/6xPTyt6qCxoSZnmASiAjlrr0dyTUKt8=
github.com/aliyun/aliyun-oss-go-sdk v2.2.6+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
github.com/aliyun/credentials-go v1.1.2/go.mod h1:ozcZaMR5kLM7pwtCMEpVmQ242suV6qTJya2bDq4X1Tw=
github.com/aliyun/credentials-go v1.3.1/go.mod h1:8jKYhQuDawt8x2+fusqa1Y6mPxemTsBEN04dgcAcYz0=
github.com/aliyun/credentials-go v1.3.6/go.mod h1:1LxUuX7L5YrZUWzBrRyk0SwSdH4OmPrib8NVePL3fxM=
github.com/aliyun/credentials-go v1.4.5 h1:O76WYKgdy1oQYYiJkERjlA2dxGuvLRrzuO2ScrtGWSk=
github.com/aliyun/credentials-go v1.4.5/go.mod h1:Jm6d+xIgwJVLVWT561vy67ZRP4lPTQxMbEYRuT2Ti1U=
github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c=
github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
@ -191,8 +144,6 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
github.com/clbanning/mxj/v2 v2.7.0 h1:WA/La7UGCanFe5NpHF0Q3DNtnCsVoxbPKuyBNHWRyME=
github.com/clbanning/mxj/v2 v2.7.0/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
@ -239,9 +190,6 @@ github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1
github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4=
github.com/dorlolo/simpleRequest v1.2.7 h1:I6AlEhMBSZPNQ4QjpCevhpxsPRDa3lgDOxJYYfmPTU8=
github.com/dorlolo/simpleRequest v1.2.7/go.mod h1:koVT8DQu+JK40UoMNBQjt+zomlCW8FqE0ffEzjTOWYY=
github.com/dsnet/compress v0.0.1 h1:PlZu0n3Tuv04TzpfPbrnI0HW/YwodEXDS+oPKahKF0Q=
github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5JflhBbQEHo=
github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY=
github.com/dubbogo/go-zookeeper v1.0.3/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c=
github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5 h1:XoR8SSVziXe698dt4uZYDfsmHpKLemqAgFyndQsq5Kw=
github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c=
@ -257,8 +205,6 @@ github.com/dubbogo/net v0.0.4/go.mod h1:1CGOnM7X3he+qgGNqjeADuE5vKZQx/eMSeUkpU3u
github.com/dubbogo/triple v1.0.9/go.mod h1:1t9me4j4CTvNDcsMZy6/OGarbRyAUSY0tFXGXHCp7Iw=
github.com/dubbogo/triple v1.1.8 h1:yE+J3W1NTZCEPa1FoX+VWZH6UF1c0+A2MGfERlU2zbI=
github.com/dubbogo/triple v1.1.8/go.mod h1:9pgEahtmsY/avYJp3dzUQE8CMMVe1NtGBmUhfICKLJk=
github.com/duke-git/lancet/v2 v2.3.8 h1:dlkqn6Nj2LRWFuObNxttkMHxrFeaV6T26JR8jbEVbPg=
github.com/duke-git/lancet/v2 v2.3.8/go.mod h1:zGa2R4xswg6EG9I6WnyubDbFO/+A/RROxIbXcwryTsc=
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
@ -443,8 +389,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
@ -561,9 +507,8 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ=
github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8=
@ -592,8 +537,6 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk=
github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
@ -644,8 +587,6 @@ github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mholt/archiver v3.1.1+incompatible h1:1dCVxuqs0dJseYEhi5pl7MYPH9zDa1wBi7mF09cbNkU=
github.com/mholt/archiver v3.1.1+incompatible/go.mod h1:Dh2dOXnSdiLxRiPoVfIr/fI1TwETms9B8CTWfeh7ROU=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
@ -700,8 +641,6 @@ github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk=
github.com/nwaples/rardecode v1.1.3 h1:cWCaZwfM5H7nAD6PyEdcVnczzV8i/JtotnyW/dD9lEc=
github.com/nwaples/rardecode v1.1.3/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=
@ -728,9 +667,8 @@ github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go
github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b h1:FfH+VrHHk6Lxt9HdVS0PXzSXFyS2NbZKXv33FYPol0A=
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b/go.mod h1:AC62GU6hc0BrNm+9RK9VSiwa/EUe1bkIeFORAMcHvJU=
github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA=
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
@ -813,11 +751,6 @@ github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3M
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA=
github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM=
github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk=
github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
github.com/richardlehane/msoleps v1.0.4 h1:WuESlvhX3gH2IHcd8UqyCuFY5yiq/GR/yqaSM/9/g00=
github.com/richardlehane/msoleps v1.0.4/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
@ -832,8 +765,6 @@ github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
github.com/samber/lo v1.52.0 h1:Rvi+3BFHES3A8meP33VPAxiBZX/Aws5RxrschYGjomw=
github.com/samber/lo v1.52.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0=
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b h1:gQZ0qzfKHQIybLANtM3mBXNUtOfsCFXeTsnBqCsx1KM=
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
@ -842,8 +773,6 @@ github.com/shirou/gopsutil v3.20.11+incompatible h1:LJr4ZQK4mPpIV5gOa4jCOKOGb4ty
github.com/shirou/gopsutil v3.20.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
github.com/shirou/gopsutil/v3 v3.21.6 h1:vU7jrp1Ic/2sHB7w6UNs7MIkn7ebVtTb5D9j45o9VYE=
github.com/shirou/gopsutil/v3 v3.21.6/go.mod h1:JfVbDpIBLVzT8oKbvMg9P3wEIMDDpVn+LwHTKj0ST88=
github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k=
github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/signintech/gopdf v0.29.2 h1:ksvYuHNwEBP8Mi/4q5MN1ZdW9OpMbWn3pEn3ewiWoSc=
github.com/signintech/gopdf v0.29.2/go.mod h1:d23eO35GpEliSrF22eJ4bsM3wVeQJTjXTHq5x5qGKjA=
@ -856,7 +785,6 @@ github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0=
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/assertions v1.1.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
github.com/smartystreets/assertions v1.1.1 h1:T/YLemO5Yp7KPzS+lVtu+WsHn8yoSwTfItdAd1r3cck=
github.com/smartystreets/assertions v1.1.1/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
@ -891,7 +819,6 @@ github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3
github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
@ -906,9 +833,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY=
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/tealeg/xlsx v1.0.5 h1:+f8oFmvY8Gw1iUXzPk+kz+4GpbDZPK1FhPiQRd+ypgE=
@ -916,11 +842,6 @@ github.com/tealeg/xlsx v1.0.5/go.mod h1:btRS8dz54TDnvKNosuAqxrM1QgN1udgk9O34bDCn
github.com/tebeka/strftime v0.1.3/go.mod h1:7wJm3dZlpr4l/oVK0t1HYIc4rMzQ2XJlOMIUJUJH6XQ=
github.com/tevid/gohamcrest v1.1.1 h1:ou+xSqlIw1xfGTg1uq1nif/htZ2S3EzRqLm2BP+tYU0=
github.com/tevid/gohamcrest v1.1.1/go.mod h1:3UvtWlqm8j5JbwYZh80D/PVBt0mJ1eJiYgZMibh0H/k=
github.com/tiendc/go-deepcopy v1.6.0 h1:0UtfV/imoCwlLxVsyfUd4hNHnB3drXsfle+wzSCA5Wo=
github.com/tiendc/go-deepcopy v1.6.0/go.mod h1:toXoeQoUqXOOS/X4sKuiAoSk6elIdqc0pN7MTgOOo2I=
github.com/tjfoc/gmsm v1.3.2/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w=
github.com/tjfoc/gmsm v1.4.1 h1:aMe1GlZb+0bLjn+cKTPEvvn9oUEBlJitaZiiBwsbgho=
github.com/tjfoc/gmsm v1.4.1/go.mod h1:j4INPkHWMrhJb38G+J6W4Tw0AbuN8Thu3PbdVYhVcTE=
github.com/tklauser/go-sysconf v0.3.6 h1:oc1sJWvKkmvIxhDHeKWvZS4f6AW+YcoguSfRF2/Hmo4=
github.com/tklauser/go-sysconf v0.3.6/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI=
github.com/tklauser/numcpus v0.2.2 h1:oyhllyrScuYI6g+h/zUvNXNp1wy7x8qQy3t/piefldA=
@ -938,9 +859,8 @@ github.com/u2takey/ffmpeg-go v0.5.0 h1:r7d86XuL7uLWJ5mzSeQ03uvjfIhiJYvsRAJFCW4uk
github.com/u2takey/ffmpeg-go v0.5.0/go.mod h1:ruZWkvC1FEiUNjmROowOAps3ZcWxEiOpFoHCvk97kGc=
github.com/u2takey/go-utils v0.3.1 h1:TaQTgmEZZeDHQFYfd+AdUT1cT4QJgJn/XVPELhHw4ys=
github.com/u2takey/go-utils v0.3.1/go.mod h1:6e+v5vEZ/6gu12w/DC2ixZdZtCrNokVxD0JUklcqdCs=
github.com/uber/jaeger-client-go v2.29.1+incompatible h1:R9ec3zO3sGpzs0abd43Y+fBZRJ9uiH6lXyR/+u6brW4=
github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o=
github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg=
github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U=
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
@ -951,24 +871,12 @@ github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxW
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8=
github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc=
github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo=
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/xuri/efp v0.0.1 h1:fws5Rv3myXyYni8uwj2qKjVaRP30PdjeYe2Y6FDsCL8=
github.com/xuri/efp v0.0.1/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
github.com/xuri/excelize/v2 v2.9.1 h1:VdSGk+rraGmgLHGFaGG9/9IWu1nj4ufjJ7uwMDtj8Qw=
github.com/xuri/excelize/v2 v2.9.1/go.mod h1:x7L6pKz2dvo9ejrRuD8Lnl98z4JLt0TGAwjhW+EiP8s=
github.com/xuri/nfp v0.0.1 h1:MDamSGatIvp8uOmDP8FnmjuQpu90NzdJxo7242ANR9Q=
github.com/xuri/nfp v0.0.1/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.30/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
@ -1047,23 +955,13 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191219195013-becbf705a915/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=
golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8=
golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@ -1082,8 +980,8 @@ golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86h
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.25.0 h1:Y6uW6rH1y5y/LK1J8BPWZtr6yZ7hrsy6hFrXjgsc2fQ=
golang.org/x/image v0.25.0/go.mod h1:tCAmOEGthTtkalusGp1g3xa2gke8J6c2N565dTyl9Rs=
golang.org/x/image v0.0.0-20220902085622-e7cb96979f69 h1:Lj6HJGCSn5AjxRAH2+r35Mir4icalbqku+CLUtjnvXY=
golang.org/x/image v0.0.0-20220902085622-e7cb96979f69/go.mod h1:doUCurBvlfPMKfmIpRIywoHmhN3VyhnoFDbvIEWF4hY=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@ -1105,10 +1003,6 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@ -1147,7 +1041,6 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
@ -1161,18 +1054,9 @@ golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20211105192438-b53810dc28af/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY=
golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@ -1193,12 +1077,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@ -1241,7 +1121,6 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200509044756-6aff5f38e54f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -1278,28 +1157,11 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@ -1310,13 +1172,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4=
golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@ -1370,7 +1227,6 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs
golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200509030707-2212a7e161a5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
@ -1384,9 +1240,6 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@ -1519,7 +1372,7 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.56.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
@ -1542,7 +1395,6 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=

3
pkg/cache/common.go vendored
View File

@ -1,9 +1,8 @@
package cache
import (
"strconv"
"github.com/go-redis/redis"
"strconv"
)
// RedisClient Redis缓存客户端单例

View File

@ -1,14 +0,0 @@
package common
import (
"fonchain-fiee/pkg/utils"
)
func Init() {
_ = utils.CreateDirPath("./runtime")
//pkgSecurity.Init()
//utils.CopyFile("./data/policy.html", "./runtime")
//utils.CopyFile("./data/service.html", "./runtime")
//utils.CopyFile("../data/policy.html", "./runtime")
//utils.CopyFile("../data/service.html", "./runtime")
}

View File

@ -98,90 +98,6 @@ var EnMessages = map[string]string{
"实名审核中": "Real-name verification is underway",
"实名审核失败": "The real-name verification failed",
"未知实名状态": "Unknown real-name status",
// Bundle related messages
"创建增值套餐失败": "Failed to create value-added bundle",
"增值套餐列表查询失败": "Failed to query value-added bundle list",
"增值套餐详情查询失败": "Failed to query value-added bundle details",
"保存增值套餐失败": "Failed to save value-added bundle",
"套餐服务列表查询失败": "Failed to query bundle service list",
"套餐服务详情查询失败": "Failed to query bundle service details",
"套餐服务语言详情查询失败": "Failed to query bundle service language details",
"创建套餐失败": "Failed to create bundle",
"更新套餐失败": "Failed to update bundle",
"删除套餐失败": "Failed to delete bundle",
"套餐列表查询失败": "Failed to query bundle list",
"套餐详情查询失败": "Failed to query bundle details",
"更新套餐上下架失败": "Failed to update bundle shelf status",
"根据订单号查询增值套餐失败": "Failed to query value-added bundle by order number",
// Order related messages
"缺少语言类型": "Missing language type",
"订单金额错误": "Invalid order amount",
"您还有未支付的订单,无法再次购买": "You have unpaid orders and cannot purchase again",
"套餐数量无效": "Invalid bundle quantity",
"当前套餐已过期": "Current bundle has expired",
"永久套餐无需购买": "Permanent bundle does not need to be purchased",
"导出订单信息失败": "Failed to export order information",
// Balance related messages
"套餐扩展失败": "Bundle extension failed",
"套餐扩展记录列表查询失败": "Failed to query bundle extension record list",
"套餐余额列表查询失败": "Failed to query bundle balance list",
"套餐使用记录列表查询失败": "Failed to query bundle usage record list",
"套餐余额查询失败": "Failed to query bundle balance",
"待确认作品列表查询失败": "Failed to query pending confirmation works list",
"确认消耗余量失败": "Failed to confirm balance consumption",
"添加消耗余量失败": "Failed to add balance consumption",
"套餐激活失败": "Bundle activation failed",
"套餐余量导出失败": "Failed to export bundle balance",
"设置套餐余额布局失败": "Failed to set bundle balance layout",
"获取套餐余额布局失败": "Failed to get bundle balance layout",
"余量不足": "Insufficient balance",
// Metrics related messages
"业务概览查询失败": "Failed to query business overview",
"运营数据查询失败": "Failed to query operating data",
"套餐购买数据导出失败": "Failed to export bundle purchase data",
"艺人账号数据导出失败": "Failed to export artist account data",
"视频上传数据导出失败": "Failed to export video upload data",
"服务使用明细数据导出失败": "Failed to export service usage detail data",
// Work related messages
"更新作品状态失败": "Failed to update work status",
"获取作品详情失败": "Failed to get work details",
// Website related messages
"创建官方信息失败": "Failed to create official information",
"更新官方信息失败": "Failed to update official information",
"更新官方信息状态失败": "Failed to update official information status",
"官方信息列表查询失败": "Failed to query official information list",
"官方信息详情查询失败": "Failed to query official information details",
"删除官方信息失败": "Failed to delete official information",
"数据信息为空": "Data information is empty",
"获取官方信息失败": "Failed to get official information",
"获取官方信息类型失败": "Failed to get official information types",
"官网官方信息列表查询失败": "Failed to query website official information list",
// Governance related messages
"创建治理信息失败": "Failed to create governance information",
"删除治理信息失败": "Failed to delete governance information",
"治理信息列表查询失败": "Failed to query governance information list",
"编辑治理信息失败": "Failed to edit governance information",
"显示治理信息失败": "Failed to display governance information",
// Press releases related messages
"创建新闻发布失败": "Failed to create press release",
"删除新闻发布失败": "Failed to delete press release",
"新闻发布列表查询失败": "Failed to query press release list",
"编辑新闻发布失败": "Failed to edit press release",
"显示新闻发布失败": "Failed to display press release",
"获取新闻发布失败": "Failed to get press release",
// Other messages
"未知增值服务": "Unknown value-added service",
"套餐未绑定增值服务": "Bundle not bound to value-added service",
"网络错误": "Network error",
}
var DeDEMessages = map[string]string{
@ -274,90 +190,6 @@ var DeDEMessages = map[string]string{
"实名审核中": "Contest läuft",
"实名审核失败": "Die confirmation hat versagt",
"未知实名状态": "Noch nicht registriert",
// Bundle related messages
"创建增值套餐失败": "Fehler beim Erstellen des Mehrwert-Bundles",
"增值套餐列表查询失败": "Fehler beim Abfragen der Mehrwert-Bundle-Liste",
"增值套餐详情查询失败": "Fehler beim Abfragen der Mehrwert-Bundle-Details",
"保存增值套餐失败": "Fehler beim Speichern des Mehrwert-Bundles",
"套餐服务列表查询失败": "Fehler beim Abfragen der Bundle-Service-Liste",
"套餐服务详情查询失败": "Fehler beim Abfragen der Bundle-Service-Details",
"套餐服务语言详情查询失败": "Fehler beim Abfragen der Bundle-Service-Sprachdetails",
"创建套餐失败": "Fehler beim Erstellen des Bundles",
"更新套餐失败": "Fehler beim Aktualisieren des Bundles",
"删除套餐失败": "Fehler beim Löschen des Bundles",
"套餐列表查询失败": "Fehler beim Abfragen der Bundle-Liste",
"套餐详情查询失败": "Fehler beim Abfragen der Bundle-Details",
"更新套餐上下架失败": "Fehler beim Aktualisieren des Bundle-Regalstatus",
"根据订单号查询增值套餐失败": "Fehler beim Abfragen des Mehrwert-Bundles nach Bestellnummer",
// Order related messages
"缺少语言类型": "Fehlender Sprachtyp",
"订单金额错误": "Ungültiger Bestellbetrag",
"您还有未支付的订单,无法再次购买": "Sie haben unbezahlte Bestellungen und können nicht erneut kaufen",
"套餐数量无效": "Ungültige Bundle-Menge",
"当前套餐已过期": "Aktuelles Bundle ist abgelaufen",
"永久套餐无需购买": "Permanentes Bundle muss nicht gekauft werden",
"导出订单信息失败": "Fehler beim Exportieren der Bestellinformationen",
// Balance related messages
"套餐扩展失败": "Bundle-Erweiterung fehlgeschlagen",
"套餐扩展记录列表查询失败": "Fehler beim Abfragen der Bundle-Erweiterungsaufzeichnungsliste",
"套餐余额列表查询失败": "Fehler beim Abfragen der Bundle-Saldoliste",
"套餐使用记录列表查询失败": "Fehler beim Abfragen der Bundle-Nutzungsaufzeichnungsliste",
"套餐余额查询失败": "Fehler beim Abfragen des Bundle-Saldos",
"待确认作品列表查询失败": "Fehler beim Abfragen der Liste ausstehender Bestätigungswerke",
"确认消耗余量失败": "Fehler beim Bestätigen des Saldoverbrauchs",
"添加消耗余量失败": "Fehler beim Hinzufügen des Saldoverbrauchs",
"套餐激活失败": "Bundle-Aktivierung fehlgeschlagen",
"套餐余量导出失败": "Fehler beim Exportieren des Bundle-Saldos",
"设置套餐余额布局失败": "Fehler beim Festlegen des Bundle-Saldo-Layouts",
"获取套餐余额布局失败": "Fehler beim Abrufen des Bundle-Saldo-Layouts",
"余量不足": "Unzureichender Saldo",
// Metrics related messages
"业务概览查询失败": "Fehler beim Abfragen der Geschäftsübersicht",
"运营数据查询失败": "Fehler beim Abfragen der Betriebsdaten",
"套餐购买数据导出失败": "Fehler beim Exportieren der Bundle-Kaufdaten",
"艺人账号数据导出失败": "Fehler beim Exportieren der Künstler-Kontodaten",
"视频上传数据导出失败": "Fehler beim Exportieren der Video-Upload-Daten",
"服务使用明细数据导出失败": "Fehler beim Exportieren der Service-Nutzungsdetaildaten",
// Work related messages
"更新作品状态失败": "Fehler beim Aktualisieren des Werkstatus",
"获取作品详情失败": "Fehler beim Abrufen der Werkdetails",
// Website related messages
"创建官方信息失败": "Fehler beim Erstellen offizieller Informationen",
"更新官方信息失败": "Fehler beim Aktualisieren offizieller Informationen",
"更新官方信息状态失败": "Fehler beim Aktualisieren des Status offizieller Informationen",
"官方信息列表查询失败": "Fehler beim Abfragen der Liste offizieller Informationen",
"官方信息详情查询失败": "Fehler beim Abfragen der Details offizieller Informationen",
"删除官方信息失败": "Fehler beim Löschen offizieller Informationen",
"数据信息为空": "Dateninformationen sind leer",
"获取官方信息失败": "Fehler beim Abrufen offizieller Informationen",
"获取官方信息类型失败": "Fehler beim Abrufen der Typen offizieller Informationen",
"官网官方信息列表查询失败": "Fehler beim Abfragen der Website-Liste offizieller Informationen",
// Governance related messages
"创建治理信息失败": "Fehler beim Erstellen von Governance-Informationen",
"删除治理信息失败": "Fehler beim Löschen von Governance-Informationen",
"治理信息列表查询失败": "Fehler beim Abfragen der Governance-Informationsliste",
"编辑治理信息失败": "Fehler beim Bearbeiten von Governance-Informationen",
"显示治理信息失败": "Fehler beim Anzeigen von Governance-Informationen",
// Press releases related messages
"创建新闻发布失败": "Fehler beim Erstellen einer Pressemitteilung",
"删除新闻发布失败": "Fehler beim Löschen einer Pressemitteilung",
"新闻发布列表查询失败": "Fehler beim Abfragen der Pressemitteilungsliste",
"编辑新闻发布失败": "Fehler beim Bearbeiten einer Pressemitteilung",
"显示新闻发布失败": "Fehler beim Anzeigen einer Pressemitteilung",
"获取新闻发布失败": "Fehler beim Abrufen einer Pressemitteilung",
// Other messages
"未知增值服务": "Unbekannter Mehrwertdienst",
"套餐未绑定增值服务": "Bundle nicht an Mehrwertdienst gebunden",
"网络错误": "Netzwerkfehler",
}
var JaJPMessages = map[string]string{
@ -451,90 +283,6 @@ var JaJPMessages = map[string]string{
"实名审核中": "実名審査中です",
"实名审核失败": "実名検証失敗です",
"未知实名状态": "未知の実名状態です",
// Bundle related messages
"创建增值套餐失败": "付加価値バンドルの作成に失敗しました",
"增值套餐列表查询失败": "付加価値バンドルリストの検索に失敗しました",
"增值套餐详情查询失败": "付加価値バンドル詳細の検索に失敗しました",
"保存增值套餐失败": "付加価値バンドルの保存に失敗しました",
"套餐服务列表查询失败": "バンドルサービスリストの検索に失敗しました",
"套餐服务详情查询失败": "バンドルサービス詳細の検索に失敗しました",
"套餐服务语言详情查询失败": "バンドルサービス言語詳細の検索に失敗しました",
"创建套餐失败": "バンドルの作成に失敗しました",
"更新套餐失败": "バンドルの更新に失敗しました",
"删除套餐失败": "バンドルの削除に失敗しました",
"套餐列表查询失败": "バンドルリストの検索に失敗しました",
"套餐详情查询失败": "バンドル詳細の検索に失敗しました",
"更新套餐上下架失败": "バンドルの棚上げ状態の更新に失敗しました",
"根据订单号查询增值套餐失败": "注文番号による付加価値バンドルの検索に失敗しました",
// Order related messages
"缺少语言类型": "言語タイプが不足しています",
"订单金额错误": "注文金額が無効です",
"您还有未支付的订单,无法再次购买": "未払いの注文があるため、再度購入できません",
"套餐数量无效": "バンドル数量が無効です",
"当前套餐已过期": "現在のバンドルは期限切れです",
"永久套餐无需购买": "永続バンドルは購入不要です",
"导出订单信息失败": "注文情報のエクスポートに失敗しました",
// Balance related messages
"套餐扩展失败": "バンドル拡張に失敗しました",
"套餐扩展记录列表查询失败": "バンドル拡張記録リストの検索に失敗しました",
"套餐余额列表查询失败": "バンドル残高リストの検索に失敗しました",
"套餐使用记录列表查询失败": "バンドル使用記録リストの検索に失敗しました",
"套餐余额查询失败": "バンドル残高の検索に失敗しました",
"待确认作品列表查询失败": "確認待ち作品リストの検索に失敗しました",
"确认消耗余量失败": "残高消費の確認に失敗しました",
"添加消耗余量失败": "残高消費の追加に失敗しました",
"套餐激活失败": "バンドルのアクティベーションに失敗しました",
"套餐余量导出失败": "バンドル残高のエクスポートに失敗しました",
"设置套餐余额布局失败": "バンドル残高レイアウトの設定に失敗しました",
"获取套餐余额布局失败": "バンドル残高レイアウトの取得に失敗しました",
"余量不足": "残高不足です",
// Metrics related messages
"业务概览查询失败": "ビジネス概要の検索に失敗しました",
"运营数据查询失败": "運営データの検索に失敗しました",
"套餐购买数据导出失败": "バンドル購入データのエクスポートに失敗しました",
"艺人账号数据导出失败": "アーティストアカウントデータのエクスポートに失敗しました",
"视频上传数据导出失败": "動画アップロードデータのエクスポートに失敗しました",
"服务使用明细数据导出失败": "サービス使用詳細データのエクスポートに失敗しました",
// Work related messages
"更新作品状态失败": "作品ステータスの更新に失敗しました",
"获取作品详情失败": "作品詳細の取得に失敗しました",
// Website related messages
"创建官方信息失败": "公式情報の作成に失敗しました",
"更新官方信息失败": "公式情報の更新に失敗しました",
"更新官方信息状态失败": "公式情報ステータスの更新に失敗しました",
"官方信息列表查询失败": "公式情報リストの検索に失敗しました",
"官方信息详情查询失败": "公式情報詳細の検索に失敗しました",
"删除官方信息失败": "公式情報の削除に失敗しました",
"数据信息为空": "データ情報が空です",
"获取官方信息失败": "公式情報の取得に失敗しました",
"获取官方信息类型失败": "公式情報タイプの取得に失敗しました",
"官网官方信息列表查询失败": "ウェブサイト公式情報リストの検索に失敗しました",
// Governance related messages
"创建治理信息失败": "ガバナンス情報の作成に失敗しました",
"删除治理信息失败": "ガバナンス情報の削除に失敗しました",
"治理信息列表查询失败": "ガバナンス情報リストの検索に失敗しました",
"编辑治理信息失败": "ガバナンス情報の編集に失敗しました",
"显示治理信息失败": "ガバナンス情報の表示に失敗しました",
// Press releases related messages
"创建新闻发布失败": "プレスリリースの作成に失敗しました",
"删除新闻发布失败": "プレスリリースの削除に失敗しました",
"新闻发布列表查询失败": "プレスリリースリストの検索に失敗しました",
"编辑新闻发布失败": "プレスリリースの編集に失敗しました",
"显示新闻发布失败": "プレスリリースの表示に失敗しました",
"获取新闻发布失败": "プレスリリースの取得に失敗しました",
// Other messages
"未知增值服务": "未知の付加価値サービス",
"套餐未绑定增值服务": "バンドルが付加価値サービスにバインドされていません",
"网络错误": "ネットワークエラー",
}
var ZhTWMessages = map[string]string{
@ -638,88 +386,4 @@ var ZhTWMessages = map[string]string{
"更新失败": "更新失敗",
"删除失败": "刪除失敗",
"更新状态失败": "更新狀態失敗",
// Bundle related messages
"创建增值套餐失败": "創建增值套餐失敗",
"增值套餐列表查询失败": "增值套餐列表查詢失敗",
"增值套餐详情查询失败": "增值套餐詳情查詢失敗",
"保存增值套餐失败": "保存增值套餐失敗",
"套餐服务列表查询失败": "套餐服務列表查詢失敗",
"套餐服务详情查询失败": "套餐服務詳情查詢失敗",
"套餐服务语言详情查询失败": "套餐服務語言詳情查詢失敗",
"创建套餐失败": "創建套餐失敗",
"更新套餐失败": "更新套餐失敗",
"删除套餐失败": "刪除套餐失敗",
"套餐列表查询失败": "套餐列表查詢失敗",
"套餐详情查询失败": "套餐詳情查詢失敗",
"更新套餐上下架失败": "更新套餐上下架失敗",
"根据订单号查询增值套餐失败": "根據訂單號查詢增值套餐失敗",
// Order related messages
"缺少语言类型": "缺少語言類型",
"订单金额错误": "訂單金額錯誤",
"您还有未支付的订单,无法再次购买": "您還有未支付的訂單,無法再次購買",
"套餐数量无效": "套餐數量無效",
"当前套餐已过期": "當前套餐已過期",
"永久套餐无需购买": "永久套餐無需購買",
"导出订单信息失败": "導出訂單信息失敗",
// Balance related messages
"套餐扩展失败": "套餐擴展失敗",
"套餐扩展记录列表查询失败": "套餐擴展記錄列表查詢失敗",
"套餐余额列表查询失败": "套餐餘額列表查詢失敗",
"套餐使用记录列表查询失败": "套餐使用記錄列表查詢失敗",
"套餐余额查询失败": "套餐餘額查詢失敗",
"待确认作品列表查询失败": "待確認作品列表查詢失敗",
"确认消耗余量失败": "確認消耗餘量失敗",
"添加消耗余量失败": "添加消耗餘量失敗",
"套餐激活失败": "套餐激活失敗",
"套餐余量导出失败": "套餐餘量導出失敗",
"设置套餐余额布局失败": "設置套餐餘額佈局失敗",
"获取套餐余额布局失败": "獲取套餐餘額佈局失敗",
"余量不足": "餘量不足",
// Metrics related messages
"业务概览查询失败": "業務概覽查詢失敗",
"运营数据查询失败": "運營數據查詢失敗",
"套餐购买数据导出失败": "套餐購買數據導出失敗",
"艺人账号数据导出失败": "藝人賬號數據導出失敗",
"视频上传数据导出失败": "視頻上傳數據導出失敗",
"服务使用明细数据导出失败": "服務使用明細數據導出失敗",
// Work related messages
"更新作品状态失败": "更新作品狀態失敗",
"获取作品详情失败": "獲取作品詳情失敗",
// Website related messages
"创建官方信息失败": "創建官方信息失敗",
"更新官方信息失败": "更新官方信息失敗",
"更新官方信息状态失败": "更新官方信息狀態失敗",
"官方信息列表查询失败": "官方信息列表查詢失敗",
"官方信息详情查询失败": "官方信息詳情查詢失敗",
"删除官方信息失败": "刪除官方信息失敗",
"数据信息为空": "數據信息為空",
"获取官方信息失败": "獲取官方信息失敗",
"获取官方信息类型失败": "獲取官方信息類型失敗",
"官网官方信息列表查询失败": "官網官方信息列表查詢失敗",
// Governance related messages
"创建治理信息失败": "創建治理信息失敗",
"删除治理信息失败": "刪除治理信息失敗",
"治理信息列表查询失败": "治理信息列表查詢失敗",
"编辑治理信息失败": "編輯治理信息失敗",
"显示治理信息失败": "顯示治理信息失敗",
// Press releases related messages
"创建新闻发布失败": "創建新聞發佈失敗",
"删除新闻发布失败": "刪除新聞發佈失敗",
"新闻发布列表查询失败": "新聞發佈列表查詢失敗",
"编辑新闻发布失败": "編輯新聞發佈失敗",
"显示新闻发布失败": "顯示新聞發佈失敗",
"获取新闻发布失败": "獲取新聞發佈失敗",
// Other messages
"未知增值服务": "未知增值服務",
"套餐未绑定增值服务": "套餐未綁定增值服務",
"网络错误": "網絡錯誤",
}

View File

@ -1,32 +0,0 @@
package qwen
import (
"encoding/json"
"errors"
"fmt"
modelQwen "fonchain-fiee/pkg/model/qwen"
"fonchain-fiee/pkg/utils"
"go.uber.org/zap"
)
func Chat(req modelQwen.ChatRequest) (resp *modelQwen.ChatResponse, err error) {
jsonData, err := json.Marshal(req)
if err != nil {
zap.L().Error("GenerateTextImage Marshal failed", zap.Error(err))
return nil, errors.New("序列化请求失败")
}
body, err := utils.PostBytes("https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions", map[string]interface{}{
"Authorization": "Bearer " + modelQwen.DashscopeAPIKey,
"Content-Type": "application/json",
}, jsonData)
if err != nil {
zap.L().Error("Chat Post err", zap.Error(err))
return nil, errors.New("对话异常")
}
var result modelQwen.ChatResponse
if err = json.Unmarshal(body, &result); err != nil {
return nil, fmt.Errorf("解析响应失败: %v", "")
}
return &result, nil
}

View File

@ -1,122 +0,0 @@
package qwen
import (
"encoding/json"
"errors"
"fmt"
modelQwen "fonchain-fiee/pkg/model/qwen"
"fonchain-fiee/pkg/utils"
"time"
"go.uber.org/zap"
)
// GenerateTextImage 调用通义千问文生图API
func GenerateTextImage(prompt string, size string) (resp *modelQwen.QwenImageResponse, err error) {
reqBody := modelQwen.QwenImageRequest{
Model: "wan2.2-t2i-flash", // wan2.2-t2i-flash 快
Input: modelQwen.QwenImageInput{
Prompt: prompt,
},
Parameters: modelQwen.QwenImageParameters{
Watermark: false,
PromptExtend: true,
Size: size,
N: 4,
Seed: time.Now().Unix(),
},
}
jsonData, err := json.Marshal(reqBody)
if err != nil {
zap.L().Error("GenerateTextImage Marshal failed", zap.Error(err))
return nil, errors.New("序列化请求失败")
}
body, err := utils.PostBytes(modelQwen.DashscopeText2ImageURL, map[string]interface{}{
"Authorization": "Bearer " + modelQwen.DashscopeAPIKey,
"Content-Type": "application/json",
"X-DashScope-Async": "enable",
}, jsonData)
if err != nil {
zap.L().Error("GenerateTextImage Post failed", zap.Error(err))
return nil, errors.New("请求生图失败")
}
var result modelQwen.QwenImageResponse
if err = json.Unmarshal(body, &result); err != nil {
return nil, fmt.Errorf("解析响应失败: %v", "")
}
if result.Code != "" {
return nil, fmt.Errorf("生成失败: %s", "")
}
return &result, nil
}
// GenerateEditImage 图生图
func GenerateEditImage(prompt string, images []string, size string) (*modelQwen.QwenImageResponse, error) {
var reqBody modelQwen.QwenEditImageRequest
reqBody = modelQwen.QwenEditImageRequest{
Model: "wan2.5-i2i-preview",
Input: modelQwen.QwenEditImageInput{
Prompt: prompt,
Images: images,
NegativePrompt: "",
},
Parameters: modelQwen.QwenEditImageParameters{
Size: size,
N: 4,
Watermark: false,
Seed: time.Now().Unix(),
},
}
jsonData, err := json.Marshal(reqBody)
if err != nil {
zap.L().Error("GenerateEditImage Marshal failed", zap.Error(err))
return nil, errors.New("序列化请求失败")
}
body, err := utils.PostBytes(modelQwen.DashscopeEditImageURL, map[string]interface{}{
"Authorization": "Bearer " + modelQwen.DashscopeAPIKey,
"Content-Type": "application/json",
"X-DashScope-Async": "enable",
}, jsonData)
if err != nil {
zap.L().Error("GenerateEditImage PostBytes failed", zap.Error(err))
return nil, errors.New("请求异常")
}
var result modelQwen.QwenImageResponse
if err = json.Unmarshal(body, &result); err != nil {
zap.L().Error("GenerateEditImage PostBytes failed", zap.Error(err))
return nil, errors.New("解析响应失败")
}
if result.Code != "" {
return nil, fmt.Errorf("生成失败: %s", "")
}
return &result, nil
}
func ImgTaskResult(taskID string) (*modelQwen.QwenImageResponse, error) {
for {
body, err := utils.GetBytes(fmt.Sprintf("https://dashscope.aliyuncs.com/api/v1/tasks/%s", taskID), map[string]interface{}{
"Authorization": "Bearer " + "sk-5ae9df5d3bcf4755ad5d12012058a2e7",
"Content-Type": "application/json",
})
if err != nil {
zap.L().Error("ImgTaskResult GetBytes failed", zap.Error(err))
return nil, errors.New("请求失败")
}
var info modelQwen.QwenImageResponse
if err = json.Unmarshal(body, &info); err != nil {
zap.L().Error("ImgTaskResult Unmarshal failed", zap.Error(err))
return nil, errors.New("解析响应失败")
}
if info.Code != "" {
return nil, fmt.Errorf("生成失败: %s", "")
}
if info.Output.TaskStatus == "FAILED" {
return nil, fmt.Errorf("生成失败")
}
if len(info.Output.Results) > 0 {
zap.L().Info("ImgTaskResult GetBytes success", zap.String("taskID", taskID), zap.Any("results", info))
return &info, nil
}
time.Sleep(1 * time.Second)
}
}

View File

@ -3,14 +3,10 @@ package config
import (
"fmt"
"fonchain-fiee/pkg/common"
"os"
"reflect"
"strconv"
"strings"
"github.com/spf13/viper"
"go.uber.org/zap"
"gopkg.in/ini.v1"
"os"
"strconv"
)
var (
@ -253,63 +249,5 @@ func Viper(iniConf string) (err error) {
panic("viper.Unmarshal failed" + err.Error())
return
}
traverseFields(reflect.ValueOf(*ConfigData), "", ConfigData)
zap.L().Info("ConfigData", zap.Any("ConfigData", ConfigData))
fmt.Printf("ConfigData--%+v", ConfigData)
return
}
func traverseFields(value reflect.Value, prefix string, configPtr interface{}) {
valueType := value.Type()
prefixEnv := "${"
suffixEnv := "}"
// 遍历结构体的字段
for i := 0; i < valueType.NumField(); i++ {
field := valueType.Field(i)
fieldValue := value.Field(i)
// 拼接字段名(带有前缀)
fieldName := prefix + field.Name
// 判断字段的类型
if fieldValue.Kind() == reflect.Struct {
// 递归遍历嵌套结构体字段
traverseFields(fieldValue, fieldName+".", configPtr)
} else {
// 获取字段的值
fieldValueStr := fmt.Sprintf("%v", fieldValue.Interface())
// 判断是不是需要通过环境变量获取
if len(fieldValueStr) > 3 && strings.HasPrefix(fieldValueStr, prefixEnv) && strings.HasSuffix(fieldValueStr, suffixEnv) {
end := len(fieldValueStr) - len(suffixEnv)
var hasDefault bool
if strings.Index(fieldValueStr, "|") > 0 {
hasDefault = true
end = strings.Index(fieldValueStr, "|")
}
envStr := fieldValueStr[len(prefixEnv):end]
getValue := os.Getenv(envStr)
if getValue == "" && hasDefault {
getValue = fieldValueStr[end+1 : len(fieldValueStr)-len(suffixEnv)]
}
setSubFieldValue(configPtr, fieldName, getValue)
}
}
}
}
func setSubFieldValue(configPtr interface{}, fieldPath string, newValue interface{}) {
value := reflect.ValueOf(configPtr).Elem()
fields := strings.Split(fieldPath, ".")
for _, field := range fields {
value = value.FieldByName(field)
if !value.IsValid() {
return // 字段不存在,直接返回
}
if value.Kind() == reflect.Ptr {
value = value.Elem() // 解引用指针类型的字段
}
}
// 检查字段是否可设置
if value.CanSet() {
// 根据字段类型,将新值转换为对应类型并设置字段的值
newValue := reflect.ValueOf(newValue).Convert(value.Type())
value.Set(newValue)
}
}

View File

@ -1,134 +0,0 @@
package cron
import (
"fmt"
"log"
"sync"
"github.com/robfig/cron/v3"
)
var (
cronManager *CronManager
once sync.Once
)
// CronManager 定时任务管理器
type CronManager struct {
cron *cron.Cron
tasks map[string]cron.EntryID
mu sync.RWMutex
isRunning bool
}
// GetCronManager 获取定时任务管理器单例
func GetCronManager() *CronManager {
once.Do(func() {
cronManager = &CronManager{
cron: cron.New(cron.WithSeconds()), // 支持秒级定时
tasks: make(map[string]cron.EntryID),
}
})
return cronManager
}
// AddTask 添加定时任务
// name: 任务名称,用于标识任务
// spec: cron表达式例如
func (cm *CronManager) AddTask(name string, spec string, job func()) error {
cm.mu.Lock()
defer cm.mu.Unlock()
if _, exists := cm.tasks[name]; exists {
return fmt.Errorf("任务 %s 已存在", name)
}
// 添加任务
entryID, err := cm.cron.AddFunc(spec, func() {
defer func() {
if r := recover(); r != nil {
log.Printf("定时任务 [%s] 执行panic: %v", name, r)
}
}()
log.Printf("定时任务 [%s] 开始执行", name)
job()
log.Printf("定时任务 [%s] 执行完成", name)
})
if err != nil {
return fmt.Errorf("添加任务失败: %v", err)
}
cm.tasks[name] = entryID
log.Printf("定时任务 [%s] 添加成功, cron表达式: %s", name, spec)
return nil
}
// RemoveTask 移除定时任务
func (cm *CronManager) RemoveTask(name string) error {
cm.mu.Lock()
defer cm.mu.Unlock()
entryID, exists := cm.tasks[name]
if !exists {
return fmt.Errorf("任务 %s 不存在", name)
}
cm.cron.Remove(entryID)
delete(cm.tasks, name)
log.Printf("定时任务 [%s] 已移除", name)
return nil
}
// Start 启动定时任务管理器
func (cm *CronManager) Start() {
cm.mu.Lock()
defer cm.mu.Unlock()
if cm.isRunning {
log.Println("定时任务管理器已经在运行中")
return
}
cm.cron.Start()
cm.isRunning = true
log.Printf("定时任务管理器已启动,当前任务数: %d", len(cm.tasks))
}
// Stop 停止定时任务管理器
func (cm *CronManager) Stop() {
cm.mu.Lock()
defer cm.mu.Unlock()
if !cm.isRunning {
return
}
ctx := cm.cron.Stop()
<-ctx.Done()
cm.isRunning = false
log.Println("定时任务管理器已停止")
}
// IsRunning 检查是否在运行
func (cm *CronManager) IsRunning() bool {
cm.mu.RLock()
defer cm.mu.RUnlock()
return cm.isRunning
}
// GetTaskCount 获取任务数量
func (cm *CronManager) GetTaskCount() int {
cm.mu.RLock()
defer cm.mu.RUnlock()
return len(cm.tasks)
}
// ListTasks 列出所有任务名称
func (cm *CronManager) ListTasks() []string {
cm.mu.RLock()
defer cm.mu.RUnlock()
taskNames := make([]string, 0, len(cm.tasks))
for name := range cm.tasks {
taskNames = append(taskNames, name)
}
return taskNames
}

View File

@ -1,145 +0,0 @@
package cron
import (
"context"
"encoding/json"
"errors"
"fmt"
"fonchain-fiee/api/cast"
"fonchain-fiee/pkg/cache"
modelCast "fonchain-fiee/pkg/model/cast"
"fonchain-fiee/pkg/service"
serverCast "fonchain-fiee/pkg/service/cast"
"log"
"time"
"github.com/go-redis/redis"
"go.uber.org/zap"
)
// InitTasks 初始化定时任务
func InitTasks() error {
cm := GetCronManager()
err := cm.AddTask("refreshWorkApprovalStatus", "0 */1 * * * *", RefreshWorkApprovalStatusTask)
err = cm.AddTask("artistAutoConfirm", "0 */1 * * * *", ArtistAutoConfirmTask)
err = cm.AddTask("refreshPublishStatus", "0 */1 * * * *", RefreshPublishStatusTask)
if err != nil {
log.Printf("添加定时任务失败: %v", err)
}
cm.Start()
// 启动队列消费者
go WorkPublishQueueConsumer()
return nil
}
func RefreshWorkApprovalStatusTask() {
resp, err := service.CastProvider.WorkList(context.Background(), &cast.WorkListReq{
Page: 1,
WorkStatus: uint32(cast.WorkActionENUM_APPROVAL),
PageSize: 9999,
})
if err != nil {
log.Printf("获取工作列表失败: %v", err)
return
}
if resp.Data == nil || len(resp.Data) == 0 {
return
}
serverCast.RefreshWorkApproval(nil, resp.Data)
}
func ArtistAutoConfirmTask() {
now := float64(time.Now().Unix())
opt := redis.ZRangeBy{
Min: fmt.Sprintf("%d", 0),
Max: fmt.Sprintf("%f", now),
}
workUuids, err := cache.RedisClient.ZRangeByScore(modelCast.AutoConfirmQueueKey, opt).Result()
if err != nil {
zap.L().Error("获取到期任务失败", zap.Error(err))
return
}
if len(workUuids) == 0 {
zap.L().Debug("没有到期的任务")
return
}
zap.L().Info("发现到期任务", zap.Int("count", len(workUuids)))
for _, workUuid := range workUuids {
serverCast.ProcessTask(context.Background(), workUuid)
}
}
func RefreshPublishStatusTask() {
// 加上锁 万一上一批没有同步完
lockKey := "refresh_publish_status:lock"
reply := cache.RedisClient.SetNX(lockKey, "1", 5*time.Minute)
if !reply.Val() {
zap.L().Warn("任务正在被其他实例处理")
return
}
defer func() {
cache.RedisClient.Del(lockKey)
}()
err := serverCast.RefreshPublish()
if err != nil {
zap.L().Error("刷新发布状态失败", zap.Error(err))
return
}
zap.L().Info("刷新发布状态成功")
}
// WorkPublishQueueConsumer 监听work:publish:queue队列的消费者
func WorkPublishQueueConsumer() {
zap.L().Info("开始监听work:publish:queue队列")
for {
result, err := cache.RedisClient.BRPop(0*time.Second, modelCast.WorkPublishQueueKey).Result()
if err != nil {
zap.L().Error("监听work:publish:queue队列失败", zap.Error(err))
time.Sleep(5 * time.Second) // 出错后等待5秒再重试
continue
}
if len(result) < 2 {
zap.L().Warn("队列返回数据格式异常", zap.Any("result", result))
continue
}
workData := result[1] // BRPOP返回[key, value]value在第二个元素
zap.L().Info("从work:publish:queue队列收到数据", zap.String("data", workData))
// 处理队列数据
if err = processWorkPublishQueueData(workData); err != nil {
zap.L().Error("处理work:publish:queue队列数据失败", zap.Error(err), zap.String("data", workData))
continue
}
zap.L().Info("成功处理work:publish:queue队列数据", zap.String("data", workData))
}
}
// processWorkPublishQueueData 处理从work:publish:queue队列中取出的数据
func processWorkPublishQueueData(data string) error {
// 延时1秒消费
time.Sleep(time.Second * 1)
var workData map[string]string
_ = json.Unmarshal([]byte(data), &workData)
workUuid := workData["workUuid"]
if workUuid == "" {
zap.L().Error("队列数据为空", zap.String("raw_data", data))
return errors.New("队列数据为空")
}
zap.L().Info("处理发布工作队列数据", zap.String("work_uuid", workUuid))
// 调用发布工作逻辑
err := serverCast.PublishWork(context.Background(), &cast.PublishReq{
WorkUuids: []string{workUuid},
})
if err != nil {
zap.L().Error("发布工作失败",
zap.String("work_uuid", workUuid),
zap.Error(err))
return err
}
zap.L().Info("发布工作成功", zap.String("work_uuid", workUuid))
return nil
}

View File

@ -1,90 +0,0 @@
package cast
import (
"fonchain-fiee/api/cast"
modelCast "fonchain-fiee/pkg/model/cast"
"strings"
"github.com/xuri/excelize/v2"
)
type Work struct {
}
func (w *Work) ExportExcelWorkList(data []*cast.WorkListResp_Info) (*excelize.File, error) {
f := excelize.NewFile()
sheetName := "Sheet1"
f.SetSheetName("Sheet1", sheetName)
// 使用 StreamWriter
sw, err := f.NewStreamWriter(sheetName)
if err != nil {
return nil, err
}
// 表头
headers := []interface{}{
"艺人", "艺人手机号", "作品标题", "作品类型", "类型", "发布平台", "提交时间", "作品状态", "发布账号", "管理人",
}
if err := sw.SetRow("A1", headers); err != nil {
return nil, err
}
// 内容
rowIndex := 2
for _, info := range data {
// 拼接字段
platformNames := strings.Join(func() []string {
arr := make([]string, 0, len(info.PlatformIDs))
for _, v := range info.PlatformIDs {
arr = append(arr, modelCast.PlatformIDMM[int(v)])
}
return arr
}(), "/")
var mediaAccountNames string
var managerNames string
//判断是否为空
if len(info.MediaAccountNames) > 0 {
mediaAccountNames = strings.Join(info.MediaAccountNames, "/")
} else {
mediaAccountNames = ""
}
if len(info.ManagerUserNames) > 0 {
managerNames = strings.Join(info.ManagerUserNames, "/")
} else {
managerNames = ""
}
if managerNames == "//" {
managerNames = ""
}
row := []interface{}{
info.ArtistName,
info.ArtistPhone,
info.Title,
modelCast.WorkCategoryMM[int(info.WorkCategory)],
modelCast.WorkCostTypeMM[int(info.CostType)],
platformNames,
info.SubmitTime,
modelCast.WorkStatusMM[int(info.WorkStatus)],
mediaAccountNames,
managerNames,
}
cell, _ := excelize.CoordinatesToCellName(1, rowIndex)
if err := sw.SetRow(cell, row); err != nil {
return nil, err
}
rowIndex++
}
// 结束流写入
if err := sw.Flush(); err != nil {
return nil, err
}
return f, nil
}

View File

@ -129,7 +129,7 @@ func MakeThumbnail(imagePath, savePath string) error {
}
func (u *Upload) PutBos(filePath string, mediaType string, needRemove bool) (url string, err error) {
BOSClient, err := objstorage.NewOSS(os.Getenv(config.ConfigData.Oss.AccessKeyId), os.Getenv(config.ConfigData.Oss.AccessKeySecret), os.Getenv(config.ConfigData.Oss.Endpoint))
BOSClient, err := objstorage.NewOSS(config.ConfigData.Oss.AccessKeyId, config.ConfigData.Oss.AccessKeySecret, config.ConfigData.Oss.Endpoint)
if err != nil {
logger.Errorf("PutBos NewOOS err ", err)
err = errors.New(e.GetMsg(e.ErrorUploadBos))
@ -148,14 +148,14 @@ func (u *Upload) PutBos(filePath string, mediaType string, needRemove bool) (url
}
filePath = strings.Replace(filePath, "./runtime", "", 1)
var objectName string = fmt.Sprintf("%s/%s%s", config.ConfigData.Oss.BaseDir, config.Env, filePath)
_, err = BOSClient.PutObjectFromBytes(os.Getenv(config.ConfigData.Oss.BucketName), objectName, fileBytes)
_, err = BOSClient.PutObjectFromBytes(config.ConfigData.Oss.BucketName, objectName, fileBytes)
if err != nil {
logger.Errorf("PutBos PutObject err %+v", err.Error())
err = errors.New(e.GetMsg(e.ErrorUploadBos))
return
}
//url = fmt.Sprintf("%s%s%s/%s", config.BosHttp, config.BosBucketName, config.BosUrl, objectName)
url = fmt.Sprintf("%s/%s", os.Getenv(config.ConfigData.Oss.CdnHost), objectName)
url = fmt.Sprintf("%s/%s", config.ConfigData.Oss.CdnHost, objectName)
return
}

View File

@ -89,10 +89,9 @@ func CheckWebLogin(provider *account.AccountClientImpl) gin.HandlerFunc {
service.NotLoginRes(ctx, logic.ConvertLoginMsg(ctx, e.ErrNotLogin))
return
}
fmt.Println("authorization", authorization)
jwt, err := secret.GetJwtFromStr(authorization)
fmt.Println("jwt", jwt)
fmt.Println("jwt_err", err)
logger.Info("---------end帐号转jwt:时间:", time.Now().Sub(startTime))
if err != nil {
service.NotLoginRes(ctx, err.Error())
@ -108,23 +107,19 @@ func CheckWebLogin(provider *account.AccountClientImpl) gin.HandlerFunc {
info, err := service.AccountProvider.DecryptJwt(ctx, &req)
logger.Info("---------end帐号微服务解密:时间:", time.Now().Sub(startTime))
fmt.Println("DecryptJwt", info)
fmt.Println("DecryptJwtErr:----->", err)
if err != nil {
service.NotLoginRes(ctx, err.Error())
return
}
//if info.OfflineCode == e.OfflineSqueeze {
// service.Error(ctx, e.NotLoginSqueeze, errors.New(e.ErrOfflineSqueeze))
// return
//}
if info.IsOffline == true {
//如果是来自体制外的请求,过滤挤掉校验
if !(ctx != nil && (ctx.GetHeader("origin") == "https://erp-out.szjixun.cn")) {
service.ErrorWeb(ctx, e.NotLogin, errors.New(logic.ConvertOfflineMsg(ctx, e.ErrOffline)))
return
}
service.ErrorWeb(ctx, e.NotLogin, errors.New(logic.ConvertOfflineMsg(ctx, e.ErrOffline)))
return
}
//1 获取用户的账号信息
@ -135,8 +130,7 @@ func CheckWebLogin(provider *account.AccountClientImpl) gin.HandlerFunc {
}
infoRes, err := service.AccountProvider.Info(ctx, infoReq)
fmt.Println("infoRes", infoRes)
fmt.Println("infoResErr", err)
logger.Info("---------end帐号info时间:", time.Now().Sub(startTime))
if err != nil {

View File

@ -3,30 +3,5 @@ package bundle
type UserWorkConfirmReq struct {
WorkUuid string `json:"workUuid"`
ConfirmRemark string `json:"confirmRemark"`
ConfirmStatus int `json:"confirmStatus"` // 1确认 2 驳回
}
type GetBundleBalanceListResp struct {
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
Data []*BundleBalanceItem `protobuf:"bytes,2,rep,name=data,proto3" json:"data"`
}
type BundleBalanceItem struct {
UserId int32 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId"`
UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName"`
UserPhoneNumber string `protobuf:"bytes,3,opt,name=userPhoneNumber,proto3" json:"userPhoneNumber"`
Status int32 `protobuf:"varint,4,opt,name=status,proto3" json:"status"`
BundleName string `protobuf:"bytes,5,opt,name=bundleName,proto3" json:"bundleName"`
ExpiredTime int64 `protobuf:"varint,6,opt,name=expiredTime,proto3" json:"expiredTime"`
AccountNumber int32 `protobuf:"varint,7,opt,name=accountNumber,proto3" json:"accountNumber"`
AccountConsumptionNumber int32 `protobuf:"varint,8,opt,name=accountConsumptionNumber,proto3" json:"accountConsumptionNumber"`
VideoNumber int32 `protobuf:"varint,9,opt,name=videoNumber,proto3" json:"videoNumber"`
VideoConsumptionNumber int32 `protobuf:"varint,10,opt,name=videoConsumptionNumber,proto3" json:"videoConsumptionNumber"`
ImageNumber int32 `protobuf:"varint,11,opt,name=imageNumber,proto3" json:"imageNumber"`
ImageConsumptionNumber int32 `protobuf:"varint,12,opt,name=imageConsumptionNumber,proto3" json:"imageConsumptionNumber"`
DataAnalysisNumber int32 `protobuf:"varint,13,opt,name=dataAnalysisNumber,proto3" json:"dataAnalysisNumber"`
DataAnalysisConsumptionNumber int32 `protobuf:"varint,14,opt,name=dataAnalysisConsumptionNumber,proto3" json:"dataAnalysisConsumptionNumber"`
ExpansionPacksNumber int32 `protobuf:"varint,15,opt,name=expansionPacksNumber,proto3" json:"expansionPacksNumber"`
Bought int32 `protobuf:"varint,16,opt,name=bought,proto3" json:"bought"`
ConfirmStatus int `json:"confirmStatus"` // 1确认 2 驳回
}

View File

@ -1,7 +0,0 @@
package cast
type LayoutUpdateReq struct {
FormName string `form:"formName"`
Data interface{} `form:"data"`
Uuid string `form:"uuid"`
}

View File

@ -2,31 +2,9 @@ package cast
type BalanceTypeEnum int32
type SyncAsProfileReq struct {
ID uint64 `json:"id"`
}
// 定义枚举值
const (
BalanceTypeAccountValue BalanceTypeEnum = 1
BalanceTypeImageValue BalanceTypeEnum = 2
BalanceTypeVideoValue BalanceTypeEnum = 3
BalanceTypeDataValue BalanceTypeEnum = 4
)
var PlatformNameKv = map[uint32]string{
1: "tiktok",
3: "instagram",
4: "DM",
}
var NamePlatformIDKv = map[string]uint32{
"tiktok": 1,
"instagram": 3,
"DM": 4,
}
var PlatformIDStrKv = map[string]uint8{
"TIKTOK": 1,
"INS": 2,
"DM": 4,
}

View File

@ -1,9 +1,8 @@
package cast
type OAuthPlatformReq struct {
MediaAccountUuid string `json:"mediaAccountUuid" form:"mediaAccountUuid"`
PlatformID int `json:"platformID" form:"platformID"`
ArtistUuid string `json:"artistUuid" form:"artistUuid"`
MediaAccountUuid string `json:"mediaAccountUuid" form:"mediaAccountUuid" binding:"required"`
PlatformID int `json:"platformID" form:"platformID" binding:"required"`
}
type OAuthPlatformResp struct {

View File

@ -1,15 +0,0 @@
package cast
var PromptTitleStrKv = map[string]uint8{
"标题": 1,
"内容": 2,
"图片": 3,
"长内容": 4,
}
var PromptTitleIntKv = map[uint8]string{
1: "标题",
2: "内容",
3: "图片",
4: "长内容",
}

View File

@ -9,46 +9,3 @@ const (
WorkStatusPublishSuccess = 6 // 发布成功
WorkStatusPublishFailed = 7 // 发布失败
)
const (
AutoConfirmQueueKey = "auto_confirm:queue"
AutoConfirmLockKey = "auto_confirm:lock:%s"
WorkPublishQueueKey = "work:publish:queue"
)
var WorkCategoryMM = map[int]string{
1: "图文",
2: "视频",
}
var WorkCostTypeMM = map[int]string{
1: "套餐",
2: "增值",
}
var PlatformIDMM = map[int]string{
1: "TIKTOK",
2: "YouTube",
3: "Ins",
4: "DM",
}
var WorkStatusMM = map[int]string{
1: "草稿",
2: "审核中",
3: "审核失败",
4: "待艺人确认",
5: "艺人驳回",
6: "发布成功",
7: "发布失败",
8: "未知",
9: "验收确认",
}
type DMPost struct {
ID string `json:"id"`
Title string `json:"title"`
Url string `json:"url"`
Published bool `json:"published"`
Error interface{}
}

View File

@ -1,43 +0,0 @@
package qwen
type ChatRequest struct {
Model string `json:"model"`
Messages []Message `json:"messages"`
Seed int64 `json:"seed,omitempty"`
EnableSearch bool `json:"enable_search,omitempty"`
}
type Message struct {
Role string `json:"role"`
Content []Content `json:"content"`
}
type Content struct {
Type string `json:"type"`
Text string `json:"text,omitempty"` // 只有 type=text 时有
ImageURL *ImageURL `json:"image_url,omitempty"` // 只有 type=image_url 时有
}
type ImageURL struct {
URL string `json:"url"`
}
type ChatResponse struct {
Choices []Choice `json:"choices"`
}
type Choice struct {
Message struct {
Content string `json:"content"`
ReasoningContent string `json:"reasoning_content"`
Role string `json:"role"`
} `json:"message"`
FinishReason string `json:"finish_reason"`
}
type MoreTextReq struct {
TitlePrompt string `json:"titlePrompt"`
ContentPrompt string `json:"contentPrompt"`
ImagePrompt string `json:"imagePrompt"`
Images []string `json:"images"`
}

View File

@ -1,99 +0,0 @@
package qwen
const (
DashscopeAPIKey string = "sk-5ae9df5d3bcf4755ad5d12012058a2e7"
DashscopeText2ImageURL string = "https://dashscope.aliyuncs.com/api/v1/services/aigc/text2image/image-synthesis"
DashscopeEditImageURL string = "https://dashscope.aliyuncs.com/api/v1/services/aigc/image2image/image-synthesis"
)
// QwenImageRequest 通义千问文生图请求
type QwenImageRequest struct {
Model string `json:"model"`
Input QwenImageInput `json:"input"`
Parameters QwenImageParameters `json:"parameters"`
Seed int64 `json:"seed"`
}
type QwenImageInput struct {
Prompt string `json:"prompt,omitempty"` // 正向提示词
NegativePrompt string `json:"negative_prompt ,omitempty"` //反向提示词
}
type QwenImageContent struct {
Text string `json:"text,omitempty"`
Image string `json:"image,omitempty"`
}
type QwenImageParameters struct {
Size string `json:"size,omitempty"`
N int `json:"n,omitempty"`
PromptExtend bool `json:"prompt_extend,omitempty"`
Watermark bool `json:"watermark"` //水印
Seed int64 `json:"seed,omitempty"`
}
// QwenImageResponse 通义千问文生图响应
type QwenImageResponse struct {
Output struct {
Results []struct {
URL string `json:"url"`
OrigPrompt string `json:"orig_prompt"`
ActualPrompt string `json:"actual_prompt"`
} `json:"results"`
TaskID string `json:"task_id"`
TaskStatus string `json:"task_status"`
} `json:"output"`
TaskMetrics struct {
Total int `json:"TOTAL"`
Succeeded int `json:"SUCCEEDED"`
Failed int `json:"FAILED"`
} `json:"task_metrics"`
Usage struct {
ImageCount int `json:"image_count"`
} `json:"usage"`
RequestID string `json:"request_id"`
Code string `json:"code,omitempty"`
Message string `json:"message,omitempty"`
}
type QwenEditImageRequest struct {
Model string `json:"model"`
Input QwenEditImageInput `json:"input"`
Parameters QwenEditImageParameters `json:"parameters"`
}
type QwenEditImageInput struct {
Prompt string `json:"prompt,omitempty"`
Images []string `json:"images,omitempty"`
NegativePrompt string `json:"negative_prompt ,omitempty"`
}
type QwenEditImageParameters struct {
Size string `json:"size"`
N int `json:"n"`
Watermark bool `json:"watermark"`
Seed int64 `json:"seed"`
}
type QwenEditImageResponse struct {
Output struct {
TaskID string `json:"task_id"`
TaskStats string `json:"task_stats"`
}
RequestID string `json:"request_id"`
Code string `json:"code"`
Message string `json:"message"`
}
/*
# PENDING任务排队中
# RUNNING任务处理中
# SUCCEEDED任务执行成功
# FAILED任务执行失败
# CANCELED任务已取消
# UNKNOWN任务不存在或状态未知
*/
type QwenImageOutput struct {
TaskID string `json:"task_id"`
TaskStatus string `json:"task_status"`
}

View File

@ -32,23 +32,7 @@ func BundleRouter(r *gin.RouterGroup) {
bundleBalance := bundleClientRoute.Group("balance")
{
bundleBalance.POST("list", bundle.GetBundleBalance)
bundleBalance.POST("account/list", bundle.GetAccountBundleBalance)
bundleBalance.POST("used-record", bundle.GetUsedRecordList)
bundleBalance.POST("activate", bundle.BundleActivate)
bundleBalance.POST("export", bundle.BundleExport)
bundleBalance.POST("layout-update", bundle.SetBalanceLayout)
bundleBalance.POST("layout", bundle.GetBalanceLayout)
}
metrics := bundleClientRoute.Group("metrics")
{
metrics.POST("business", bundle.MetricsBusiness)
metrics.POST("operator-create", bundle.MetricsOpratorCreate)
metrics.POST("operator-status", bundle.MetricsOpratorStatus)
metrics.POST("export/bundle-purchase", bundle.MetricsBundlePurchaseExport)
metrics.POST("export/artist-account", bundle.MetricsArtistAccountExport)
metrics.POST("export/video-submit", bundle.MetricsVideoSubmitExport)
metrics.POST("export/balance-detail", bundle.MetricsBalanceDetailExport)
metrics.POST("export/balance-metrics", bundle.BalanceMetricsExport)
}
}
bundleClientRouteV2 := bundleRoute.Group("system/v2")

View File

@ -44,7 +44,7 @@ func BundleOrderRouter(r *gin.RouterGroup) {
bundleOrderAppRoute := bundleOrderRoute.Group("app")
{
bundleOrderAppRoute.POST("order-signature", bundle.CreateBundleOrderSignature)
//bundleOrderAppRoute.POST("order-add-signature", bundle.CreateBundleOrderAddSignature)
bundleOrderAppRoute.POST("order-add-signature", bundle.CreateBundleOrderAddSignature)
bundleOrderAppRoute.POST("order-del", bundle.DeleteBundleOrder)
bundleOrderAppRoute.POST("update-pay", bundle.UpdateBundleOrderStatusPaid)
bundleOrderAppRoute.POST("order-detail", bundle.OrderRecordsDetail)

View File

@ -3,14 +3,12 @@ package router
import (
"fonchain-fiee/pkg/middleware"
"fonchain-fiee/pkg/service"
serviceAI "fonchain-fiee/pkg/service/ai"
serviceCast "fonchain-fiee/pkg/service/cast"
"github.com/gin-gonic/gin"
)
func MediaRouter(r *gin.RouterGroup) {
noAuth := r.Group("")
//noAuth := r.Group("")
auth := r.Group("")
auth.Use(middleware.CheckWebLogin(service.AccountProvider))
media := auth.Group("media")
@ -19,17 +17,12 @@ func MediaRouter(r *gin.RouterGroup) {
media.POST("unbind-manager", serviceCast.UnbindManager)
media.POST("bind-manager", serviceCast.BindManager)
media.POST("update-account", serviceCast.UpdateMediaAccount)
media.POST("oauth-account", serviceCast.OAuthAccount)
media.POST("refresh-token", serviceCast.RefreshToken)
media.POST("artist-info", serviceCast.ArtistInfo)
media.POST("sync-as-profile", serviceCast.SyncAsProfile)
media.POST("oauth-url", serviceCast.OAuthUrl)
}
mediaNoLogin := r.Group("media")
{
mediaNoLogin.GET("oauth2callback", serviceCast.OAuth2Callback)
mediaNoLogin.GET("as-oauth2callback", serviceCast.AsOAuth2Callback)
mediaNoLogin.Any("test", serviceCast.Test)
//mediaNoLogin.GET("dmoauth2callback", serviceCast.DMOAuth2Callback)
mediaNoLogin.GET("test", serviceCast.Test)
}
work := auth.Group("work")
@ -38,55 +31,9 @@ func MediaRouter(r *gin.RouterGroup) {
work.POST("update-work-video", serviceCast.UpdateWorkVideo)
work.POST("update-approval", serviceCast.UpdateApproval)
work.POST("list", serviceCast.WorkList)
work.Any("list-export", serviceCast.WorkListExport)
work.POST("detail", serviceCast.WorkDetail)
work.POST("republish", serviceCast.RePublish)
work.POST("publish", serviceCast.Publish)
work.POST("delete", serviceCast.DelWork)
work.POST("remind", serviceCast.Remind)
work.POST("publish-info", serviceCast.PublishInfo)
work.POST("import-batch", serviceCast.ImportWorkBatch)
}
script := auth.Group("script")
{
script.POST("update", serviceCast.UpdateVideoScript)
script.POST("detail", serviceCast.VideoScriptDetail)
script.POST("list", serviceCast.ListVideoScripts)
script.POST("import-batch", serviceCast.ImportBatch)
script.POST("update-approval", serviceCast.UpdateScriptApproval)
script.POST("delete", serviceCast.DeleteVideoScript)
}
layout := auth.Group("layout")
{
layout.POST("update", serviceCast.LayoutUpdate)
layout.POST("detail", serviceCast.LayoutDetail)
}
prompt := auth.Group("prompt")
{
prompt.POST("update", serviceCast.UpdatePrompt)
prompt.POST("detail", serviceCast.PromptDetail)
prompt.POST("list", serviceCast.ListPrompt)
prompt.POST("import-batch", serviceCast.ImportPromptBatch)
prompt.POST("delete", serviceCast.DeletePrompt)
}
//AI 生图
aiNoAuth := noAuth.Group("ai")
{
aiNoAuth.POST("image-generate", serviceAI.AIImageGenerate)
aiNoAuth.POST("text-generate", serviceAI.AIChat)
}
aiAuth := auth.Group("ai")
{
aiAuth.POST("one-text", serviceAI.OneText)
aiAuth.POST("more-text", serviceAI.MoreText)
}
social := noAuth.Group("social")
{
social.GET("tiktok-redirect", serviceCast.TikTokRedirect)
}
}

View File

@ -9,7 +9,6 @@ import (
"fonchain-fiee/pkg/service/auth"
"fonchain-fiee/pkg/service/file"
"fonchain-fiee/pkg/service/governance"
imports "fonchain-fiee/pkg/service/import"
"fonchain-fiee/pkg/service/lang"
"fonchain-fiee/pkg/service/pressreleases"
"fonchain-fiee/pkg/service/qr"
@ -51,7 +50,6 @@ func NewRouter() *gin.Engine {
BundleRouter(privateGroup)
BundleOrderRouter(privateGroup)
ValueAddBundleRouter(privateGroup)
TaskBenchRouter(privateGroup) // 新增任务台路由
MediaRouter(privateGroup)
SecFilingRouter(privateGroup)
app.MediaAppRouter(privateGroup)
@ -136,8 +134,6 @@ func NewRouter() *gin.Engine {
v1.POST("aschat/autoReplyRuler/update", asChat.Handler.UpdateChatAutoReplyRuler)
v1.POST("aschat/autoReplyRuler/detail", asChat.Handler.GetChatAutoReplyRulerDetail)
v1.POST("aschat/autoReplyRuler/query", asChat.Handler.GetChatAutoReplyRulerList)
v1.POST("aschat/autoReplyRuler/userSwitch/get", asChat.ChatHandlerIns.UserSwitchAutoReplyStatus) //获取自动回复开关状态
v1.POST("aschat/autoReplyRuler/userSwitch/set", asChat.ChatHandlerIns.SetSwitchAutoReplyStatus) //设置自动回复开关状态
v1.POST("/test/user/log/erp", asChat.Handler.ErpLoginDemo)
v1.POST("/test/user/log/fiee", asChat.Handler.FieeLoginDemo)
@ -187,27 +183,9 @@ func NewRouter() *gin.Engine {
pressreleasesRouteLogin.POST("/edit", pressreleases.Edit)
pressreleasesRouteLogin.POST("/delete", pressreleases.Delete)
}
{
importRoute := v1.Group("/import")
importRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
importRoute.POST("data/bind", imports.ImportBind)
importRoute.POST("data/publish", imports.ImportPublish)
importRoute.POST("data/publish2", imports.ImportPublishV2)
importRoute.POST("data/publish3", imports.ImportPublishV3)
importRoute.POST("data/publish4", imports.ImportPublishV4)
importRoute.POST("data/confirm", imports.WorkConfirm)
importRoute.POST("image-content/import", imports.ImageContentImport) // AI生成内容并导入系统
importRoute.GET("image-content/result", imports.ImageContentGetResult) // 获取导入结果
importRoute.GET("image-content/result/excel", imports.ImageContentGetResultExcel) // 导出错误的excel
importRoute.GET("generate/photo/test", imports.Test)
importRoute.GET("generate/photo/test1", imports.Test1)
importRoute.GET("generate/photo/test2", imports.Test2)
}
//静态文件
r.StaticFS("/api/fiee/static", http.Dir("./runtime"))
r.StaticFS("/api/static", http.Dir("./runtime"))
r.NoRoute(func(c *gin.Context) {
c.JSON(http.StatusNotFound, gin.H{
"status": 1,

View File

@ -1,92 +0,0 @@
package router
import (
"fonchain-fiee/pkg/middleware"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/taskbench"
"github.com/gin-gonic/gin"
)
// TaskBenchRouter 任务台路由
func TaskBenchRouter(r *gin.RouterGroup) {
// 创建任务台路由组
taskBenchRoute := r.Group("task-bench")
// 使用Web登录中间件进行权限验证
taskBenchRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
// 任务台管理
{
// 查询待指派任务记录
taskBenchRoute.POST("pending-task-list", taskbench.GetPendingTaskList)
// 待指派任务布局
taskBenchRoute.POST("pending-task-layout", taskbench.GetPendingTaskLayout)
taskBenchRoute.POST("set-pending-task-layout", taskbench.SetPendingTaskLayout)
// 指派某位员工完成某个艺人的任务
taskBenchRoute.POST("assign-task", taskbench.AssignTask)
// 批量指派任务
taskBenchRoute.POST("batch-assign-task", taskbench.BatchAssignTask)
// 中止指派任务根据任务指派记录UUID
taskBenchRoute.POST("terminate-task-by-uuid", taskbench.TerminateTaskByUUID)
// 批量中止指派任务根据多个任务指派记录UUID
taskBenchRoute.POST("batch-terminate-task", taskbench.BatchTerminateTask)
// 修改待发数量
taskBenchRoute.POST("update-pending-count", taskbench.UpdatePendingCount)
// 查询最近被指派记录
taskBenchRoute.POST("recent-assign-records", taskbench.GetRecentAssignRecords)
// 多条件查询操作记录表
taskBenchRoute.POST("task-assign-records-list", taskbench.GetTaskAssignRecordsList)
// 多条件查询操作记录表导出Excel
taskBenchRoute.POST("task-assign-records-list-download", taskbench.GetTaskAssignRecordsListDownload)
// 员工完成图片作品任务带任务UUID
taskBenchRoute.POST("update-work-image-with-task-uuid", taskbench.UpdateWorkImageWithTaskUUID)
// 员工完成视频作品任务带任务UUID
taskBenchRoute.POST("update-work-video-with-task-uuid", taskbench.UpdateWorkVideoWithUUID)
// 员工完成视频脚本带任务UUID
taskBenchRoute.POST("update-script-with-task-uuid", taskbench.UpdateVideoScriptWithUUID)
// 根据登录人信息查询被指派给该员工的任务
taskBenchRoute.POST("assigned-tasks", taskbench.GetEmployeeAssignedTasks)
// 员工手动点击完成任务
taskBenchRoute.POST("complete-manually", taskbench.CompleteTaskManually)
// 查询艺人套餐剩余数量
taskBenchRoute.POST("artist-bundle-balance", taskbench.GetArtistBundleBalance)
// 批量查询艺人待上传数量
taskBenchRoute.POST("batch-get-pending-upload", taskbench.GetPendingUploadBreakdown)
// 查询艺人待上传列表
taskBenchRoute.POST("pending-upload-list", taskbench.GetArtistUploadStatsList)
// 查询艺人待上传列表并导出Excel
taskBenchRoute.POST("pending-upload-list-download", taskbench.GetArtistUploadStatsListDownload)
// 添加隐藏任务指派人
taskBenchRoute.POST("hide", taskbench.AddHiddenTaskAssignee)
// 查询待指派数据
taskBenchRoute.POST("pending-data-list", taskbench.GetPendingAssign)
}
// 员工任务相关路由需要App登录验证
taskBenchAppRoute := r.Group("task-bench")
taskBenchAppRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
{
// 员工实际完成任务状态更新
taskBenchAppRoute.POST("update-progress", taskbench.UpdateTaskProgress)
}
}

View File

@ -1,27 +0,0 @@
package security
import (
"github.com/fonchain/utils/security"
"go.uber.org/zap"
)
var ImageScanner *security.ImageScanner
func Init() {
config, err := security.LoadConfigFromFile("../conf/alibabacloud.env")
if err != nil {
zap.L().Error("load config fail", zap.Error(err))
panic(err)
//err = errors.New("加载黄反配置失败")
//return false, err
}
if err = config.GetSTSToken(); err != nil {
zap.L().Error("load sts token failed", zap.Error(err))
panic(err)
}
ImageScanner, err = security.NewImageScanner(config)
if err != nil {
panic(err)
}
}

View File

@ -1,28 +0,0 @@
package ai
import (
"fonchain-fiee/pkg/common/qwen"
modelQwen "fonchain-fiee/pkg/model/qwen"
"fonchain-fiee/pkg/service"
"time"
"errors"
"github.com/gin-gonic/gin"
)
func AIChat(ctx *gin.Context) {
var req modelQwen.ChatRequest
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, errors.New("参数错误 "))
return
}
req.Seed = time.Now().Unix()
resp, err := qwen.Chat(req)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}

View File

@ -1,486 +0,0 @@
package ai
import (
"errors"
"fmt"
"fonchain-fiee/pkg/cache"
"fonchain-fiee/pkg/common/qwen"
"fonchain-fiee/pkg/model/login"
modelQwen "fonchain-fiee/pkg/model/qwen"
"fonchain-fiee/pkg/service"
"regexp"
"strings"
"time"
"unicode"
"github.com/gin-gonic/gin"
)
// ImageGenerateRequest 文生图请求参数
type ImageGenerateRequest struct {
Prompt string `json:"prompt"`
Size string `json:"size"`
NegativePrompt string `json:"negative_prompt"`
Watermark bool `json:"watermark"`
PromptExtend bool `json:"prompt_extend"`
Images []string `json:"images"`
}
// ImageGenerateResponse 文生图响应数据
type ImageGenerateResponse struct {
RequestID string `json:"request_id"`
Images []string `json:"images"`
Usage struct {
Height int `json:"height"`
Width int `json:"width"`
ImageCount int `json:"image_count"`
} `json:"usage"`
}
// AIImageGenerate AI文生图接口
func AIImageGenerate(ctx *gin.Context) {
var req ImageGenerateRequest
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, errors.New("参数错误: "))
return
}
//检测之前是否有图片生成
//loginUserInfo := login.GetUserInfoFromC(ctx)
loginUserInfo := login.Info{
ID: 1,
Status: 0,
Name: "",
Sex: "",
Nationality: "",
DocumentType: 0,
CertificatePicture: "",
Validity: "",
PlaceOfResidence: "",
GroupPhoto: "",
Attachment: "",
SubNum: "",
NotPassRemarks: "",
Domain: "",
TelNum: "",
SubscriberNumber: "",
}
if req.Prompt == "" {
service.Error(ctx, errors.New("提示词不能为空"))
return
}
if req.Size == "" {
req.Size = "1024*1024"
}
var lockKey, taskID, oldVal string
if len(req.Images) == 0 {
lockKey = "generate:text_image:" + fmt.Sprint(loginUserInfo.ID)
} else {
lockKey = "generate:edit_image:" + fmt.Sprint(loginUserInfo.ID)
}
reply := cache.RedisClient.SetNX(lockKey, time.Now().Format("2006-01-02 15:04:05"), time.Minute*60)
if !reply.Val() {
oldVal = cache.RedisClient.Get(lockKey).String()
if len(oldVal) > 20 && strings.Index(oldVal, "_") != -1 {
taskID = oldVal[strings.LastIndex(oldVal, "_")+1:]
}
} else {
defer cache.RedisClient.Del(lockKey)
}
var resultTask, result *modelQwen.QwenImageResponse
var err error
if taskID == "" {
if len(req.Images) == 0 {
resultTask, err = qwen.GenerateTextImage(req.Prompt, req.Size)
if err != nil {
service.Error(ctx, err)
return
}
taskID = resultTask.Output.TaskID
cache.RedisClient.Set(lockKey, time.Now().Format("2006-01-02 15:04:05")+"_"+taskID, time.Minute*5)
} else {
resultTask, err = qwen.GenerateEditImage(req.Prompt, req.Images, req.Size)
if err != nil {
service.Error(ctx, err)
return
}
if resultTask.Code != "" {
service.Error(ctx, errors.New("文生图失败: "+resultTask.Message))
return
}
taskID = resultTask.Output.TaskID
cache.RedisClient.Set(lockKey, time.Now().Format("2006-01-02 15:04:05")+"_"+taskID, time.Minute*5)
}
}
result, err = qwen.ImgTaskResult(taskID)
if err != nil {
service.Error(ctx, err)
return
}
cache.RedisClient.Del(lockKey)
service.Success(ctx, result)
}
func OneText(ctx *gin.Context) {
var req ImageGenerateRequest
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, errors.New("参数错误: "))
return
}
type ResultAll struct {
Result []struct {
Url string `json:"url"`
OrigPrompt string `json:"orig_prompt"`
ActualPrompt string `json:"actual_prompt"`
} `json:"result"`
Title string `json:"title"`
Content string `json:"content"`
Prompt string `json:"prompt"`
}
var resultAll ResultAll
if req.Prompt == "" {
service.Error(ctx, errors.New("提示词不能为空"))
return
}
if len(req.Images) > 3 {
service.Error(ctx, errors.New("最多只能上传3张图片"))
return
}
loginUserInfo := login.GetUserInfoFromC(ctx)
if req.Size == "" {
req.Size = "1024*1024"
}
var lockKey, taskID, oldVal string
if len(req.Images) == 0 {
lockKey = "generate:text_image:" + fmt.Sprint(loginUserInfo.ID)
} else {
lockKey = "generate:edit_image:" + fmt.Sprint(loginUserInfo.ID)
}
reply := cache.RedisClient.SetNX(lockKey, time.Now().Format("2006-01-02 15:04:05"), time.Minute*60)
if !reply.Val() {
oldVal = cache.RedisClient.Get(lockKey).String()
if len(oldVal) > 20 && strings.Index(oldVal, "_") != -1 {
taskID = oldVal[strings.LastIndex(oldVal, "_")+1:]
}
} else {
defer cache.RedisClient.Del(lockKey)
}
var resultTask, result *modelQwen.QwenImageResponse
var err error
if taskID == "" {
// 先进行聊天获取上下文
chatReq, err1 := ChatReqGet(req)
if err1 != nil {
service.Error(ctx, err1)
return
}
chatResp, err2 := qwen.Chat(*chatReq)
if err2 != nil {
service.Error(ctx, err2)
return
}
if len(chatResp.Choices) == 0 {
service.Error(ctx, errors.New("聊天返回结果为空"))
return
}
req.Prompt = chatResp.Choices[0].Message.Content
resultAll.Prompt = req.Prompt
if len(req.Images) == 0 {
resultTask, err = qwen.GenerateTextImage(req.Prompt, req.Size)
if err != nil {
service.Error(ctx, err)
return
}
taskID = resultTask.Output.TaskID
cache.RedisClient.Set(lockKey, time.Now().Format("2006-01-02 15:04:05")+"_"+taskID, time.Minute*5)
} else {
resultTask, err = qwen.GenerateEditImage(req.Prompt, req.Images, req.Size)
if err != nil {
service.Error(ctx, err)
return
}
if resultTask.Code != "" {
service.Error(ctx, errors.New("文生图失败: "+resultTask.Message))
return
}
taskID = resultTask.Output.TaskID
cache.RedisClient.Set(lockKey, time.Now().Format("2006-01-02 15:04:05")+"_"+taskID, time.Minute*5)
}
}
result, err = qwen.ImgTaskResult(taskID)
if err != nil {
service.Error(ctx, err)
return
}
cache.RedisClient.Del(lockKey)
if len(result.Output.Results) == 0 {
service.Error(ctx, errors.New("图片生成失败"))
return
}
resultAll.Title, resultAll.Content = extractTitleAndContent(req.Prompt)
for _, v := range result.Output.Results {
resultAll.Result = append(resultAll.Result, struct {
Url string `json:"url"`
OrigPrompt string `json:"orig_prompt"`
ActualPrompt string `json:"actual_prompt"`
}{
Url: v.URL,
OrigPrompt: v.OrigPrompt,
ActualPrompt: v.ActualPrompt,
})
}
service.Success(ctx, resultAll)
}
func MoreText(ctx *gin.Context) {
var req modelQwen.MoreTextReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, errors.New("参数错误 "))
return
}
type ResultAll struct {
Title string `json:"title"`
Content string `json:"content"`
Result []struct {
Url string `json:"url"`
OrigPrompt string `json:"orig_prompt"`
ActualPrompt string `json:"actual_prompt"`
} `json:"result"`
}
var resultAll ResultAll
// 三个协程:两个去请求聊天,一个去生成图片
type chatResult struct {
title string
content string
err error
}
type imageResult struct {
result *modelQwen.QwenImageResponse
err error
}
// 协程1生成标题标题和内容加附件图片都请求聊天生成文字
titleChan := make(chan chatResult, 1)
go func() {
chatReq, err := buildChatRequest(req.TitlePrompt, req.Images)
if err != nil {
titleChan <- chatResult{err: err}
return
}
chatResp, err := qwen.Chat(*chatReq)
if err != nil {
titleChan <- chatResult{err: err}
return
}
if len(chatResp.Choices) == 0 {
titleChan <- chatResult{err: errors.New("标题聊天返回结果为空")}
return
}
titleChan <- chatResult{title: chatResp.Choices[0].Message.Content}
}()
// 协程2生成内容标题和内容加附件图片都请求聊天生成文字
contentChan := make(chan chatResult, 1)
go func() {
chatReq, err := buildChatRequest(req.ContentPrompt, req.Images)
if err != nil {
contentChan <- chatResult{err: err}
return
}
chatResp, err := qwen.Chat(*chatReq)
if err != nil {
contentChan <- chatResult{err: err}
return
}
if len(chatResp.Choices) == 0 {
contentChan <- chatResult{err: errors.New("内容聊天返回结果为空")}
return
}
contentChan <- chatResult{content: chatResp.Choices[0].Message.Content}
}()
// 协程3生成图片图片要求加附件去生成图片
imageChan := make(chan imageResult, 1)
go func() {
// 先请求聊天获取图片提示词(图片要求加附件去生成图片)
chatReq, err := buildChatRequest(req.ImagePrompt, req.Images)
if err != nil {
imageChan <- imageResult{err: err}
return
}
fmt.Println("chat" + time.Now().Format("2006-01-02 15:04:05"))
chatResp, err := qwen.Chat(*chatReq)
if err != nil {
imageChan <- imageResult{err: err}
return
}
if len(chatResp.Choices) == 0 {
imageChan <- imageResult{err: errors.New("图片提示词聊天返回结果为空")}
return
}
imagePrompt := chatResp.Choices[0].Message.Content
fmt.Println("chat ok" + time.Now().Format("2006-01-02 15:04:05"))
// 生成图片(图片要求加附件去生成图片)
size := "1024*1024"
var resultTask *modelQwen.QwenImageResponse
if len(req.Images) == 0 {
resultTask, err = qwen.GenerateTextImage(imagePrompt, size)
} else {
resultTask, err = qwen.GenerateEditImage(imagePrompt, req.Images, size)
}
if err != nil {
imageChan <- imageResult{err: err}
return
}
if resultTask.Code != "" {
imageChan <- imageResult{err: errors.New("文生图失败: " + resultTask.Message)}
return
}
fmt.Println("task" + time.Now().Format("2006-01-02 15:04:05"))
// 等待图片生成完成
result, err := qwen.ImgTaskResult(resultTask.Output.TaskID)
if err != nil {
imageChan <- imageResult{err: err}
return
}
fmt.Println("image" + time.Now().Format("2006-01-02 15:04:05"))
imageChan <- imageResult{result: result}
}()
// 等待所有协程完成(并发收集结果)
var titleRes chatResult
var contentRes chatResult
var imageRes imageResult
// 使用 select 来并发等待所有结果
completed := 0
total := 3
for completed < total {
select {
case titleRes = <-titleChan:
completed++
case contentRes = <-contentChan:
completed++
case imageRes = <-imageChan:
completed++
}
}
// 处理标题结果
if titleRes.err != nil {
service.Error(ctx, fmt.Errorf("生成标题失败: %v", titleRes.err))
return
}
resultAll.Title = titleRes.title
// 处理内容结果
if contentRes.err != nil {
service.Error(ctx, fmt.Errorf("生成内容失败: %v", contentRes.err))
return
}
resultAll.Content = contentRes.content
// 处理图片结果
if imageRes.err != nil {
service.Error(ctx, fmt.Errorf("生成图片失败: %v", imageRes.err))
return
}
if imageRes.result == nil || len(imageRes.result.Output.Results) == 0 {
service.Error(ctx, errors.New("图片生成失败"))
return
}
// 组装图片结果
for _, v := range imageRes.result.Output.Results {
resultAll.Result = append(resultAll.Result, struct {
Url string `json:"url"`
OrigPrompt string `json:"orig_prompt"`
ActualPrompt string `json:"actual_prompt"`
}{
Url: v.URL,
OrigPrompt: v.OrigPrompt,
ActualPrompt: v.ActualPrompt,
})
}
service.Success(ctx, resultAll)
}
// buildChatRequest 组装聊天的参数(用于 MoreText
func buildChatRequest(prompt string, images []string) (*modelQwen.ChatRequest, error) {
if prompt == "" {
return nil, errors.New("提示词不能为空")
}
var chatReq modelQwen.ChatRequest
chatReq.Model = "qwen3-max" //qwen3-max qwen-plus qwen-flash
var content []modelQwen.Content
content = append(content, modelQwen.Content{Type: "text", Text: prompt})
for _, v := range images {
if v != "" {
content = append(content, modelQwen.Content{Type: "image_url", ImageURL: &modelQwen.ImageURL{URL: v}})
}
}
chatReq.Messages = []modelQwen.Message{
{
Role: "user",
Content: content,
},
}
chatReq.Seed = time.Now().Unix()
return &chatReq, nil
}
// ChatReqGet 组装聊天的参数
func ChatReqGet(req ImageGenerateRequest) (*modelQwen.ChatRequest, error) {
return buildChatRequest(req.Prompt, req.Images)
}
func cleanTitle(s string) string {
var b strings.Builder
for _, r := range strings.TrimSpace(s) {
if unicode.Is(unicode.Han, r) || unicode.IsLetter(r) || unicode.IsDigit(r) ||
unicode.IsPunct(r) || unicode.IsSpace(r) {
b.WriteRune(r)
}
}
out := strings.ReplaceAll(b.String(), "*", "")
out = strings.TrimSpace(out)
return out
}
// extractTitleAndContent 从完整文本中提取 title 和 content
func extractTitleAndContent(text string) (title, content string) {
reTitleLine := regexp.MustCompile(`(?m).*标题[:]\s*(.+)$`)
if m := reTitleLine.FindStringSubmatch(text); len(m) >= 2 {
title = cleanTitle(m[1])
}
reContent := regexp.MustCompile(`(?s)标题[:].*?\n\s*\n(.*?)(?:\n\s*\n📸|\n\s*\n#|$)`)
if m := reContent.FindStringSubmatch(text); len(m) >= 2 {
content = strings.TrimSpace(m[1])
content = regexp.MustCompile(`\n+`).ReplaceAllString(content, "\n")
// 如果你希望把段内换行变成句内空格,可用下面这一行代替上面换行替换
// content = regexp.MustCompile(`\s*\n\s*`).ReplaceAllString(content, " ")
}
if content == "" && title != "" {
idx := strings.Index(text, title)
if idx >= 0 {
after := text[idx+len(title):]
after = strings.ReplaceAll(after, "**", "")
// 截到 "📸" 或 第一个 "#" 标签
if i := strings.Index(after, "📸"); i >= 0 {
after = after[:i]
} else if i := strings.Index(after, "#"); i >= 0 {
after = after[:i]
}
content = strings.TrimSpace(after)
}
}
return title, content
}

View File

@ -17,7 +17,6 @@ import (
"github.com/goccy/go-json"
"go.uber.org/zap"
"log"
"strconv"
"strings"
"sync"
"time"
@ -26,7 +25,6 @@ import (
const CacheChatRecordKey = "fiee:chatRecord"
const CacheSessionKey = "fiee:chatSession"
const CacheNewMsgStatKey = "fiee:newMsgStat"
const CacheAutoReplySwitchKey = "fiee:AutoReplySwitch"
var chatCacheLocker sync.RWMutex
@ -250,37 +248,3 @@ func (cr ChatCache) coverOwnerNewMessageStat(ctx context.Context, ownerId int64,
err = cache.RedisClient.Set(cr.GetNewMsgStatCacheKey(ownerId), value, 0).Err()
return
}
// -----------------------------------用户自动回复开关
// erp获取最新的消息统计
func (cr ChatCache) GetCacheAutoReplySwitchKey(userId int64) string {
return fmt.Sprintf("%s:%d", CacheAutoReplySwitchKey, userId)
}
func (cr ChatCache) SetAutoReplySwitch(ctx context.Context, ownerId int64, enableAutoReply bool) {
//chatCacheLocker.RLock()
//defer chatCacheLocker.RUnlock()
err := cache.RedisClient.Set(cr.GetCacheAutoReplySwitchKey(ownerId), enableAutoReply, 0).Err()
if err != nil {
log.Print("保存用户会话失败", zap.Error(err))
}
return
}
func (cr ChatCache) GetAutoReplySwitch(ctx context.Context, ownerId int64) (enableAutoReply bool) {
//chatCacheLocker.RLock()
//defer chatCacheLocker.RUnlock()
val, err := cache.RedisClient.Get(cr.GetCacheAutoReplySwitchKey(ownerId)).Bytes()
if err != nil {
log.Print("获取自动回复开关查询失败", zap.Error(err), zap.Int64("ownerId", ownerId))
return true
}
// 解析缓存值为布尔值
boolVal, err := strconv.ParseBool(string(val))
if err != nil {
log.Print("解析自动回复开关值失败", zap.Error(err), zap.String("value", string(val)), zap.Int64("ownerId", ownerId))
return true // 解析失败时也返回默认值true
}
return boolVal
}

View File

@ -35,7 +35,6 @@ type NewMessageRequest struct {
SessionId string `json:"sessionId"`
Message
AtUserId int64 `json:"atUserId"` //指定发送给sessionId中的某一个用户
//EnableAutoReply bool `json:"-"`
}
// 服务端接收到消息后使用websocket发送给userId关联的客户端通知客户端有新消息然后调用接口获取消息
@ -219,7 +218,3 @@ type UserDetailResp struct {
Phone string `json:"phone"`
GroupPhoto string `json:"groupPhoto"`
}
type UserSwitchAutoReplyReq struct {
EnableAutoReply bool `json:"enableAutoReply"`
}

View File

@ -612,54 +612,3 @@ func (cr ChatHandler) UserDetail(c *gin.Context) {
service.Success(c, detail)
}
func (a *ChatHandler) UserSwitchAutoReplyStatus(c *gin.Context) {
chatUser, code := jwt.ParseToChatUser(c)
if code != 0 {
service.ErrWithCode(c, code)
return
}
var req dto.UserSwitchAutoReplyReq
if err := c.ShouldBindJSON(&req); err != nil {
service.Error(c, err)
return
}
enable := a.cache.GetAutoReplySwitch(c, chatUser.ID)
var resp = map[string]any{
"enableAutoReply": enable,
}
service.Success(c, resp)
}
func (a *ChatHandler) SetSwitchAutoReplyStatus(c *gin.Context) {
chatUser, code := jwt.ParseToChatUser(c)
if code != 0 {
service.ErrWithCode(c, code)
return
}
var req dto.UserSwitchAutoReplyReq
if err := c.ShouldBindJSON(&req); err != nil {
service.Error(c, err)
return
}
a.cache.SetAutoReplySwitch(c, chatUser.ID, req.EnableAutoReply)
msg := dto.Message{
MsgType: 1,
LocalStamp: time.Now().Unix(),
}
if req.EnableAutoReply {
msg.Text = "已退出人工"
} else {
msg.Text = "已进入人工,不会接收自动消息"
}
err := logic.NewMessage(c, &a.cache, chatUser, dto.NewMessageRequest{
Robot: true,
SessionId: fmt.Sprintf("%d", chatUser.ID),
Message: msg,
})
if err != nil {
service.Error(c, err)
return
}
service.Success(c)
}

View File

@ -165,17 +165,29 @@ func (r *Robot) Run() {
fmt.Printf("robot listen event:%#v\n", event)
r.mu.Lock()
//加入聊天室规则
enableAutoReply := false
if event.Client != nil {
enableAutoReply = new(chatCache.ChatCache).GetAutoReplySwitch(context.Background(), event.Client.UserId)
hasHit := false
for _, rule := range r.joinSessionRules {
hit := rule.Hit(event, r.Info)
fmt.Printf("规则【%s】校验结果:%v\n", rule.GetTitle(), hit)
if hit {
hasHit = true
if rule.RunTime().IsZero() {
err := rule.Run(r.cache)
if err != nil {
log.Printf("robot 执行任务失败:%v\n", err)
}
} else {
r.RegisterDelayTask(rule)
}
}
}
if enableAutoReply {
hasHit := false
for _, rule := range r.joinSessionRules {
if !hasHit {
for _, rule := range r.keywordsRules {
hit := rule.Hit(event, r.Info)
fmt.Printf("规则【%s】校验结果:%v\n", rule.GetTitle(), hit)
if hit {
hasHit = true
fmt.Println("命中规则:", rule.GetTitle())
if rule.RunTime().IsZero() {
err := rule.Run(r.cache)
if err != nil {
@ -186,39 +198,21 @@ func (r *Robot) Run() {
}
}
}
if !hasHit {
for _, rule := range r.keywordsRules {
hit := rule.Hit(event, r.Info)
fmt.Printf("规则【%s】校验结果:%v\n", rule.GetTitle(), hit)
if hit {
hasHit = true
fmt.Println("命中规则:", rule.GetTitle())
if rule.RunTime().IsZero() {
err := rule.Run(r.cache)
if err != nil {
log.Printf("robot 执行任务失败:%v\n", err)
}
} else {
r.RegisterDelayTask(rule)
}
}
}
}
if !hasHit {
for _, rule := range r.noReplyAfterRules {
hit := rule.Hit(event, r.Info)
fmt.Printf("规则【%s】校验结果:%v\n", rule.GetTitle(), hit)
if hit {
hasHit = true
fmt.Println("命中规则:", rule.GetTitle())
if rule.RunTime().IsZero() {
err := rule.Run(r.cache)
if err != nil {
log.Printf("robot 执行任务失败:%v\n", err)
}
} else {
r.RegisterDelayTask(rule)
}
if !hasHit {
for _, rule := range r.noReplyAfterRules {
hit := rule.Hit(event, r.Info)
fmt.Printf("规则【%s】校验结果:%v\n", rule.GetTitle(), hit)
if hit {
hasHit = true
fmt.Println("命中规则:", rule.GetTitle())
if rule.RunTime().IsZero() {
err := rule.Run(r.cache)
if err != nil {
log.Printf("robot 执行任务失败:%v\n", err)
}
} else {
r.RegisterDelayTask(rule)
}
}
}

View File

@ -2,25 +2,16 @@ package bundle
import (
"context"
"encoding/json"
"errors"
"fmt"
"fonchain-fiee/api/bundle"
"fonchain-fiee/api/cast"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/bundle/common"
"fonchain-fiee/pkg/utils"
"io"
"strconv"
"strings"
"time"
bundleModel "fonchain-fiee/pkg/model/bundle"
"fonchain-fiee/pkg/model/login"
"github.com/gin-gonic/gin"
"github.com/samber/lo"
"github.com/xuri/excelize/v2"
)
func BundleExtend(c *gin.Context) {
@ -36,7 +27,7 @@ func BundleExtend(c *gin.Context) {
}
res, err := service.BundleProvider.BundleExtend(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.BundleExtendFailed))
service.Error(c, err)
return
}
service.Success(c, res)
@ -50,7 +41,7 @@ func BundleExtendRecordsList(c *gin.Context) {
}
res, err := service.BundleProvider.BundleExtendRecordsList(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.BundleExtendRecordsListFailed))
service.Error(c, err)
return
}
service.Success(c, res)
@ -64,7 +55,7 @@ func GetBundleBalance(c *gin.Context) {
}
res, err := service.BundleProvider.GetBundleBalanceList(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.GetBundleBalanceListFailed))
service.Error(c, err)
return
}
service.Success(c, res)
@ -78,7 +69,7 @@ func GetUsedRecordList(c *gin.Context) {
}
res, err := service.BundleProvider.GetUsedRecordList(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.GetUsedRecordListFailed))
service.Error(c, err)
return
}
service.Success(c, res)
@ -141,7 +132,7 @@ func GetToBeComfirmedWorks(c *gin.Context) {
req.ArtistUuid = strconv.Itoa(int(userInfo.ID))
res, err := service.BundleProvider.ToBeComfirmedWorks(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.ToBeComfirmedWorksFailed))
service.Error(c, err)
return
}
service.Success(c, res)
@ -153,7 +144,7 @@ func GetUserBalance(c *gin.Context) {
UserId: int32(userInfo.ID),
})
if err != nil {
service.Error(c, errors.New(common.GetUserBalanceFailed))
service.Error(c, err)
return
}
service.Success(c, res)
@ -175,7 +166,7 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
ConfirmStatus: 2,
})
if err != nil {
service.Error(c, errors.New(common.UpdateWorkStatusFailed))
service.Error(c, err)
return
}
service.Success(c, res)
@ -186,7 +177,7 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
UserId: int32(userInfo.ID),
})
if err != nil {
service.Error(c, errors.New(common.GetUserBalanceFailed))
service.Error(c, err)
return
}
@ -194,7 +185,7 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
WorkUuid: req.WorkUuid,
})
if err != nil {
service.Error(c, errors.New(common.GetWorkDetailFailed))
service.Error(c, err)
return
}
if wordInfoRes.WorkStatus != 4 {
@ -226,20 +217,19 @@ func WorkConfirm(c *gin.Context) { // 确认作品并扣除余量
service.Error(c, errors.New("不支持的类型"))
return
}
resp, err := service.BundleProvider.AddBundleBalance(c, &addBalanceReq)
_, err = service.BundleProvider.AddBundleBalance(c, &addBalanceReq)
if err != nil {
service.Error(c, errors.New(common.AddBundleBalanceFailed))
service.Error(c, err)
return
}
res, err := service.CastProvider.UpdateStatus(c, &cast.UpdateStatusReq{
WorkAction: cast.WorkActionENUM_CONFIRM,
WorkUuid: req.WorkUuid,
ConfirmRemark: req.ConfirmRemark,
CostType: resp.UsedType,
ConfirmStatus: 1,
})
if err != nil {
service.Error(c, errors.New(common.UpdateWorkStatusFailed))
service.Error(c, err)
return
}
service.Success(c, res)
@ -253,243 +243,8 @@ func CastLogConfirm(ctx *gin.Context) {
}
res, err := service.BundleProvider.ConfirmWork(context.Background(), &req)
if err != nil {
service.Error(ctx, errors.New(common.ConfirmWorkFailed))
return
}
service.Success(ctx, res)
}
func BundleActivate(ctx *gin.Context) {
var req bundle.BundleActivateReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
res, err := service.BundleProvider.BundleActivate(context.Background(), &req)
if err != nil {
service.Error(ctx, errors.New(common.BundleActivateFailed))
return
}
service.Success(ctx, res)
}
func BundleExport(ctx *gin.Context) {
var req bundle.BundleBalanceExportReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
userInfo := login.GetUserInfoFromC(ctx)
exportFileName := fmt.Sprintf("%d月份余量信息.xlsx", time.Now().Month())
filePath := fmt.Sprintf("./runtime/%d/%s", userInfo.ID, exportFileName)
utils.CheckDirPath("./runtime/"+fmt.Sprint(userInfo.ID), true)
res, err := service.BundleProvider.BundleBalanceExport(context.Background(), &req)
if err != nil {
service.Error(ctx, errors.New(common.BundleExportFailed))
return
}
if err := writeToExcel(filePath, res.Data); err != nil {
service.Error(ctx, errors.New(common.BundleExportFailed))
return
}
var scheme string
if ctx.GetHeader("X-Forwarded-Proto") == "https" {
scheme = "https"
} else {
scheme = "http"
}
var exportUrl string = fmt.Sprintf("%s://%s/api/fiee/static/%s", scheme, ctx.Request.Host, strings.Replace(filePath, "./runtime/", "", 1))
service.Success(ctx, gin.H{
"url": exportUrl,
})
}
func SetBalanceLayout(ctx *gin.Context) {
b, _ := io.ReadAll(ctx.Request.Body)
userInfo := login.GetUserInfoFromC(ctx)
var req = bundle.SetBundleBalanceLayoutReq{
Data: string(b),
UserId: uint32(userInfo.ID),
}
res, err := service.BundleProvider.SetBundleBalanceLayout(context.Background(), &req)
if err != nil {
service.Error(ctx, errors.New(common.SetBalanceLayoutFailed))
return
}
service.Success(ctx, res)
}
func GetBalanceLayout(ctx *gin.Context) {
userInfo := login.GetUserInfoFromC(ctx)
var req = bundle.GetBundleBalanceLayoutReq{
UserId: uint32(userInfo.ID),
}
res, err := service.BundleProvider.GetBundleBalanceLayout(context.Background(), &req)
if err != nil {
service.Error(ctx, errors.New(common.GetBalanceLayoutFailed))
return
}
var j any
json.Unmarshal([]byte(res.Data), &j)
service.Success(ctx, j)
}
func writeToExcel(filename string, items []*bundle.BundleBalanceExportItem) error {
f := excelize.NewFile()
sheet := "Sheet1"
// 手动表头(顺序与写入字段顺序必须一致)
headers := []string{
"所属月份", "用户编号", "姓名", "手机号", "购买套餐时间",
"套餐金额", "增值服务金额", "支付金额", "币种", "手续费",
"套餐视频总数", "增值服务视频总数", "套餐视频单价", "增值视频单价",
"套餐账号总数", "增值账号总数", "套餐账号使用数", "增值账号使用数",
"当前可用套餐视频数", "当前可用增值视频数", "当前已用套餐视频数", "当前已用增值视频数", "当前作废套餐视频数", "当前作废增值视频数", "当月新增可用套餐视频数", "当月新增可用增值视频数", "当月使用套餐视频数", "当月使用增值视频数", "当月作废套餐视频数", "当月作废增值视频数",
"当前可用套餐图文数", "当前可用增值图文数", "当前已用套餐图文数", "当前已用增值图文数", "当前作废套餐图文数", "当前作废增值图文数", "当月新增可用套餐图文数", "当月新增可用增值图文数", "当月使用套餐图文数", "当月使用增值图文数", "当月作废套餐图文数", "当月作废增值图文数",
"当前可用套餐数据分析数", "当前可用增值数据分析数", "当前已用套餐数据分析数", "当前已用增值数据分析数", "当前作废套餐数据分析数", "当前作废增值数据分析数", "当月新增可用套餐数据分析数", "当月新增可用增值数据分析数", "当月使用套餐数据分析数", "当月使用增值数据分析数", "当月作废套餐数据分析数", "当月作废增值数据分析数",
"当月手动扩展账号新增数", "当月手动扩展视频新增数", "当月手动扩展图文新增数", "当月手动扩展数据分析新增数", "当月新增手动扩展时长(天)", "当月手动扩展账号使用数", "当月手动扩展视频使用数", "当月手动扩展图文使用数", "当月手动扩展数据分析使用数",
}
// 写表头
for i, h := range headers {
col, _ := excelize.ColumnNumberToName(i + 1)
cell := col + "1"
if err := f.SetCellValue(sheet, cell, h); err != nil {
return err
}
}
// 从第2行开始写数据
for r, it := range items {
row := r + 2
// 逐列写入(注意顺序必须和 headers 一致)
write := func(colIdx int, v interface{}) error {
col, _ := excelize.ColumnNumberToName(colIdx)
cell := fmt.Sprintf("%s%d", col, row)
return f.SetCellValue(sheet, cell, v)
}
_ = write(1, it.Month)
_ = write(2, it.CustomerNum)
_ = write(3, it.UserName)
_ = write(4, it.UserPhoneNumber)
_ = write(5, it.PayTime)
_ = write(6, fmt.Sprintf("%.2f", it.BundleAmount))
_ = write(7, fmt.Sprintf("%.2f", it.IncreaseAmount))
_ = write(8, fmt.Sprintf("%.2f", it.TotalPayAmount))
_ = write(9, it.Currency)
_ = write(10, it.Fee)
// 套餐视频数量及单价
_ = write(11, int(it.BundleVideoNumber))
_ = write(12, int(it.IncreaseVideoNumber))
_ = write(13, fmt.Sprintf("%.2f", it.BundleVideoUnitPrice))
_ = write(14, fmt.Sprintf("%.2f", it.IncreaseVideoUnitPrice))
// 账号类
_ = write(15, int(it.BundleAccountNumber))
_ = write(16, int(it.IncreaseAccountNumber))
_ = write(17, int(it.BundleAccountConsumptionNumber))
_ = write(18, int(it.IncreaseAccountConsumptionNumber))
// 视频类
_ = write(19, int(it.MonthlyBundleVideoNumber))
_ = write(20, int(it.MonthlyIncreaseVideoNumber))
_ = write(21, int(it.BundleVideoConsumptionNumber))
_ = write(22, int(it.IncreaseVideoConsumptionNumber))
_ = write(23, int(it.InvalidBundleVideoNumber))
_ = write(24, int(it.InvalidIncreaseVideoNumber))
_ = write(25, int(it.MonthlyNewBundleVideoNumber))
_ = write(26, int(it.MonthlyNewIncreaseVideoNumber))
_ = write(27, int(it.MonthlyBundleVideoConsumptionNumber))
_ = write(28, int(it.MonthlyIncreaseVideoConsumptionNumber))
_ = write(29, int(it.MonthlyInvalidBundleVideoNumber))
_ = write(30, int(it.MonthlyInvalidIncreaseVideoNumber))
// 图文类
_ = write(31, int(it.MonthlyBundleImageNumber))
_ = write(32, int(it.MonthlyIncreaseImageNumber))
_ = write(33, int(it.BundleImageConsumptionNumber))
_ = write(34, int(it.IncreaseImageConsumptionNumber))
_ = write(35, int(it.InvalidBundleImageNumber))
_ = write(36, int(it.InvalidIncreaseImageNumber))
_ = write(37, int(it.MonthlyNewBundleImageNumber))
_ = write(38, int(it.MonthlyNewIncreaseImageNumber))
_ = write(39, int(it.MonthlyBundleImageConsumptionNumber))
_ = write(40, int(it.MonthlyIncreaseImageConsumptionNumber))
_ = write(41, int(it.MonthlyInvalidBundleImageNumber))
_ = write(42, int(it.MonthlyInvalidIncreaseImageNumber))
// 数据分析类
_ = write(43, int(it.MonthlyBundleDataAnalysisNumber))
_ = write(44, int(it.MonthlyIncreaseDataAnalysisNumber))
_ = write(45, int(it.BundleDataAnalysisConsumptionNumber))
_ = write(46, int(it.IncreaseDataAnalysisConsumptionNumber))
_ = write(47, int(it.InvalidBundleDataAnalysisNumber))
_ = write(48, int(it.InvalidIncreaseDataAnalysisNumber))
_ = write(49, int(it.MonthlyNewBundleDataAnalysisNumber))
_ = write(50, int(it.MonthlyNewIncreaseDataAnalysisNumber))
_ = write(51, int(it.MonthlyBundleDataAnalysisConsumptionNumber))
_ = write(52, int(it.MonthlyIncreaseDataAnalysisConsumptionNumber))
_ = write(53, int(it.MonthlyInvalidBundleDataAnalysisNumber))
_ = write(54, int(it.MonthlyInvalidIncreaseDataAnalysisNumber))
// 手动扩展类
_ = write(55, int(it.MonthlyNewManualAccountNumber))
_ = write(56, int(it.MonthlyNewManualVideoNumber))
_ = write(57, int(it.MonthlyNewManualImageNumber))
_ = write(58, int(it.MonthlyNewManualDataAnalysisNumber))
_ = write(59, int(it.MonthlyNewDurationNumber))
_ = write(60, int(it.MonthlyManualAccountConsumptionNumber))
_ = write(61, int(it.MonthlyManualVideoConsumptionNumber))
_ = write(62, int(it.MonthlyManualImageConsumptionNumber))
_ = write(63, int(it.MonthlyManualDataAnalysisConsumptionNumber))
}
// 可选:设置列宽,使表格更美观
_ = f.SetColWidth(sheet, "A", "AZ", 15)
// 保存文件
if err := f.SaveAs(filename); err != nil {
return err
}
return nil
}
func GetAccountBundleBalance(c *gin.Context) {
var req bundle.GetBundleBalanceListReq
if err := c.ShouldBindJSON(&req); err != nil {
service.Error(c, err)
return
}
req.Month = time.Now().Format("2006-01")
res, err := service.BundleProvider.GetBundleBalanceList(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.GetBundleBalanceListFailed))
return
}
result := bundleModel.GetBundleBalanceListResp{
Total: res.Total,
}
result.Data = lo.Map(res.Data, func(item *bundle.BundleBalanceItem, index int) *bundleModel.BundleBalanceItem {
return &bundleModel.BundleBalanceItem{
UserId: item.UserId,
UserName: item.UserName,
UserPhoneNumber: item.UserPhoneNumber,
Status: item.Status,
BundleName: item.BundleName,
ExpiredTime: item.ExpiredTime,
AccountNumber: item.BundleAccountNumber + item.IncreaseAccountNumber + item.ManualAccountNumber,
AccountConsumptionNumber: item.BundleAccountConsumptionNumber + item.IncreaseAccountConsumptionNumber + item.ManualAccountConsumptionNumber,
VideoNumber: item.BundleVideoNumber + item.IncreaseVideoNumber + item.ManualVideoNumber,
VideoConsumptionNumber: item.BundleVideoConsumptionNumber + item.IncreaseVideoConsumptionNumber + item.ManualVideoConsumptionNumber,
ImageNumber: item.BundleImageNumber + item.IncreaseImageNumber + item.ManualImageNumber,
ImageConsumptionNumber: item.BundleImageConsumptionNumber + item.IncreaseImageConsumptionNumber + item.ManualImageNumber,
DataAnalysisNumber: item.BundleDataAnalysisNumber + item.IncreaseDataAnalysisNumber + item.ManualDataAnalysisNumber,
DataAnalysisConsumptionNumber: item.BundleDataAnalysisConsumptionNumber + item.IncreaseDataAnalysisConsumptionNumber + item.ManualDataAnalysisNumber,
Bought: item.Bought,
}
})
service.Success(c, result)
}

View File

@ -1,586 +0,0 @@
package bundle
import (
"context"
"errors"
"fmt"
"fonchain-fiee/api/bundle"
"fonchain-fiee/api/cast"
logicCast "fonchain-fiee/pkg/logic/cast"
"fonchain-fiee/pkg/model/login"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/bundle/common"
serviceCast "fonchain-fiee/pkg/service/cast"
"fonchain-fiee/pkg/utils"
"reflect"
"strings"
"time"
"github.com/duke-git/lancet/v2/datetime"
"github.com/shopspring/decimal"
"github.com/gin-gonic/gin"
"github.com/samber/lo"
"github.com/xuri/excelize/v2"
)
func MetricsBusiness(ctx *gin.Context) {
var req bundle.MetricsBusinessReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
resp, err := service.BundleProvider.MetricsBusiness(ctx, &req)
if err != nil {
service.Error(ctx, errors.New(common.MetricsBusinessFailed))
return
}
service.Success(ctx, resp)
}
func MetricsOpratorCreate(ctx *gin.Context) {
var req bundle.MetricsOperatingCreateReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
resp, err := service.BundleProvider.MetricsOperatingCreate(ctx, &req)
if err != nil {
service.Error(ctx, errors.New(common.MetricsOperatingFailed))
return
}
service.Success(ctx, resp)
}
func MetricsOpratorStatus(ctx *gin.Context) {
var req bundle.MetricsOperatingStatusReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
resp, err := service.BundleProvider.MetricsOperatingStatus(ctx, &req)
if err != nil {
service.Error(ctx, errors.New(common.MetricsOperatingFailed))
return
}
service.Success(ctx, resp)
}
func MetricsBundlePurchaseExport(ctx *gin.Context) {
var req bundle.MetricsBundlePurchaseExportReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
resp, err := service.BundleProvider.MetricsBundlePurchaseExport(ctx, &req)
if err != nil {
service.Error(ctx, errors.New(common.MetricsBundlePurchaseExportFailed))
return
}
userInfo := login.GetUserInfoFromC(ctx)
exportFileName := "套餐购买数据_" + time.Now().Format("20060102150405") + ".xlsx"
filePath := fmt.Sprintf("./runtime/%d/%s", userInfo.ID, exportFileName)
utils.CheckDirPath("./runtime/"+fmt.Sprint(userInfo.ID), true)
var statistic = func(data []*bundle.MetricsBundlePurchaseItem, headers []string, f *excelize.File) {
sheet := f.GetSheetName(f.GetActiveSheetIndex())
// 设置“小计”
endRow := len(data) + 3
sumPayment := decimal.Zero
sumFinal := decimal.Zero
sumFee := decimal.Zero
for _, i := range data {
sumPayment = sumPayment.Add(decimal.NewFromFloat(float64(i.PaymentAmount)))
sumFinal = sumFinal.Add(decimal.NewFromFloat(float64(i.FinalAmount)))
sumFee = sumFee.Add(decimal.NewFromFloat(float64(i.FeeAmount)))
}
f.SetCellValue(sheet, fmt.Sprintf("A%d", endRow), "合计支付金额(美元)")
f.SetCellValue(sheet, fmt.Sprintf("B%d", endRow), "合计结算金额(美元)")
f.SetCellValue(sheet, fmt.Sprintf("C%d", endRow), "合计手续费金额(美元)")
f.SetCellValue(sheet, fmt.Sprintf("A%d", endRow+1), "$"+sumPayment.StringFixed(2))
f.SetCellValue(sheet, fmt.Sprintf("B%d", endRow+1), "$"+sumFinal.StringFixed(2))
f.SetCellValue(sheet, fmt.Sprintf("C%d", endRow+1), "$"+sumFee.StringFixed(2))
// 创建黑色边框样式
borderStyle, err := f.NewStyle(&excelize.Style{
Border: []excelize.Border{
{Type: "left", Color: "000000", Style: 1},
{Type: "right", Color: "000000", Style: 1},
{Type: "top", Color: "000000", Style: 1},
{Type: "bottom", Color: "000000", Style: 1},
},
Alignment: &excelize.Alignment{
Horizontal: "center",
Vertical: "center",
},
})
if err != nil {
fmt.Println("创建边框样式失败:", err)
return
}
// 应用样式到合计区域(包括标题行和数值行)
startCell := fmt.Sprintf("A%d", endRow)
endCell := fmt.Sprintf("C%d", endRow+1)
if err := f.SetCellStyle(sheet, startCell, endCell, borderStyle); err != nil {
fmt.Println("设置边框样式失败:", err)
}
_ = f.SetColWidth(sheet, "A", "N", 25)
}
if err := exportStructToExcel(resp.Data, []string{
"订单编号", "套餐", "用户编号", "客户姓名", "手机号", "支付时间", "套餐视频数", "增值视频数", "套餐金额", "增值金额", "支付金额", "结算金额", "手续费", "汇率(%",
}, filePath, statistic); err != nil {
service.Error(ctx, errors.New(common.MetricsBundlePurchaseExportFailed))
return
}
var scheme string
if ctx.GetHeader("X-Forwarded-Proto") == "https" {
scheme = "https"
} else {
scheme = "http"
}
var exportUrl string = fmt.Sprintf("%s://%s/api/fiee/static/%s", scheme, ctx.Request.Host, strings.Replace(filePath, "./runtime/", "", 1))
service.Success(ctx, gin.H{
"url": exportUrl,
})
}
func MetricsArtistAccountExport(ctx *gin.Context) {
var req bundle.MetricsArtistAccountExportReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
resp, err := service.BundleProvider.MetricsArtistAccountExport(ctx, &req)
if err != nil {
service.Error(ctx, errors.New(common.MetricsArtistAccountExportFailed))
return
}
userInfo := login.GetUserInfoFromC(ctx)
exportFileName := "艺人账号_" + time.Now().Format("20060102150405") + ".xlsx"
filePath := fmt.Sprintf("./runtime/%d/%s", userInfo.ID, exportFileName)
utils.CheckDirPath("./runtime/"+fmt.Sprint(userInfo.ID), true)
sheet := "Sheet1"
f := excelize.NewFile()
headers := []string{"序号", "艺人", "用户编号", "DM账号名", "Instagram账号名", "TikTok账号名"}
for i, h := range headers {
col, _ := excelize.ColumnNumberToName(i + 1)
cell := col + "1"
if err := f.SetCellValue(sheet, cell, h); err != nil {
break
}
}
var scheme string
if ctx.GetHeader("X-Forwarded-Proto") == "https" {
scheme = "https"
} else {
scheme = "http"
}
for r, it := range resp.Data {
row := r + 2
// 逐列写入(注意顺序必须和 headers 一致)
write := func(colIdx int, v interface{}) error {
col, _ := excelize.ColumnNumberToName(colIdx)
cell := fmt.Sprintf("%s%d", col, row)
return f.SetCellValue(sheet, cell, v)
}
_ = write(1, r+1)
_ = write(2, it.ArtistName)
_ = write(3, it.UserNum)
_ = write(4, it.DmAccount)
_ = write(5, it.InstagramAccount)
_ = write(6, it.TiktokAccount)
}
// 可选:设置列宽,使表格更美观
_ = f.SetColWidth(sheet, "A", "AZ", 18)
// 保存文件
if err := f.SaveAs(filePath); err != nil {
service.Error(ctx, errors.New(common.MetricsArtistAccountExportFailed))
return
}
var exportUrl string = fmt.Sprintf("%s://%s/api/fiee/static/%s", scheme, ctx.Request.Host, strings.Replace(filePath, "./runtime/", "", 1))
service.Success(ctx, gin.H{
"url": exportUrl,
})
}
func MetricsVideoSubmitExport(ctx *gin.Context) {
var req bundle.MetricsVideoSubmitExportReq
var (
resp *cast.WorkListResp
)
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
newCtx := serviceCast.NewCtxWithUserInfo(ctx)
t, err := time.Parse("2006-01", req.Month)
if err == nil {
resp, err = service.CastProvider.WorkList(newCtx, &cast.WorkListReq{
SubmitStartTime: datetime.BeginOfMonth(t).Format(time.DateTime),
SubmitEndTime: datetime.EndOfMonth(t).Format(time.DateTime),
Page: 1,
PageSize: 99999,
})
fmt.Printf("resp.Count: %v\n", resp.Count)
} else {
resp, err = service.CastProvider.WorkList(newCtx, &cast.WorkListReq{
Page: 1,
PageSize: 99999,
})
fmt.Printf("resp.Count: %v\n", resp.Count)
}
if err != nil {
service.Error(ctx, errors.New(common.MetricsVideoSubmitExportFailed))
return
}
var loigcCastWork = new(logicCast.Work)
excelFile, err := loigcCastWork.ExportExcelWorkList(resp.Data)
if err != nil {
service.Error(ctx, errors.New(common.MetricsVideoSubmitExportFailed))
return
}
userInfo := login.GetUserInfoFromC(ctx)
exportFileName := "视频上传数据_" + time.Now().Format("20060102150405") + ".xlsx"
filePath := fmt.Sprintf("./runtime/%d/%s", userInfo.ID, exportFileName)
utils.CheckDirPath("./runtime/"+fmt.Sprint(userInfo.ID), true)
// 保存文件
if err := excelFile.SaveAs(filePath); err != nil {
service.Error(ctx, errors.New(common.MetricsVideoSubmitExportFailed))
return
}
var scheme string
if ctx.GetHeader("X-Forwarded-Proto") == "https" {
scheme = "https"
} else {
scheme = "http"
}
var exportUrl string = fmt.Sprintf("%s://%s/api/fiee/static/%s", scheme, ctx.Request.Host, strings.Replace(filePath, "./runtime/", "", 1))
service.Success(ctx, gin.H{
"url": exportUrl,
})
}
// func MetricsVideoSubmitExport(ctx *gin.Context) {
// var req bundle.MetricsVideoSubmitExportReq
// if err := ctx.ShouldBindJSON(&req); err != nil {
// service.Error(ctx, err)
// return
// }
// resp, err := service.BundleProvider.MetricsVideoSubmitExport(ctx, &req)
// if err != nil {
// service.Error(ctx, err)
// return
// }
// userInfo := login.GetUserInfoFromC(ctx)
// exportFileName := "视频上传数据.xlsx"
// filePath := fmt.Sprintf("./runtime/%d/%s", userInfo.ID, exportFileName)
// utils.CheckDirPath("./runtime/"+fmt.Sprint(userInfo.ID), true)
// sheet := "Sheet1"
// f := excelize.NewFile()
// headers := []string{"序号", "画家", "用户编号", "视频标题", "DM发布时间", "Instagram发布时间", "TikTok发布时间"}
// for i, h := range headers {
// col, _ := excelize.ColumnNumberToName(i + 1)
// cell := col + "1"
// if err := f.SetCellValue(sheet, cell, h); err != nil {
// break
// }
// }
// var scheme string
// if ctx.GetHeader("X-Forwarded-Proto") == "https" {
// scheme = "https"
// } else {
// scheme = "http"
// }
// for r, it := range resp.Data {
// row := r + 2
// // 逐列写入(注意顺序必须和 headers 一致)
// write := func(colIdx int, v interface{}) error {
// col, _ := excelize.ColumnNumberToName(colIdx)
// cell := fmt.Sprintf("%s%d", col, row)
// return f.SetCellValue(sheet, cell, v)
// }
// _ = write(1, r+1)
// _ = write(2, it.ArtistName)
// _ = write(3, it.UserNum)
// _ = write(4, it.VideoTitle)
// _ = write(5, tsToStr(it.DmUploadTime, "2006/01/02"))
// _ = write(6, tsToStr(it.InstagramUploadTime, "2006/01/02"))
// _ = write(7, tsToStr(it.TiktokUploadTime, "2006/01/02"))
// }
// // 可选:设置列宽,使表格更美观
// _ = f.SetColWidth(sheet, "A", "AZ", 15)
// // 保存文件
// if err := f.SaveAs(filePath); err != nil {
// service.Error(ctx, err)
// return
// }
// var exportUrl string = fmt.Sprintf("%s://%s/api/fiee/static/%s", scheme, ctx.Request.Host, strings.Replace(filePath, "./runtime/", "", 1))
// service.Success(ctx, gin.H{
// "url": exportUrl,
// })
// }
func MetricsBalanceDetailExport(ctx *gin.Context) {
var req bundle.BundleBalanceExportReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
resp, err := service.BundleProvider.BundleBalanceExport(ctx, &req)
if err != nil {
service.Error(ctx, errors.New(common.MetricsBalanceDetailExportFailed))
return
}
type itemStruct struct {
Month string
CustomerNum string
UserName string
UserPhoneNumber string
PayTime string
BundleAmount float32
IncreaseAmount float32
TotalPayAmount float32
Currency string
Fee string
BundleVideoNumber int32
IncreaseVideoNumber int32
BundleVideoUnitPrice float32
IncreaseVideoUnitPrice float32
MonthlyNewBundleVideoNumber int32
MonthlyNewIncreaseVideoNumber int32
BundleVideoConsumptionNumber int32
IncreaseVideoConsumptionNumber int32
BundleVideoUsedPrice float32
IncreaseVideoUsedPrice float32
}
items := lo.Map(resp.Data, func(item *bundle.BundleBalanceExportItem, _ int) itemStruct {
payTime, _ := time.Parse(time.DateTime, item.PayTime)
return itemStruct{
Month: item.Month,
CustomerNum: item.CustomerNum,
UserName: item.UserName,
UserPhoneNumber: item.UserPhoneNumber,
PayTime: payTime.Format("2006/01/02"),
BundleAmount: item.BundleAmount,
IncreaseAmount: item.IncreaseAmount,
TotalPayAmount: item.TotalPayAmount,
Currency: "美元",
Fee: "$" + item.Fee,
BundleVideoNumber: item.BundleVideoNumber,
IncreaseVideoNumber: item.IncreaseVideoNumber,
BundleVideoUnitPrice: item.BundleVideoUnitPrice,
IncreaseVideoUnitPrice: item.IncreaseVideoUnitPrice,
MonthlyNewBundleVideoNumber: item.MonthlyBundleVideoNumber,
MonthlyNewIncreaseVideoNumber: item.MonthlyIncreaseVideoNumber,
BundleVideoConsumptionNumber: item.BundleVideoConsumptionNumber,
IncreaseVideoConsumptionNumber: item.IncreaseVideoConsumptionNumber,
BundleVideoUsedPrice: float32(item.BundleVideoConsumptionNumber) * item.BundleVideoUnitPrice,
IncreaseVideoUsedPrice: float32(item.IncreaseVideoConsumptionNumber) * item.IncreaseVideoUnitPrice,
}
})
var statistic = func(data []itemStruct, headers []string, f *excelize.File) {
sheet := f.GetSheetName(f.GetActiveSheetIndex())
// 设置“小计”
endRow := len(data) + 1
sumBundle := decimal.Zero
sumIncrease := decimal.Zero
sumTotal := decimal.Zero
for _, i := range items {
sumBundle = sumBundle.Add(decimal.NewFromFloat(float64(i.BundleVideoUsedPrice)))
sumIncrease = sumIncrease.Add(decimal.NewFromFloat(float64(i.IncreaseVideoUsedPrice)))
}
sumTotal = sumBundle.Add(sumIncrease)
f.SetCellValue(sheet, fmt.Sprintf("R%d", endRow+1), "小计")
f.SetCellValue(sheet, fmt.Sprintf("S%d", endRow+1), fmt.Sprintf("$%s", sumBundle.StringFixed(2)))
f.SetCellValue(sheet, fmt.Sprintf("T%d", endRow+1), fmt.Sprintf("$%s", sumIncrease.StringFixed(2)))
f.MergeCell(sheet, fmt.Sprintf("S%d", endRow+2), fmt.Sprintf("T%d", endRow+2))
f.SetCellValue(sheet, fmt.Sprintf("R%d", endRow+2), "合计")
f.SetCellValue(sheet, fmt.Sprintf("T%d", endRow+2), fmt.Sprintf("$%s", sumTotal.StringFixed(2)))
// 设置样式(加粗、边框)
boldStyle, _ := f.NewStyle(&excelize.Style{
Fill: excelize.Fill{
Type: "pattern",
Color: []string{"#FFFF00"}, // 黄色
Pattern: 1, // 实心填充
},
Font: &excelize.Font{Bold: true},
Border: []excelize.Border{
{Type: "left", Color: "000000", Style: 1},
{Type: "right", Color: "000000", Style: 1},
{Type: "top", Color: "000000", Style: 1},
{Type: "bottom", Color: "000000", Style: 1},
},
})
f.SetCellStyle(sheet, fmt.Sprintf("R%d", endRow+1), fmt.Sprintf("T%d", endRow+2), boldStyle)
}
userInfo := login.GetUserInfoFromC(ctx)
exportFileName := "视频消耗金额_" + time.Now().Format("20060102150405") + ".xlsx"
filePath := fmt.Sprintf("./runtime/%d/%s", userInfo.ID, exportFileName)
utils.CheckDirPath("./runtime/"+fmt.Sprint(userInfo.ID), true)
if err := exportStructToExcel(items, []string{
"所属月份", "用户编号", "姓名", "手机号", "购买套餐时间", "套餐金额", "增值金额", "支付金额", "币种", "手续费", "套餐视频总数",
"增值视频总数", "套餐视频单价", "增值视频单价", "当前需要上传套餐视频数", "当前需要上传增值视频数",
"当前已上传套餐视频数", "当前已上传增值视频数", "当前套餐视频已消费总金额", "当前增值视频已消费总金额",
}, filePath, yelloStyle, statistic); err != nil {
service.Error(ctx, errors.New(common.MetricsBalanceDetailExportFailed))
return
}
var scheme string
if ctx.GetHeader("X-Forwarded-Proto") == "https" {
scheme = "https"
} else {
scheme = "http"
}
var exportUrl string = fmt.Sprintf("%s://%s/api/fiee/static/%s", scheme, ctx.Request.Host, strings.Replace(filePath, "./runtime/", "", 1))
service.Success(ctx, gin.H{
"url": exportUrl,
})
}
func yelloStyle[T any](_ []T, headers []string, f *excelize.File) {
style, err := f.NewStyle(&excelize.Style{
Fill: excelize.Fill{
Type: "pattern",
Color: []string{"#FFFF00"}, // 黄色
Pattern: 1, // 实心填充
},
Font: &excelize.Font{
Bold: true,
},
Alignment: &excelize.Alignment{
Horizontal: "center",
Vertical: "center",
},
})
if err != nil {
fmt.Println("创建样式失败:", err)
return
}
sheet := f.GetSheetName(f.GetActiveSheetIndex())
endCell, _ := excelize.CoordinatesToCellName(len(headers), 1)
// 应用样式到第一行
f.SetCellStyle(sheet, "A1", endCell, style)
}
func BalanceMetricsExport(ctx *gin.Context) {
var req bundle.BundleBalanceExportReq
if err := ctx.ShouldBindJSON(&req); err != nil {
service.Error(ctx, err)
return
}
userInfo := login.GetUserInfoFromC(ctx)
exportFileName := "服务使用明细数据_" + time.Now().Format("20060102150405") + ".xlsx"
filePath := fmt.Sprintf("./runtime/%d/%s", userInfo.ID, exportFileName)
utils.CheckDirPath("./runtime/"+fmt.Sprint(userInfo.ID), true)
res, err := service.BundleProvider.BundleBalanceExport(context.Background(), &req)
if err != nil {
service.Error(ctx, errors.New(common.BalanceMetricsExportFailed))
return
}
if err := writeToExcel(filePath, res.Data); err != nil {
service.Error(ctx, errors.New(common.BalanceMetricsExportFailed))
return
}
var scheme string
if ctx.GetHeader("X-Forwarded-Proto") == "https" {
scheme = "https"
} else {
scheme = "http"
}
var exportUrl string = fmt.Sprintf("%s://%s/api/fiee/static/%s", scheme, ctx.Request.Host, strings.Replace(filePath, "./runtime/", "", 1))
service.Success(ctx, gin.H{
"url": exportUrl,
})
}
func exportStructToExcel[T any](data []T, headers []string, filename string, fns ...func(data []T, headers []string, f *excelize.File)) error {
f := excelize.NewFile()
sheet := f.GetSheetName(f.GetActiveSheetIndex())
// 写入表头
for i, h := range headers {
cell, _ := excelize.CoordinatesToCellName(i+1, 1)
f.SetCellValue(sheet, cell, h)
}
if len(data) != 0 {
// 获取结构体字段顺序
v := reflect.ValueOf(data[0])
if v.Kind() == reflect.Ptr {
v = v.Elem()
}
t := v.Type()
// 过滤出导出字段
exportedFields := make([]int, 0)
for i := 0; i < t.NumField(); i++ {
if t.Field(i).IsExported() { // Go 1.17+ 新增的方法
exportedFields = append(exportedFields, i)
}
}
// 写入数据
for rowIdx, item := range data {
val := reflect.ValueOf(item)
if val.Kind() == reflect.Ptr {
val = val.Elem()
}
for colIdx, fieldIdx := range exportedFields {
field := val.Field(fieldIdx)
var cellValue any
switch field.Kind() {
case reflect.Float32, reflect.Float64:
cellValue = fmt.Sprintf("$%.2f", field.Float()) // 保留两位小数
default:
cellValue = field.Interface()
}
cell, _ := excelize.CoordinatesToCellName(colIdx+1, rowIdx+2)
f.SetCellValue(sheet, cell, cellValue)
}
}
}
for _, fn := range fns {
fn(data, headers, f)
}
// 保存文件
return f.SaveAs(filename)
}
func tsToStr(ts int64, layout string) string {
if ts == 0 {
return ""
}
t := time.Unix(ts, 0).In(time.Local)
return t.Format(layout)
}

View File

@ -13,13 +13,12 @@ import (
"fonchain-fiee/pkg/service/bundle/logic"
bundleModel "fonchain-fiee/pkg/service/bundle/model"
"fonchain-fiee/pkg/service/upload"
"strconv"
"strings"
"time"
"github.com/360EntSecGroup-Skylar/excelize"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"
"strconv"
"strings"
"time"
)
func DeleteBundleOrder(c *gin.Context) {
@ -193,69 +192,161 @@ func calculateExpirationDate(startDate time.Time, num int32, unit string) string
}
func CreateBundleOrderSignature(c *gin.Context) {
var req bundle.OrderCreateRecord
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
}
// 参数校验
if err := logic.ValidateRequest(c, &req); err != nil {
service.Error(c, err)
if req.BundleUuid == "" {
service.Error(c, errors.New(common.MissBundleUUID))
return
}
// 获取用户信息并校验状态
if req.Language == "" {
req.Language = c.GetHeader("Accept-Language")
if req.Language == "" {
service.Error(c, errors.New(common.MissLanguageTypes))
return
}
}
// 不去校验 签名
/*if req.Signature == "" {
service.Error(c, errors.New(common.MissOrderSignature))
return
}*/
statusMessages := map[int32]string{
1: common.Unnamed,
2: common.UnderReview,
3: common.ReviewFailed,
}
// 获取 用户信息
userInfo := login.GetUserInfoFromC(c)
if err := logic.ValidateUserStatus(userInfo); err != nil {
service.Error(c, err)
if userInfo.Status != 4 {
if msg, exists := statusMessages[userInfo.Status]; exists {
service.Error(c, errors.New(msg))
return
} else {
service.Error(c, errors.New(common.UnknownStatus))
return
}
}
// 校验 当前用户只能买一次套餐
orderRecordsListReq := bundle.OrderRecordsRequest{
CustomerID: strconv.FormatUint(userInfo.ID, 10),
}
orderRecordsList, orderRecordsListErr := service.BundleProvider.OrderRecordsList(context.Background(), &orderRecordsListReq)
if orderRecordsListErr != nil {
service.Error(c, orderRecordsListErr)
return
}
// 校验套餐是否已购买
if err := logic.CheckUserOrder(userInfo.ID); err != nil {
service.Error(c, err)
return
//有套餐并且套餐未过期
if orderRecordsList.OrderRecords != nil {
for _, orderInfo := range orderRecordsList.OrderRecords {
if orderInfo.CustomerID == strconv.FormatUint(userInfo.ID, 10) && orderInfo.Status == 1 {
service.Error(c, errors.New(common.ThereAreOutstandingOrders))
return
}
if orderInfo.CustomerID == strconv.FormatUint(userInfo.ID, 10) && orderInfo.ExpirationTime > time.Now().Format("2006-01-02 15:04:05") {
service.Error(c, errors.New(common.HadOrder))
return
}
}
}
// 获取最后一次合同编号
lastContractNo, err := logic.GetLastContractNo()
if err != nil {
service.Error(c, err)
// 获取 最后一次的 合同编号
lastOrderRecord, lastOrderRecordErr := service.BundleProvider.OrderRecordsList(context.Background(), &bundle.OrderRecordsRequest{
PageSize: 1,
Page: 1,
})
if lastOrderRecordErr != nil {
service.Error(c, lastOrderRecordErr)
return
}
// 获取套餐详情
bundleDetail, err := logic.GetBundleDetail(req.BundleUuid, req.Language)
if err != nil {
service.Error(c, err)
lastContractNo := ""
if lastOrderRecord.OrderRecords != nil {
for _, lastOrder := range lastOrderRecord.OrderRecords {
lastContractNo = lastOrder.ContractNo
}
}
// 获取 套餐信息
bundleDetailReq := &bundle.BundleDetailRequest{
Uuid: req.BundleUuid,
Language: req.Language,
}
bundleDetail, detailErr := service.BundleProvider.BundleLangDetailV2(context.Background(), bundleDetailReq)
if detailErr != nil {
service.Error(c, detailErr)
return
}
// 组装服务内容(套餐权益 + 附加权益)
addRecords, addTotalPrice, expirationDay, err := logic.BuildServiceRecords(&req, bundleDetail)
if err != nil {
service.Error(c, err)
//获取过期时间和增值服务金额
var addRecords []*bundle.OrderCreateAddRecord
var addTotalPrice float32
var expirationDay string
for _, i := range req.AddRecords {
price, err := service.BundleProvider.CalculatePrice(context.Background(), &bundle.CalculatePriceRequest{
Uuid: i.ValueUid,
Num: i.Num,
Language: req.Language,
})
if err != nil {
service.Error(c, err)
return
}
addTotalPrice += price.Price
addService, err := service.BundleProvider.ValueAddServiceLangByUuidAndLanguage(context.Background(), &bundle.ValueAddServiceDetailRequest{
Uuid: i.ValueUid,
Language: req.Language,
})
if err != nil {
service.Error(c, err)
return
}
addRecords = append(addRecords, &bundle.OrderCreateAddRecord{
ServiceType: addService.ServiceType,
ValueUid: i.ValueUid,
CurrencyType: addService.PriceType,
Amount: price.Price,
Num: i.Num,
Unit: addService.Unit,
Source: 1,
PaymentStatus: 1,
})
//服务类型为时长 计算
if addService.ServiceType == 5 {
expirationDay = calculateExpirationDate(time.Now(), i.Num, addService.Unit)
} else {
expirationDay = time.Now().AddDate(0, 0, 7).Format("2006-01-02")
}
}
// 当前 未将 签名 写入合同中 todo 金额和有效时间待修改
signContract, signContractErr := logic.SignContractV2(req.CustomerNum, bundleDetail.Contract, bundleDetail.Price+addTotalPrice, expirationDay)
if signContractErr != nil {
service.Error(c, signContractErr)
return
}
req.CustomerNum = userInfo.SubNum
req.CustomerName = userInfo.Name
req.CustomerID = strconv.FormatUint(userInfo.ID, 10)
req.BundleName = bundleDetail.Name
req.Amount = bundleDetail.Price
req.AmountType = bundleDetail.PriceType
//req.BundleCommonUid = bundleDetail.BundleCommonUid
req.TotalAmount = bundleDetail.Price + addTotalPrice
req.ContractNo = common.GenerateContractNo(lastContractNo)
req.SignContract = signContract
req.SignedTime = common.GetBeijingTime()
req.Status = bundleModel.OrderSigned
req.AddRecords = addRecords
//req.ExpirationTime = expirationDay //过期日期取消 在完成支付是更新
req.PayType = 1
// 签合同(金额 + 有效期)
signContract, err := logic.SignContractV2(req.CustomerNum, bundleDetail.Contract, bundleDetail.Price+addTotalPrice, expirationDay)
if err != nil {
service.Error(c, err)
return
}
// 组装订单信息
req = logic.BuildOrderRequest(req, userInfo, bundleDetail, addRecords, addTotalPrice, lastContractNo, signContract)
// 创建订单
res, err := service.BundleProvider.CreateOrderRecord(context.Background(), &req)
if err != nil {
service.Error(c, err)
return
}
service.Success(c, res)
return
}
func UpdateBundleOrderStatusPaid(c *gin.Context) {
@ -411,7 +502,6 @@ func OrderRecordsListV2(c *gin.Context) {
if u, ok := userMap[item.CustomerId]; ok {
item.CustomerName = u.Name
item.TelNum = u.TelNum
item.SubNum = u.SubNum
}
}
}
@ -493,7 +583,6 @@ func OrderRecordsListDownload(c *gin.Context) {
if u, ok := userMap[item.CustomerId]; ok {
item.CustomerName = u.Name
item.TelNum = u.TelNum
item.SubNum = u.SubNum
}
}
}
@ -517,7 +606,7 @@ func exportExcel(orderList []*bundle.OrderBundleRecordInfo) (*excelize.File, err
f.SetSheetName("Sheet1", sheetName)
headers := []string{
"套餐订单号", "套餐类型", "套餐付款状态", "艺人手机号", "用户编号", "艺人", "套餐订单创建时间", "套餐支付时间", "套餐金额",
"套餐订单号", "套餐类型", "套餐付款状态", "艺人手机号", "艺人", "套餐订单创建时间", "套餐支付时间", "套餐金额",
"增值服务订单号", "增值税服务金额", "支付金额", "币种", "手续费", "增值订单创建时间", "增值付款状态",
}
for i, h := range headers {
@ -547,22 +636,22 @@ func exportExcel(orderList []*bundle.OrderBundleRecordInfo) (*excelize.File, err
f.SetCellValue(sheetName, fmt.Sprintf("B%d", rowIndex), bundleInfo.BundleName)
f.SetCellValue(sheetName, fmt.Sprintf("C%d", rowIndex), GetPayStatusText(bundleInfo.PayStatus))
f.SetCellValue(sheetName, fmt.Sprintf("D%d", rowIndex), bundleInfo.TelNum)
f.SetCellValue(sheetName, fmt.Sprintf("E%d", rowIndex), bundleInfo.SubNum)
f.SetCellValue(sheetName, fmt.Sprintf("F%d", rowIndex), bundleInfo.CustomerName)
f.SetCellValue(sheetName, fmt.Sprintf("G%d", rowIndex), bundleInfo.BundleCreateAt)
f.SetCellValue(sheetName, fmt.Sprintf("H%d", rowIndex), bundleInfo.PayTime)
f.SetCellValue(sheetName, fmt.Sprintf("I%d", rowIndex), bundleInfo.Amount)
f.SetCellValue(sheetName, fmt.Sprintf("E%d", rowIndex), bundleInfo.CustomerName)
f.SetCellValue(sheetName, fmt.Sprintf("F%d", rowIndex), bundleInfo.BundleCreateAt)
f.SetCellValue(sheetName, fmt.Sprintf("G%d", rowIndex), bundleInfo.PayTime)
f.SetCellValue(sheetName, fmt.Sprintf("H%d", rowIndex), bundleInfo.Amount)
if addCount > 0 {
for i, add := range bundleInfo.AddBundleInfo {
r := rowIndex + i
f.SetCellValue(sheetName, fmt.Sprintf("J%d", r), add.OrderAddNo)
f.SetCellValue(sheetName, fmt.Sprintf("K%d", r), add.Amount)
f.SetCellValue(sheetName, fmt.Sprintf("L%d", r), add.SettlementAmount)
f.SetCellValue(sheetName, fmt.Sprintf("M%d", r), GetCurrencyTypeText(add.CurrencyType))
f.SetCellValue(sheetName, fmt.Sprintf("N%d", r), add.HandlingFee)
f.SetCellValue(sheetName, fmt.Sprintf("O%d", r), add.OrderAddCreateAt)
f.SetCellValue(sheetName, fmt.Sprintf("P%d", r), GetPayStatusText(add.AddPayStatus))
f.SetCellValue(sheetName, fmt.Sprintf("I%d", r), add.OrderAddNo)
f.SetCellValue(sheetName, fmt.Sprintf("J%d", r), add.Amount)
f.SetCellValue(sheetName, fmt.Sprintf("K%d", r), add.SettlementAmount)
f.SetCellValue(sheetName, fmt.Sprintf("L%d", r), GetCurrencyTypeText(add.CurrencyType))
f.SetCellValue(sheetName, fmt.Sprintf("M%d", r), add.HandlingFee)
//f.SetCellValue(sheetName, fmt.Sprintf("N%d", r), add.ExchangeRate)
f.SetCellValue(sheetName, fmt.Sprintf("N%d", r), add.OrderAddCreateAt)
f.SetCellValue(sheetName, fmt.Sprintf("O%d", r), GetPayStatusText(add.AddPayStatus))
}
} else {
for i := 8; i <= 15; i++ {

View File

@ -2,10 +2,8 @@ package bundle
import (
"context"
"errors"
"fonchain-fiee/api/bundle"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/bundle/common"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"
@ -21,7 +19,7 @@ func CreateBundle(c *gin.Context) {
res, err := service.BundleProvider.CreateBundle(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.CreateBundleFailed))
service.Error(c, err)
return
}
@ -38,7 +36,7 @@ func UpdateBundle(c *gin.Context) {
res, err := service.BundleProvider.UpdateBundle(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.UpdateBundleFailed))
service.Error(c, err)
return
}
@ -56,7 +54,7 @@ func DeleteBundle(c *gin.Context) {
res, err := service.BundleProvider.DeleteBundle(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.DeleteBundleFailed))
service.Error(c, err)
return
}
@ -73,7 +71,7 @@ func BundleList(c *gin.Context) {
res, err := service.BundleProvider.BundleList(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.BundleListFailed))
service.Error(c, err)
return
}
@ -90,7 +88,7 @@ func SaveBundleV2(c *gin.Context) {
res, err := service.BundleProvider.SaveBundle(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.UpdateBundleFailed))
service.Error(c, err)
return
}
@ -107,7 +105,7 @@ func BundleListV2(c *gin.Context) {
res, err := service.BundleProvider.BundleListV2(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.BundleListFailed))
service.Error(c, err)
return
}
@ -115,6 +113,7 @@ func BundleListV2(c *gin.Context) {
}
func BundleDetailV2(c *gin.Context) {
var req bundle.BundleDetailRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
return
@ -123,7 +122,7 @@ func BundleDetailV2(c *gin.Context) {
req.Language = language
res, err := service.BundleProvider.BundleDetailV2(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.BundleDetailFailed))
service.Error(c, err)
return
}
@ -151,7 +150,7 @@ func OnlyAddValueListByOrderNo(c *gin.Context) {
}
res, err := service.BundleProvider.OnlyAddValueListByOrderNo(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.OnlyAddValueListByOrderNoFailed))
service.Error(c, err)
return
}
@ -167,7 +166,7 @@ func BundleListH5V2(c *gin.Context) {
res, err := service.BundleProvider.BundleListH5V2(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.BundleListFailed))
service.Error(c, err)
return
}

View File

@ -2,23 +2,9 @@ package common
// 套餐
const (
MissBundleUUID = "缺少套餐UUID"
MissOrderSignature = "缺少客户签名信息"
ErrorInsertSignature = "插入签名失败"
CreateValueAddBundleFailed = "创建增值套餐失败"
ValueAddBundleListFailed = "增值套餐列表查询失败"
ValueAddBundleDetailFailed = "增值套餐详情查询失败"
SaveValueAddServiceFailed = "保存增值套餐失败"
ValueAddServiceListFailed = "套餐服务列表查询失败"
ValueAddServiceDetailFailed = "套餐服务详情查询失败"
ValueAddServiceLangDetailFailed = "套餐服务语言详情查询失败"
CreateBundleFailed = "创建套餐失败"
UpdateBundleFailed = "更新套餐失败"
DeleteBundleFailed = "删除套餐失败"
BundleListFailed = "套餐列表查询失败"
BundleDetailFailed = "套餐详情查询失败"
HandShelfFailed = "更新套餐上下架失败"
OnlyAddValueListByOrderNoFailed = "根据订单号查询增值套餐失败"
MissBundleUUID = "缺少套餐UUID"
MissOrderSignature = "缺少客户签名信息"
ErrorInsertSignature = "插入签名失败"
)
// 订单
@ -64,86 +50,32 @@ const (
ReviewFailed = "实名审核失败"
UnknownStatus = "未知实名状态"
)
const (
UnknownAddServiceUUID = "未知增值服务"
BundleUnBindingAddService = "套餐未绑定增值服务"
)
//发布
const (
UpdateWorkStatusFailed = "更新作品状态失败"
GetWorkDetailFailed = "获取作品详情失败"
)
//余量
const (
BundleExtendFailed = "套餐扩展失败"
BundleExtendRecordsListFailed = "套餐扩展记录列表查询失败"
GetBundleBalanceListFailed = "套餐余额列表查询失败"
GetUsedRecordListFailed = "套餐使用记录列表查询失败"
GetUserBalanceFailed = "套餐余额查询失败"
ToBeComfirmedWorksFailed = "待确认作品列表查询失败"
ConfirmWorkFailed = "确认消耗余量失败"
AddBundleBalanceFailed = "添加消耗余量失败"
BundleActivateFailed = "套餐激活失败"
BundleExportFailed = "套餐余量导出失败"
SetBalanceLayoutFailed = "设置套餐余额布局失败"
GetBalanceLayoutFailed = "获取套餐余额布局失败"
InsufficientBalance = "余量不足"
)
//数据指标
const (
MetricsBusinessFailed = "业务概览查询失败"
MetricsOperatingFailed = "运营数据查询失败"
MetricsBundlePurchaseExportFailed = "套餐购买数据导出失败"
MetricsArtistAccountExportFailed = "艺人账号数据导出失败"
MetricsVideoSubmitExportFailed = "视频上传数据导出失败"
MetricsBalanceDetailExportFailed = "服务使用明细数据导出失败"
BalanceMetricsExportFailed = "服务使用明细数据导出失败"
)
//素材库
const (
FileListFailed = "素材库列表查询失败"
FileUsageFailed = "素材库使用情况查询失败"
GetFileInfoFailed = "素材库文件信息查询失败"
CreateFileFailed = "素材库文件创建失败"
DeleteFileFailed = "素材库文件删除失败"
SearchFileFailed = "素材库文件搜索失败"
UploadFileFailed = "素材库文件上传失败"
TusCreateFailed = "素材库文件创建失败"
TusUploadFailed = "素材库文件上传失败"
PreviewFileFailed = "素材库文件预览失败"
ActionFailed = "素材库文件操作失败"
DirDownloadFailed = "素材库文件下载失败"
InvalidUploadOffset = "无效的上传偏移量"
ERROR_OPEN_FILE = "打开文件错误"
)
//官网
const (
CreateSecFilingFailed = "创建官方信息失败"
UpdateSecFilingFailed = "更新官方信息失败"
UpdateSecFilingStatusFailed = "更新官方信息状态失败"
ListSecFilingFailed = "官方信息列表查询失败"
DetailSecFilingFailed = "官方信息详情查询失败"
DeleteSecFilingFailed = "删除官方信息失败"
FilingDateIsEmpty = "数据信息为空"
GetSecFilingsFailed = "获取官方信息失败"
GetFormListFailed = "获取官方信息类型失败"
WebListSecFilingFailed = "官网官方信息列表查询失败"
CreateGovernanceFailed = "创建治理信息失败"
DeleteGovernanceFailed = "删除治理信息失败"
ListGovernanceFailed = "治理信息列表查询失败"
EditGovernanceFailed = "编辑治理信息失败"
DisplayGovernanceFailed = "显示治理信息失败"
CreatePressReleasesFailed = "创建新闻发布失败"
DeletePressReleasesFailed = "删除新闻发布失败"
ListPressReleasesFailed = "新闻发布列表查询失败"
EditPressReleasesFailed = "编辑新闻发布失败"
DisplayPressReleasesFailed = "显示新闻发布失败"
GetPressReleasesFailed = "获取新闻发布失败"
)
/*var EnMessages = map[string]string{
"创建套餐信息失败": "Failed to create bundle information",
"创建套餐信息成功": "Successfully created bundle information",
"更新套餐信息失败": "Failed to update bundle information",
"更新套餐信息成功": "Successfully updated bundle information",
"删除套餐信息失败": "Failed to delete bundle information",
"删除套餐信息成功": "Successfully deleted bundle information",
"获取套餐列表失败": "Failed to get bundle list",
"获取套餐信息失败": "Failed to get bundle information",
"创建订单信息失败": "Failed to create order information",
"创建订单信息成功": "Successfully created order information",
"更新订单信息失败": "Failed to update order information",
"更新订单信息成功": "Successfully updated order information",
"获取订单信息失败": "Failed to get order information",
"获取订单列表失败": "Failed to get order list",
"缺少套餐UUID": "Missing bundle UUID",
"缺少客户签名信息": "Missing customer signature",
"插入签名失败": "Failed to insert signature",
"缺少订单号": "Missing order number",
"缺少订单信息": "Missing order information",
"非当前用户订单信息不可操作": "Cannot operate on order information of other users",
"订单已支付": "Order has been paid",
"您已购买过套餐,无法再次购买": "You have already purchased this bundle and cannot purchase again",
"查询支付信息失败": "Failed to query payment information",
"下载文件失败": "Failed to download file",
"上传文件失败": "Failed to upload file",
"时间格式错误": "Invalid time format",
}*/

View File

@ -1,212 +0,0 @@
package logic
import (
"context"
"errors"
"fonchain-fiee/api/bundle"
"fonchain-fiee/pkg/model/login"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/bundle/common"
bundleModel "fonchain-fiee/pkg/service/bundle/model"
"strconv"
"time"
"github.com/gin-gonic/gin"
)
// 校验参数
func ValidateRequest(c *gin.Context, req *bundle.OrderCreateRecord) error {
if req.BundleUuid == "" {
return errors.New(common.MissBundleUUID)
}
if req.Language == "" {
req.Language = c.GetHeader("Accept-Language")
if req.Language == "" {
return errors.New(common.MissLanguageTypes)
}
}
return nil
}
// 校验用户状态
func ValidateUserStatus(userInfo login.Info) error {
statusMessages := map[int32]string{
1: common.Unnamed,
2: common.UnderReview,
3: common.ReviewFailed,
}
if userInfo.Status != 4 {
if msg, ok := statusMessages[userInfo.Status]; ok {
return errors.New(msg)
}
return errors.New(common.UnknownStatus)
}
return nil
}
// 校验用户是否已有套餐
func CheckUserOrder(userID uint64) error {
req := bundle.OrderRecordsDetailRequest{CustomerID: strconv.FormatUint(userID, 10)}
records, _ := service.BundleProvider.OrderRecordsDetail(context.Background(), &req)
//if err != nil {
// return err
//}
// 校验用户是否已有订单
if records.OrderRecord != nil {
if records.OrderRecord.CustomerID == strconv.FormatUint(userID, 10) && records.OrderRecord.Status == 1 {
return errors.New(common.ThereAreOutstandingOrders)
}
if records.OrderRecord.CustomerID == strconv.FormatUint(userID, 10) && records.OrderRecord.ExpirationTime > time.Now().Format("2006-01-02 15:04:05") {
return errors.New(common.HadOrder)
}
}
return nil
}
// 获取最后一次合同编号
func GetLastContractNo() (string, error) {
records, err := service.BundleProvider.OrderRecordsList(context.Background(), &bundle.OrderRecordsRequest{
PageSize: 1,
Page: 1,
})
if err != nil {
return "", err
}
if len(records.OrderRecords) > 0 {
return records.OrderRecords[0].ContractNo, nil
}
return "", nil
}
// 获取套餐详情
func GetBundleDetail(uuid, lang string) (*bundle.BundleProfileLang, error) {
return service.BundleProvider.BundleLangDetailV2(context.Background(), &bundle.BundleDetailRequest{
Uuid: uuid,
Language: lang,
})
}
// 组装服务内容(套餐权益和附加权益)
func BuildServiceRecords(req *bundle.OrderCreateRecord, bundleDetail *bundle.BundleProfileLang) ([]*bundle.OrderCreateAddRecord, float32, string, error) {
var (
addRecords []*bundle.OrderCreateAddRecord
addTotalPrice float32
expirationDay string
addUidService = make(map[string]bool)
bundleUidService = make(map[string]bool)
)
// 分类权益
for _, i := range bundleDetail.ServiceLangInfo {
switch i.BenefitsType {
case 1:
bundleUidService[i.ValueAddUuid] = true
case 2:
addUidService[i.ValueAddUuid] = true
}
}
if len(bundleUidService) == 0 {
return nil, 0, "", errors.New(common.BundleUnBindingAddService)
}
// 附加权益
for _, i := range req.AddRecords {
if !addUidService[i.ValueUid] {
return nil, 0, "", errors.New(common.UnknownAddServiceUUID)
}
price, err := service.BundleProvider.CalculatePrice(context.Background(), &bundle.CalculatePriceRequest{
Uuid: i.ValueUid,
Num: i.Num,
Language: req.Language,
})
if err != nil {
return nil, 0, "", err
}
addTotalPrice += price.Price
addService, err := service.BundleProvider.ValueAddServiceLangByUuidAndLanguage(context.Background(),
&bundle.ValueAddServiceDetailRequest{Uuid: i.ValueUid, Language: req.Language})
if err != nil {
return nil, 0, "", err
}
addRecords = append(addRecords, buildAddRecord(addService, i.ValueUid, price.Price, i.Num, 2))
}
// 套餐权益
for uid := range bundleUidService {
addService, err := service.BundleProvider.ValueAddServiceLangByUuidAndLanguage(context.Background(),
&bundle.ValueAddServiceDetailRequest{Uuid: uid, Language: req.Language})
if err != nil {
return nil, 0, "", err
}
var num int32
for _, s := range addService.Options {
if s.IsDefault {
num = s.Num
break
}
}
addRecords = append(addRecords, buildAddRecord(addService, uid, 0, num, 1))
// 计算到期时间
if addService.ServiceType == 5 {
expirationDay = calculateExpirationDate(time.Now(), num, addService.Unit)
} else {
expirationDay = time.Now().AddDate(0, 0, 7).Format("2006-01-02")
}
}
return addRecords, addTotalPrice, expirationDay, nil
}
// 构建单条服务记录
func buildAddRecord(addService *bundle.ValueAddServiceLang, uid string, price float32, num int32, equityType int32) *bundle.OrderCreateAddRecord {
return &bundle.OrderCreateAddRecord{
ServiceType: addService.ServiceType,
ValueUid: uid,
CurrencyType: addService.PriceType,
Amount: price,
Num: num,
Unit: addService.Unit,
Source: 1,
PaymentStatus: 1,
EquityType: equityType,
QuotaType: addService.QuotaType,
QuotaValue: addService.QuotaValue,
IsExpired: addService.IsExpired,
}
}
// 组装订单请求
func BuildOrderRequest(req bundle.OrderCreateRecord, userInfo login.Info,
bundleDetail *bundle.BundleProfileLang, addRecords []*bundle.OrderCreateAddRecord,
addTotalPrice float32, lastContractNo, signContract string) bundle.OrderCreateRecord {
req.CustomerNum = userInfo.SubNum
req.CustomerName = userInfo.Name
req.CustomerID = strconv.FormatUint(userInfo.ID, 10)
req.BundleName = bundleDetail.Name
req.Amount = bundleDetail.Price
req.AmountType = bundleDetail.PriceType
req.TotalAmount = bundleDetail.Price + addTotalPrice
req.ContractNo = common.GenerateContractNo(lastContractNo)
req.SignContract = signContract
req.SignedTime = common.GetBeijingTime()
req.Status = bundleModel.OrderSigned
req.AddRecords = addRecords
req.PayType = 1
return req
}
func calculateExpirationDate(startDate time.Time, num int32, unit string) string {
//now := time.Now()
switch unit {
case "天":
return startDate.AddDate(0, 0, int(num)).Format("2006-01-02")
case "月":
return startDate.AddDate(0, int(num), 0).Format("2006-01-02")
case "年":
return startDate.AddDate(int(num), 0, 0).Format("2006-01-02")
default:
return ""
}
}

View File

@ -6,13 +6,12 @@ import (
"fonchain-fiee/pkg/model"
"fonchain-fiee/pkg/service/bundle/common"
"fonchain-fiee/pkg/service/upload"
"github.com/signintech/gopdf"
"go.uber.org/zap"
"log"
"os"
"strconv"
"time"
"github.com/signintech/gopdf"
"go.uber.org/zap"
)
func SignContractV2(customerNum, contract string, price float32, expirationDate string) (outputUrl string, err error) {

View File

@ -11,11 +11,10 @@ import (
"fonchain-fiee/pkg/service/bundle/logic"
bundleModel "fonchain-fiee/pkg/service/bundle/model"
"fonchain-fiee/pkg/utils"
"strconv"
"time"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"
"strconv"
"time"
)
func GetReconciliationList(c *gin.Context) {
@ -24,61 +23,11 @@ func GetReconciliationList(c *gin.Context) {
service.Error(c, err)
return
}
res := &bundle.GetReconciliationListResp{}
// Step 1: 如果有姓名/电话筛选,先查用户列表
if req.UserName != "" {
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
BlurNameTel: req.UserName,
Domain: "app",
})
if err != nil {
service.Error(c, err)
return
}
if len(userListResp.UserList) == 0 {
// 没查到用户,直接返回空结果
res.Page = req.Page
res.PageSize = req.PageSize
res.Total = 0
service.Success(c, res)
return
}
// 提取用户ID列表
for _, u := range userListResp.UserList {
req.UserIDS = append(req.UserIDS, u.Id)
}
}
req.UserName = ""
detail, detailErr := service.BundleProvider.GetReconciliationList(context.Background(), &req)
if detailErr != nil {
service.Error(c, detailErr)
return
}
var userIds []int64
for _, u := range detail.List {
userIds = append(userIds, int64(u.UserID))
}
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
Ids: userIds,
Domain: "app",
})
if err != nil {
service.Error(c, err)
return
}
userMap := make(map[int64]*accountFiee.UserListInfo, len(userListResp.UserList))
if len(userListResp.UserList) > 0 {
for _, u := range userListResp.UserList {
userMap[int64(u.Id)] = u
}
for _, u := range detail.List {
if user, ok := userMap[int64(u.UserID)]; ok {
u.SubNum = user.SubNum
}
}
}
service.Success(c, detail)
return
@ -90,61 +39,13 @@ func GetReconciliationListDownload(c *gin.Context) {
service.Error(c, err)
return
}
res := &bundle.GetReconciliationListResp{}
if req.UserName != "" {
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
BlurNameTel: req.UserName,
Domain: "app",
})
if err != nil {
service.Error(c, err)
return
}
if len(userListResp.UserList) == 0 {
// 没查到用户,直接返回空结果
res.Page = req.Page
res.PageSize = req.PageSize
res.Total = 0
service.Success(c, res)
return
}
// 提取用户ID列表
for _, u := range userListResp.UserList {
req.UserIDS = append(req.UserIDS, u.Id)
}
}
detail, detailErr := service.BundleProvider.GetReconciliationList(context.Background(), &req)
if detailErr != nil {
service.Error(c, detailErr)
return
}
var userIds []int64
for _, u := range detail.List {
userIds = append(userIds, int64(u.UserID))
}
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
Ids: userIds,
Domain: "app",
})
if err != nil {
service.Error(c, err)
return
}
userMap := make(map[int64]*accountFiee.UserListInfo, len(userListResp.UserList))
if len(userListResp.UserList) > 0 {
for _, u := range userListResp.UserList {
userMap[int64(u.Id)] = u
}
for _, u := range detail.List {
if user, ok := userMap[int64(u.UserID)]; ok {
u.SubNum = user.SubNum
}
}
}
titleList := []string{
"关联套餐订单号", "关联增值服务订单号", "用户编号", "艺人", "艺人手机号", "套餐", "支付金额", "手续费", "币种", "支付渠道", "支付时间", "支付状态", "流水号",
"关联套餐订单号", "关联增值服务订单号", "对账单创建时间", "艺人", "艺人手机号", "套餐", "支付金额", "手续费", "币种", "支付渠道", "支付时间", "支付状态", "流水号",
}
var dataList []interface{}
@ -158,8 +59,7 @@ func GetReconciliationListDownload(c *gin.Context) {
data := []any{
i.BundleOrderOn,
i.BundleAddOrderOn,
//i.CreationTime,
i.SubNum,
i.CreationTime,
i.UserName,
i.UserTel,
i.BundleName,
@ -252,16 +152,14 @@ func AutoCreateUserAndOrder(c *gin.Context) {
reportUuid := ""
accountUuid := ""
durationUuid := ""
bundleVideoUuid := ""
if config.AppConfig.System.AppMode == "prod" {
BundleName = "全球尊享版"
BundleUuid = "ac4c99c2951c2fcdbf417928d321554d"
videoUuid = "355aae784d77280197c92ff56733459d" // 增值视频
textAndImagesUuid = "41a7753d210d22f8972dc273ff1360c4" // 套餐图文
reportUuid = "069497de55852c24a3b0f702c1250900" // 套餐数据
accountUuid = "1e04078d2a8824d18be1c281bc3167a8" // 套餐账号
durationUuid = "e3ad8f15aa022b12afe47170c9051db9" // 套餐时长
bundleVideoUuid = "fdbef018707e2a8ebc82a22e257abaff" // 套餐视频
videoUuid = "a29a1fa2862b2cdda1377b19066c8eb7"
textAndImagesUuid = "dfba176a40ae2d23aa4ef9b30b646bc8"
reportUuid = "1727557a85c92957a3e3332d18c713aa"
accountUuid = "e1cc219e4f682b3d8cb85929e540a0de"
durationUuid = "f002449ac57a2e71b0673da938c0354e"
} else {
BundleName = "测试导入全球尊享版"
BundleUuid = "5e84f86cb7f92a4ab785271e4a383aa5"
@ -306,21 +204,7 @@ func AutoCreateUserAndOrder(c *gin.Context) {
f64, err := strconv.ParseFloat(unfinishInfo.OrderPayAmount, 32)
TotalPrice = float32(f64)
addRecords = append(addRecords,
&bundle.OrderCreateAddRecord{ // 套餐视频
ServiceType: 1,
ValueUid: bundleVideoUuid,
CurrencyType: 2, //美元
Amount: 0, //增值服务金额
Num: 24,
Unit: "个",
Source: 1,
PaymentStatus: 1,
HandlingFee: unfinishInfo.OrderFeeAmount,
EquityType: 1,
QuotaType: 2,
QuotaValue: 2,
},
&bundle.OrderCreateAddRecord{ //视频增值
&bundle.OrderCreateAddRecord{
ServiceType: 1,
ValueUid: videoUuid,
CurrencyType: 2, //美元
@ -330,8 +214,6 @@ func AutoCreateUserAndOrder(c *gin.Context) {
Source: 1,
PaymentStatus: 1,
HandlingFee: unfinishInfo.OrderFeeAmount,
EquityType: 2,
QuotaType: 1,
}, &bundle.OrderCreateAddRecord{ //图文
ServiceType: 2,
ValueUid: textAndImagesUuid,
@ -342,9 +224,6 @@ func AutoCreateUserAndOrder(c *gin.Context) {
Source: 1,
PaymentStatus: 1,
HandlingFee: unfinishInfo.OrderFeeAmount,
EquityType: 1,
QuotaType: 2,
QuotaValue: 10,
}, &bundle.OrderCreateAddRecord{ //数据报表
ServiceType: 3,
ValueUid: reportUuid,
@ -355,9 +234,6 @@ func AutoCreateUserAndOrder(c *gin.Context) {
Source: 1,
PaymentStatus: 1,
HandlingFee: unfinishInfo.OrderFeeAmount,
EquityType: 1,
QuotaType: 2,
QuotaValue: 1,
}, &bundle.OrderCreateAddRecord{ //账号数
ServiceType: 4,
ValueUid: accountUuid,
@ -368,25 +244,21 @@ func AutoCreateUserAndOrder(c *gin.Context) {
Source: 1,
PaymentStatus: 1,
HandlingFee: unfinishInfo.OrderFeeAmount,
EquityType: 1,
QuotaType: 1,
}, &bundle.OrderCreateAddRecord{ //可用时长
ServiceType: 5,
ValueUid: durationUuid,
CurrencyType: 2, //美元
Amount: 0, //增值服务金额
Num: 1,
Num: 10,
Unit: "年",
Source: 1,
PaymentStatus: 1,
HandlingFee: unfinishInfo.OrderFeeAmount,
EquityType: 1,
QuotaType: 1,
},
)
// 当前 未将 签名 写入合同中 todo 金额和有效时间待修改
contract := "https://e-cdn.fontree.cn/fonchain-main/prod/file/saas/contract/template-25032801.pdf"
expirationDay = t.AddDate(1, 0, 0).Format("2006-01-02")
expirationDay = t.AddDate(10, 0, 0).Format("2006-01-02")
signContract, signContractErr := logic.SignContractV2(userReq.UserNum, contract, TotalPrice, expirationDay)
if signContractErr != nil {
service.Error(c, signContractErr)

View File

@ -2,12 +2,10 @@ package bundle
import (
"context"
"errors"
"fmt"
"fonchain-fiee/api/bundle"
"fonchain-fiee/pkg/model/login"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/bundle/common"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"
@ -24,7 +22,7 @@ func CreateValueAddBundle(c *gin.Context) {
res, err := service.BundleProvider.CreateValueAddBundle(context.Background(), &req)
if err != nil {
fmt.Println(err)
service.Error1(c, errors.New(common.CreateValueAddBundleFailed))
service.Error1(c, err)
return
}
@ -35,7 +33,7 @@ func ValueAddBundleList(c *gin.Context) {
var req bundle.ValueAddBundleListRequest
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
service.Error(c, err)
service.Error1(c, err)
return
}
@ -46,7 +44,7 @@ func ValueAddBundleList(c *gin.Context) {
res, err := service.BundleProvider.ValueAddBundleList(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.ValueAddBundleListFailed))
service.Error1(c, err)
return
}
@ -63,7 +61,7 @@ func ValueAddBundleDetail(c *gin.Context) {
res, err := service.BundleProvider.ValueAddBundleDetail(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.ValueAddBundleDetailFailed))
service.Error1(c, err)
return
}
@ -80,7 +78,7 @@ func SaveValueAddService(c *gin.Context) {
res, err := service.BundleProvider.SaveValueAddService(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.SaveValueAddServiceFailed))
service.Error(c, err)
return
}
service.Success(c, res)
@ -95,7 +93,7 @@ func ValueAddServiceList(c *gin.Context) {
res, err := service.BundleProvider.ValueAddServiceList(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.ValueAddServiceListFailed))
service.Error(c, err)
return
}
service.Success(c, res)
@ -110,7 +108,7 @@ func ValueAddServiceDetail(c *gin.Context) {
res, err := service.BundleProvider.ValueAddServiceDetail(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.ValueAddServiceDetailFailed))
service.Error(c, err)
return
}
service.Success(c, res)
@ -126,7 +124,7 @@ func ValueAddServiceLangDetail(c *gin.Context) {
req.Language = language
res, err := service.BundleProvider.ValueAddServiceLangByUuidAndLanguage(context.Background(), &req)
if err != nil {
service.Error(c, errors.New(common.ValueAddServiceLangDetailFailed))
service.Error(c, err)
return
}
service.Success(c, res)

View File

@ -8,8 +8,6 @@ import (
"fonchain-fiee/pkg/e"
modelCast "fonchain-fiee/pkg/model/cast"
"fonchain-fiee/pkg/utils"
"go.uber.org/zap"
)
type CastService struct {
@ -27,7 +25,6 @@ func (c *CastService) ApprovalDetail(approvalIds []int) (data map[int]modelCast.
url := fmt.Sprintf(config.AppConfig.System.FieeHost + "/approval/list/ex")
respBody, err = utils.Post(url, string(idsBytes))
if err != nil {
zap.L().Error("ApprovalDetail error", zap.Error(err))
return
}
var respDetail modelCast.ApprovalDetailResponse

View File

@ -1,57 +0,0 @@
package cast
import (
"context"
"encoding/json"
"fmt"
"fonchain-fiee/api/cast"
modelCast "fonchain-fiee/pkg/model/cast"
"fonchain-fiee/pkg/model/login"
"fonchain-fiee/pkg/service"
"github.com/gin-gonic/gin"
)
func LayoutUpdate(ctx *gin.Context) {
var req *modelCast.LayoutUpdateReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
dataB, _ := json.Marshal(req.Data)
userInfo := login.GetUserInfoFromC(ctx)
_, err = service.CastProvider.SetLayout(context.Background(), &cast.SetLayoutReq{
UserID: fmt.Sprint(userInfo.ID),
Data: string(dataB),
FormName: req.FormName,
})
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx)
}
func LayoutDetail(ctx *gin.Context) {
var req *cast.GetLayoutReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
if err = req.Validate(); err != nil {
service.Error(ctx, err)
return
}
userInfo := login.GetUserInfoFromC(ctx)
req.UserID = fmt.Sprint(userInfo.ID)
resp, err := service.CastProvider.GetLayout(context.Background(), req)
if err != nil {
service.Error(ctx, err)
return
}
var j any
_ = json.Unmarshal([]byte(resp.Data), &j)
service.Success(ctx, map[string]interface{}{"data": j, "formName": resp.FormName})
}

View File

@ -2,23 +2,17 @@ package cast
import (
"context"
"encoding/json"
"errors"
"fmt"
"fonchain-fiee/api/accountFiee"
"fonchain-fiee/api/aryshare"
"fonchain-fiee/api/bundle"
"fonchain-fiee/api/cast"
"fonchain-fiee/cmd/config"
"fonchain-fiee/pkg/e"
modelCast "fonchain-fiee/pkg/model/cast"
"fonchain-fiee/pkg/service"
"net/http"
"net/url"
"strconv"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"strconv"
)
func MediaUserList(ctx *gin.Context) {
@ -37,11 +31,6 @@ func MediaUserList(ctx *gin.Context) {
service.Error(ctx, err)
return
}
go func() {
for _, v := range resp.Data {
_ = SyncAsAuth(v.ArtistUuid)
}
}()
service.Success(ctx, resp)
return
}
@ -72,6 +61,7 @@ func UnbindManager(ctx *gin.Context) {
})
if err != nil {
service.Error(ctx, err)
//FIXME 进行回滚
return
}
}
@ -112,39 +102,22 @@ func UpdateMediaAccount(ctx *gin.Context) {
return
}
// 查询艺人的信息
userResp, err := service.CastProvider.MediaUserList(context.Background(), &cast.MediaUserListReq{
ArtistUuid: req.ArtistUuid,
Page: 1,
PageSize: 10,
})
if err != nil {
service.Error(ctx, err)
return
}
if userResp != nil && len(userResp.Data) > 0 {
for _, v := range userResp.Data {
if v.PlatformID == uint32(req.PlatformID) {
service.Error(ctx, errors.New("账号已存在"))
return
}
}
}
// 字符串转整型
artistID, err := strconv.ParseUint(req.ArtistUuid, 10, 64)
infoResp, err = GetArtistAccountInfo(artistID)
if err != nil {
service.Error(ctx, err)
return
}
if infoResp.SubNum == "" {
service.Error(ctx, errors.New("用户不存在"))
return
}
//TODO 判断是否注册ay
if err = CheckAsProfile(infoResp); err != nil {
service.Error(ctx, err)
return
if config.AppConfig.System.AppMode != "dev" {
infoResp, err = service.AccountFieeProvider.Info(context.Background(), &accountFiee.InfoRequest{
ID: artistID,
Domain: "app",
})
if err != nil {
service.Error(ctx, err)
return
}
} else {
infoResp = &accountFiee.UserInfoResponse{
Name: "小波",
TelNum: "18288888888",
}
}
req.ArtistName = infoResp.Name
req.ArtistPhone = infoResp.TelNum
@ -187,10 +160,9 @@ func UpdateMediaAccount(ctx *gin.Context) {
return
}
// 账号授权
func OAuthAccount(ctx *gin.Context) {
var req *cast.OAuthAccountV2Req
var resp *cast.OAuthAccountV2Resp
func OAuthUrl(ctx *gin.Context) {
var req *cast.OAuthYoutubeUrlReq
var resp *cast.OAuthYoutubeUrlResp
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
@ -200,218 +172,23 @@ func OAuthAccount(ctx *gin.Context) {
service.Error(ctx, err)
return
}
mediaResp, err := service.CastProvider.MediaUserList(ctx, &cast.MediaUserListReq{
MediaUserID: req.MediaAccountUuid,
Page: 1,
PageSize: 1,
})
if err != nil {
if resp, err = service.CastProvider.OAuthYoutubeUrl(ctx, req); err != nil {
service.Error(ctx, err)
return
}
if mediaResp == nil || len(mediaResp.Data) == 0 {
service.Error(ctx, errors.New("未找到该账号"))
return
}
if err = SyncAsAuth(mediaResp.Data[0].ArtistUuid); err != nil {
service.Error(ctx, err)
return
}
if resp, err = service.CastProvider.OAuthAccountV2(ctx, req); err != nil {
service.Error(ctx, err)
return
}
if cast.PlatformIDENUM_DM == cast.PlatformIDENUM(resp.PlatformID) {
service.Success(ctx, map[string]interface{}{
"url": resp.AuthUrl,
})
return
}
if resp.ProfileKey == "" {
service.Error(ctx, errors.New("艺人未添加平台账号"))
return
}
jwtReq := &aryshare.GenerateJWTRequest{
Domain: "",
PrivateKey: "",
ProfileKey: resp.ProfileKey,
Logout: true,
Redirect: fmt.Sprintf("%s?artistUuid=%s&platformID=%d", config.AppConfig.System.AuthCallback, resp.ArtistUuid, resp.PlatformID),
AllowedSocial: []string{modelCast.PlatformNameKv[resp.PlatformID]},
Verify: false,
Base64: false,
ExpiresIn: 0,
Email: nil,
}
jwtResp, err := service.AyrshareProvider.GenerateJWT(context.Background(), jwtReq)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, jwtResp)
service.Success(ctx, resp)
return
}
func OAuth2Callback(ctx *gin.Context) {
var (
platformIds string
userID string
)
code := ctx.Query("code")
state := ctx.Query("state")
stateMM, _ := url.ParseQuery(state)
if len(stateMM["platform_id"]) > 0 {
platformIds = stateMM["platform_id"][0]
}
if len(stateMM["user_id"]) > 0 {
userID = stateMM["user_id"][0]
}
platformID, _ := strconv.ParseInt(platformIds, 10, 64)
req := &cast.OAuthCodeToTokenReq{
Code: code,
UserID: userID,
}
switch platformID {
case int64(cast.PlatformIDENUM_DM):
req.PlatformID = cast.PlatformIDENUM_DM
case int64(cast.PlatformIDENUM_TIKTOK):
req.PlatformID = cast.PlatformIDENUM_TIKTOK
default:
service.Error(ctx, errors.New(e.GetMsg(e.InvalidParams)))
return
}
zap.L().Info("OAuth2Callback", zap.Any("req", req), zap.Any("code", code), zap.Any("state", state))
_, err := service.CastProvider.OAuthCodeToToken(ctx, req)
if err != nil {
zap.L().Info("OAuth2Callback error", zap.Error(err))
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=1"))
return
}
// TODO 跳转到前端页面
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=0"))
//service.Success(ctx, map[string]interface{}{
// "req": req,
// "resp": resp,
//})
return
}
func AsOAuth2Callback(ctx *gin.Context) {
var (
//platformIds string
//userID string
)
artistUuid := ctx.Query("artistUuid")
//platformIDs := ctx.Query("platformID")
//platformID, _ := strconv.ParseInt(platformIDs, 10, 64)
// 刷新授权
var err error
var req modelCast.OAuthPlatformReq
if err = ctx.ShouldBind(&req); err != nil {
//service.Error(ctx, err)
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?status=%d&message=%s", config.AppConfig.System.AuthRedirectUrl, 1, "参数错误"))
return
}
err = SyncAsAuth(artistUuid)
if err != nil {
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?status=%d&message=%s", config.AppConfig.System.AuthRedirectUrl, 1, err.Error()))
return
}
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?status=%d&message=%s", config.AppConfig.System.AuthRedirectUrl, 0, ""))
return
}
func SyncAsAuth(artistUuid string) error {
resp, err := service.CastProvider.GetArtist(context.Background(), &cast.GetArtistReq{ArtistUuid: artistUuid})
if err != nil {
return errors.New("获取艺人信息错误")
}
if resp == nil || resp.ArtistInfo == nil || resp.ArtistInfo.ProfileKey == "" {
return errors.New("艺人未注册")
}
userResp, err := service.AyrshareProvider.GetUser(context.Background(), &aryshare.GetUserRequest{
ProfileKey: resp.ArtistInfo.ProfileKey,
InstagramDetails: true,
//scope := ctx.Query("scope")
resp, err := service.CastProvider.OAuthYoutubeToken(ctx, &cast.OAuthYoutubeTokenReq{
MediaAccountUuid: state,
Code: code,
//scope: scope,
})
if err != nil {
return errors.New("获取艺人绑定信息错误")
}
var authReq *cast.UpdateOAuthReq
authReq = &cast.UpdateOAuthReq{Data: make([]*cast.UpdateOAuthReq_Info, 0)}
if len(userResp.DisplayNames) == 0 {
//return errors.New("没有授权信息")
authReq.Data = append(authReq.Data, &cast.UpdateOAuthReq_Info{
ArtistUuid: artistUuid,
PlatformID: cast.PlatformIDENUM_UNKNOWN,
AsID: "",
PlatformUserName: "",
AutInfo: "",
})
_, err = service.CastProvider.UpdateOAuth(context.Background(), authReq)
if err != nil {
return errors.New("同步授权信息失败")
}
return nil
}
var asInfoB []byte
for _, v := range userResp.DisplayNames {
asInfoB, _ = json.Marshal(v)
platformIDENUM := cast.PlatformIDENUM(modelCast.NamePlatformIDKv[v.Platform])
if platformIDENUM == cast.PlatformIDENUM_UNKNOWN {
continue
}
authReq.Data = append(authReq.Data, &cast.UpdateOAuthReq_Info{
ArtistUuid: artistUuid,
PlatformID: platformIDENUM,
AsID: v.Id,
PlatformUserName: v.Username,
AutInfo: string(asInfoB),
})
}
if len(authReq.Data) != 0 {
_, err = service.CastProvider.UpdateOAuth(context.Background(), authReq)
if err != nil {
return errors.New("同步授权信息失败")
}
}
return nil
}
func RefreshToken(ctx *gin.Context) {
var req *cast.RefreshTokenReq
var resp *cast.RefreshTokenResp
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
if err = req.Validate(); err != nil {
service.Error(ctx, err)
return
}
if resp, err = service.CastProvider.RefreshToken(ctx, req); err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}
func ArtistInfo(ctx *gin.Context) {
var req *cast.ArtistInfoReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
if err = req.Validate(); err != nil {
service.Error(ctx, err)
return
}
resp, err := service.CastProvider.ArtistInfo(ctx, req)
if err != nil {
service.Error(ctx, err)
return
@ -420,71 +197,7 @@ func ArtistInfo(ctx *gin.Context) {
return
}
func CheckAsProfile(infoResp *accountFiee.UserInfoResponse) error {
var asArtistResp *cast.GetArtistResp
var err error
title := fmt.Sprintf("%s_%s", config.AppConfig.System.AppMode, infoResp.SubNum)
// 查询艺人的信息
if asArtistResp, err = service.CastProvider.GetArtist(context.Background(), &cast.GetArtistReq{
ArtistUuid: fmt.Sprint(infoResp.Id),
}); err != nil {
return err
}
if asArtistResp != nil && asArtistResp.ArtistInfo != nil && asArtistResp.ArtistInfo.ProfileKey != "" {
return nil
}
createProfileResp, err := service.AyrshareProvider.CreateProfile(context.Background(), &aryshare.CreateProfileRequest{
Title: title,
MessagingActive: true,
HideTopHeader: false,
TopHeader: "",
DisableSocial: nil,
Team: false,
Email: "",
SubHeader: "",
Tags: []string{config.AppConfig.System.AppMode},
})
if err != nil {
zap.L().Error("CreateProfile error", zap.Error(err))
err = errors.New("创建平台艺人账号失败")
return err
}
zap.L().Info("CreateProfile success", zap.Any("createProfileResp", createProfileResp), zap.Any("title", title))
_, err = service.CastProvider.UpdateArtist(context.Background(), &cast.UpdateArtistReq{
Uuid: asArtistResp.Uuid,
ArtistInfo: &cast.ArtistInfo{
ArtistUuid: fmt.Sprint(infoResp.Id),
RefID: createProfileResp.RefId,
ProfileKey: createProfileResp.ProfileKey,
SubNum: infoResp.SubNum,
},
})
if err != nil {
return err
}
return nil
}
func SyncAsProfile(ctx *gin.Context) {
var req *modelCast.SyncAsProfileReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
infoResp, err := GetArtistAccountInfo(req.ID)
if err != nil {
service.Error(ctx, err)
return
}
if infoResp.SubNum == "" {
service.Error(ctx, errors.New("用户不存在"))
return
}
if err = CheckAsProfile(infoResp); err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, infoResp)
func Test(ctx *gin.Context) {
service.Success(ctx, nil)
return
}

View File

@ -1,201 +0,0 @@
package cast
import (
"errors"
"fmt"
"fonchain-fiee/api/cast"
"fonchain-fiee/cmd/config"
"fonchain-fiee/pkg/e"
modelCast "fonchain-fiee/pkg/model/cast"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/utils"
"path/filepath"
"time"
"github.com/gin-gonic/gin"
"github.com/xuri/excelize/v2"
)
// UpdatePrompt 更新视频脚本
func UpdatePrompt(ctx *gin.Context) {
var req *cast.UpdatePromptReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
req.PromptUuid = utils.CleanString(req.PromptUuid)
req.Prompt = utils.CleanString(req.Prompt)
newCtx := NewCtxWithUserInfo(ctx)
resp, err := service.CastProvider.UpdatePrompt(newCtx, req)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}
// PromptDetail 获取视频脚本详情
func PromptDetail(ctx *gin.Context) {
var req *cast.GetPromptReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
newCtx := NewCtxWithUserInfo(ctx)
resp, err := service.CastProvider.GetPrompt(newCtx, req)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}
// ListPrompt 获取视频脚本列表
func ListPrompt(ctx *gin.Context) {
var req *cast.ListPromptsReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
newCtx := NewCtxWithUserInfo(ctx)
resp, err := service.CastProvider.ListPrompts(newCtx, req)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}
// DeletePrompt 删除视频脚本
func DeletePrompt(ctx *gin.Context) {
var req *cast.DeletePromptReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
newCtx := NewCtxWithUserInfo(ctx)
_, err = service.CastProvider.DeletePrompt(newCtx, req)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, nil)
return
}
func ImportPromptBatch(ctx *gin.Context) {
excelFile, err := ctx.FormFile("file")
if err != nil {
service.Error(ctx, err)
return
}
tempDir := "./runtime/prompt"
_, err = utils.CheckDirPath(tempDir, true)
if err != nil {
service.Error(ctx, err)
return
}
fileName := fmt.Sprintf("%d_in_prompt.xlsx", time.Now().UnixMicro())
excelPath := filepath.Join(tempDir, fileName)
if err = ctx.SaveUploadedFile(excelFile, excelPath); err != nil {
service.Error(ctx, err)
return
}
//defer os.RemoveAll(excelPath)
excelData, err := excelize.OpenFile(excelPath)
if err != nil {
service.Error(ctx, err)
return
}
defer excelData.Close()
rows, err := excelData.GetRows("Sheet1")
if err != nil {
service.Error(ctx, err)
return
}
req := cast.UpdatePromptBatchReq{
Data: make([]*cast.PromptInfo, 0, len(rows)-1),
}
for line, row := range rows {
if line == 0 {
continue
}
temp := cast.PromptInfo{
LineNo: uint32(line),
}
if len(row) == 0 {
continue
}
// 验证类型
if row[0] == "" {
temp.Remark = "类型不能为空"
req.Data = append(req.Data, &temp)
continue
}
val, ok := modelCast.PromptTitleStrKv[row[0]]
if !ok {
temp.Remark = "类型不合法"
req.Data = append(req.Data, &temp)
continue
}
temp.Category = cast.CategoryENUM(val)
var content string
if len(row) > 1 {
content = row[1]
}
if content == "" {
temp.Remark = "内容不能为空"
req.Data = append(req.Data, &temp)
continue
}
temp.Prompt = utils.CleanString(row[1])
req.Data = append(req.Data, &temp)
}
if len(req.Data) == 0 {
service.Error(ctx, errors.New(e.ErrNoData))
return
}
newCtx := NewCtxWithUserInfo(ctx)
resp, err := service.CastProvider.UpdatePromptBatch(newCtx, &req)
if err != nil {
service.Error(ctx, err)
return
}
var urlResult string
if resp.FailCount != 0 {
hasValueRows := make(map[int]bool, resp.FailCount)
for _, v := range resp.Data {
if !v.Success {
rowNum := int(v.LineNo) + 1
excelData.SetCellValue("Sheet1", fmt.Sprintf("C%d", rowNum), v.Remark)
hasValueRows[rowNum] = true
}
}
for i := len(rows) - 1; i >= 1; i-- { // 从最后一行开始
if !hasValueRows[i+1] {
if err = excelData.RemoveRow("Sheet1", i+1); err != nil {
continue
}
}
}
resultPath := fmt.Sprintf("./runtime/prompt/%s", fileName)
if err = excelData.SaveAs(resultPath); err != nil {
service.Error(ctx, err)
return
}
urlHost := config.AppConfig.System.FieeHost
urlResult = fmt.Sprintf("%s/api/fiee/static/prompt/%s", urlHost, fileName)
}
service.Success(ctx, map[string]interface{}{
"successCount": resp.SuccessCount,
"failCount": resp.FailCount,
"resultUrl": urlResult,
})
}

View File

@ -1,269 +0,0 @@
package cast
import (
"context"
"errors"
"fmt"
"fonchain-fiee/api/accountFiee"
"fonchain-fiee/api/bundle"
"fonchain-fiee/api/cast"
"fonchain-fiee/cmd/config"
"fonchain-fiee/pkg/e"
"fonchain-fiee/pkg/model/login"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/utils"
"path/filepath"
"strconv"
"strings"
"time"
"unicode/utf8"
"github.com/gin-gonic/gin"
"github.com/xuri/excelize/v2"
"go.uber.org/zap"
)
// UpdateVideoScript 更新视频脚本
func UpdateVideoScript(ctx *gin.Context) {
var req *cast.UpdateVideoScriptReq
var infoResp *accountFiee.UserInfoResponse
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
newCtx := NewCtxWithUserInfo(ctx)
artistId, _ := strconv.ParseUint(req.ArtistUuid, 10, 64)
infoResp, err = service.AccountFieeProvider.Info(context.Background(), &accountFiee.InfoRequest{
ID: artistId,
Domain: "app",
})
if err != nil {
service.Error(ctx, err)
return
}
if infoResp.Id == 0 {
service.Error(ctx, errors.New(e.GetMsg(e.NOTDATA)))
return
}
req.ArtistName = infoResp.Name
req.ArtistPhone = infoResp.TelNum
req.ArtistNum = infoResp.SubNum
resp, err := service.CastProvider.UpdateVideoScript(newCtx, req)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}
// GetVideoScript 获取视频脚本详情
func VideoScriptDetail(ctx *gin.Context) {
var req *cast.GetVideoScriptReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
newCtx := NewCtxWithUserInfo(ctx)
resp, err := service.CastProvider.GetVideoScript(newCtx, req)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}
// ListVideoScripts 获取视频脚本列表
func ListVideoScripts(ctx *gin.Context) {
var req *cast.ListVideoScriptsReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
newCtx := NewCtxWithUserInfo(ctx)
resp, err := service.CastProvider.ListVideoScripts(newCtx, req)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}
// DeleteVideoScript 删除视频脚本
func DeleteVideoScript(ctx *gin.Context) {
var req *cast.DeleteVideoScriptReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
newCtx := NewCtxWithUserInfo(ctx)
_, err = service.CastProvider.DeleteVideoScript(newCtx, req)
if err != nil {
service.Error(ctx, err)
return
}
if service.BundleProvider != nil {
if _, e := service.BundleProvider.RevertTaskCompletionByUUIDItem(context.Background(), &bundle.RevertTaskCompletionByUUIDItemRequest{Uuid: req.Uuid}); e != nil {
zap.L().Error("回撤数量失败", zap.Error(e))
}
} else {
zap.L().Warn("BundleProvider is nil, skipping RevertTaskCompletionByUUIDItem")
}
service.Success(ctx, nil)
return
}
func ImportBatch(ctx *gin.Context) {
//接收form表单的Excel保存到本地进行解析
excelFile, err := ctx.FormFile("file")
if err != nil {
service.Error(ctx, err)
return
}
tempDir := "./runtime/script"
_, err = utils.CheckDirPath(tempDir, true)
fileName := time.Now().Format("20060102150405") + "_in_script.xlsx"
excelPath := filepath.Join(tempDir, fileName)
if err = ctx.SaveUploadedFile(excelFile, excelPath); err != nil {
service.Error(ctx, err)
return
}
//defer os.RemoveAll(excelPath)
//读取Excel中的数据
excelData, err := excelize.OpenFile(excelPath)
if err != nil {
service.Error(ctx, err)
return
}
defer excelData.Close()
//解析Excel中的数据
rows, err := excelData.GetRows("Sheet1")
if err != nil {
service.Error(ctx, err)
return
}
req := cast.UpdateVideoScriptBatchReq{
Data: make([]*cast.VideoScriptInfo, 0),
}
userInfo := login.GetUserInfoFromC(ctx)
for line, row := range rows {
if line == 0 {
continue
}
temp := cast.VideoScriptInfo{
CreatorUuid: fmt.Sprint(userInfo.ID),
CreatorName: userInfo.Name,
}
if len(row) > 0 {
temp.ArtistName = row[0]
}
if len(row) > 1 {
temp.ArtistPhone = row[1]
}
if len(row) > 2 {
temp.ArtistNum = row[2]
}
if len(row) > 3 {
temp.Title = row[3]
}
if len(row) > 4 {
temp.Content = row[4]
}
zap.L().Info("SubNumGetInfo row", zap.Int("line", line), zap.Strings("row", row))
if len(row) < 5 || utils.CleanString(row[2]) == "" || utils.CleanString(row[3]) == "" || utils.CleanString(row[4]) == "" {
temp.Remark = "请完整填写"
req.Data = append(req.Data, &temp)
continue
}
if utf8.RuneCountInString(temp.Title) > 50 {
temp.Remark = "脚本标题过长限制50字以内"
req.Data = append(req.Data, &temp)
continue
}
if utf8.RuneCountInString(temp.Content) > 1000 {
temp.Remark = "脚本内容过长限制1000字以内"
req.Data = append(req.Data, &temp)
continue
}
var subInfoResp *accountFiee.UserInfoResponse
subInfoResp, err = service.AccountFieeProvider.SubNumGetInfo(context.Background(), &accountFiee.SubNumGetInfoRequest{
SubNum: row[2],
Domain: "app",
})
if err != nil {
zap.L().Error("AccountFieeProvider.SubNumGetInfo", zap.Error(err))
temp.Remark = err.Error()
} else {
temp.ArtistUuid = fmt.Sprint(subInfoResp.Id)
temp.ArtistName = subInfoResp.Name
temp.ArtistPhone = subInfoResp.TelNum
}
req.Data = append(req.Data, &temp)
}
resp, _err := service.CastProvider.UpdateVideoScriptBatch(context.Background(), &req)
if _err != nil {
service.Error(ctx, err)
return
}
// 打开模板 写入resp 返回的数据
templatePath := "./data/视频脚本导入模板.xlsx"
template, err := excelize.OpenFile(templatePath)
if err != nil {
service.Error(ctx, err)
return
}
defer template.Close()
var urlResult string
if resp.FailCount != 0 {
for i, v := range resp.Data {
if v.Success {
continue
}
template.SetCellValue("Sheet1", fmt.Sprintf("A%d", i+2), v.ArtistName)
template.SetCellValue("Sheet1", fmt.Sprintf("B%d", i+2), v.ArtistPhone)
template.SetCellValue("Sheet1", fmt.Sprintf("C%d", i+2), v.ArtistNum)
template.SetCellValue("Sheet1", fmt.Sprintf("D%d", i+2), v.Title)
template.SetCellValue("Sheet1", fmt.Sprintf("E%d", i+2), v.Content)
template.SetCellValue("Sheet1", fmt.Sprintf("F%d", i+2), v.Remark)
}
resultFilename := strings.Replace(fileName, "_in_script.xlsx", "_out_script.xlsx", -1)
resultPath := fmt.Sprintf("./runtime/script/%s", resultFilename)
if err = template.SaveAs(resultPath); err != nil {
service.Error(ctx, err)
return
}
urlHost := config.AppConfig.System.FieeHost
urlResult = fmt.Sprintf("%s/api/fiee/static/script/%s", urlHost, resultFilename)
}
service.Success(ctx, map[string]interface{}{
"successCount": resp.SuccessCount,
"failCount": resp.FailCount,
"resultUrl": urlResult,
})
return
}
func UpdateScriptApproval(ctx *gin.Context) {
var req *cast.UpdateScriptStatusReq
var err error
if err = ctx.ShouldBind(&req); err != nil {
service.Error(ctx, err)
return
}
newCtx := NewCtxWithUserInfo(ctx)
req.WorkAction = cast.WorkActionENUM_APPROVAL
_, err = service.CastProvider.UpdateScriptStatus(newCtx, req)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, nil)
return
}

View File

@ -1,38 +0,0 @@
package cast
import (
"fmt"
"fonchain-fiee/pkg/service"
"net/url"
"github.com/gin-gonic/gin"
)
func TikTokRedirect(ctx *gin.Context) {
var state, decodeParams, code string
var err error
var values url.Values
fmt.Println(code)
state = ctx.Query("state")
decodeParams, err = url.QueryUnescape(state)
values, err = url.ParseQuery(decodeParams)
if err != nil {
service.Error(ctx, err)
return
}
switch values.Get("source") {
case "authcode":
code = ctx.Query("code")
/*resp, _err := service.CastProvider.OAuthTikTokToken(ctx, &cast.OAuthTikTokTokenReq{
Code: code,
UserID: values.Get("userid"),
})
if _err != nil {
service.Error(ctx, _err)
return
}
service.Success(ctx, resp)*/
}
return
}

View File

@ -1,104 +0,0 @@
package cast
import (
"context"
"fmt"
"fonchain-fiee/api/aryshare"
"fonchain-fiee/api/cast"
"fonchain-fiee/cmd/config"
"fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/utils"
"github.com/gin-gonic/gin"
)
func Test(ctx *gin.Context) {
action := ctx.PostForm("action")
if action == "getPost" {
id := ctx.PostForm("id")
profileKey := ctx.PostForm("profileKey")
resp, err := service.AyrshareProvider.GetPost(context.Background(), &aryshare.GetPostRequest{
Id: id,
ProfileKey: profileKey,
})
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}
if action == "refreshPost" {
err := RefreshPublish()
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, "刷新成功")
return
}
if action == "updateStatus" {
resp, err := service.CastProvider.UpdateStatus(context.Background(), &cast.UpdateStatusReq{
WorkAction: cast.WorkActionENUM_CONFIRM,
WorkUuid: "00059232-3696-4c3e-a960-125955f2d881",
ApprovalID: "",
ConfirmRemark: "",
ConfirmStatus: 1,
ApprovalReply: "",
AutoPublish: 0,
CostType: 1,
})
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}
if action == "dmGet" {
mediaUuid := ctx.PostForm("mediaUuid")
token := ctx.PostForm("token")
_, dmData, err := utils.GetUrl(fmt.Sprintf("https://api.dailymotion.com/video/%s?fields=id,title,url,published,private", mediaUuid),
map[string]string{"Authorization": "Bearer " + token}, config.AppConfig.System.ProxyUrl)
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, dmData)
return
}
if action == "" {
profileKey := ctx.PostForm("profileKey")
resp, err := service.AyrshareProvider.GetUser(context.Background(), &aryshare.GetUserRequest{
ProfileKey: profileKey,
InstagramDetails: true,
})
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}
if action == "getProfile" {
//profileKey := ctx.PostForm("profileKey")
resp, err := service.AyrshareProvider.GetProfiles(context.Background(), &aryshare.GetProfilesRequest{
Title: "",
RefId: "",
HasActiveSocialAccounts: false,
IncludesActiveSocialAccounts: nil,
ActionLog: nil,
Limit: 0,
Cursor: "",
})
if err != nil {
service.Error(ctx, err)
return
}
service.Success(ctx, resp)
return
}
service.Success(ctx, "unknow")
return
}

Some files were not shown because too many files have changed in this diff Show More