feat:新增铸造活动运营图
This commit is contained in:
parent
a671cb7a89
commit
9505244db0
1579
backend/activity.pb.go
Normal file
1579
backend/activity.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
@ -451,6 +451,92 @@ func formatTimestamp(timestamp int64) string {
|
||||
return time.Unix(timestamp, 0).Format("2006-01-02 15:04:05")
|
||||
}
|
||||
|
||||
// GetMintingActivities 获取铸造活动列表(用于运营banner)
|
||||
// @Summary 获取铸造活动列表
|
||||
// @Description 获取铸造活动列表,用于运营banner展示
|
||||
// @Tags minting-activities
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Security BearerAuth
|
||||
// @Param star_id query int64 false "粉丝身份ID,不传则返回所有"
|
||||
// @Param page query int false "页码,默认1"
|
||||
// @Param page_size query int false "每页数量,默认10"
|
||||
// @Success 200 {object} response.Response
|
||||
// @Router /api/v1/minting-activities [get]
|
||||
func (ctrl *ActivityController) GetMintingActivities(c *gin.Context) {
|
||||
// 解析查询参数
|
||||
starIDStr := c.Query("star_id")
|
||||
var starID int64
|
||||
if starIDStr != "" {
|
||||
var err error
|
||||
starID, err = strconv.ParseInt(starIDStr, 10, 64)
|
||||
if err != nil {
|
||||
response.Error(c, http.StatusBadRequest, "star_id 参数错误")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
page, _ := strconv.Atoi(c.DefaultQuery("page", "1"))
|
||||
pageSize, _ := strconv.Atoi(c.DefaultQuery("page_size", "10"))
|
||||
|
||||
logger.Logger.Info("GetMintingActivities request",
|
||||
zap.Int64("star_id", starID),
|
||||
zap.Int("page", page),
|
||||
zap.Int("page_size", pageSize),
|
||||
)
|
||||
|
||||
// 设置上下文
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancel()
|
||||
|
||||
// 调用 RPC
|
||||
resp, err := ctrl.activityService.GetMintingActivities(ctx, &pbActivity.GetMintingActivitiesRequest{
|
||||
StarId: starID,
|
||||
Page: int32(page),
|
||||
PageSize: int32(pageSize),
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
logger.Logger.Error("GetMintingActivities RPC failed", zap.Error(err))
|
||||
response.Error(c, http.StatusInternalServerError, "获取铸造活动列表失败")
|
||||
return
|
||||
}
|
||||
|
||||
if resp.Base.Code != pbCommon.StatusCode_STATUS_OK {
|
||||
response.ErrorWithCode(c, int(resp.Base.Code), resp.Base.Message)
|
||||
return
|
||||
}
|
||||
|
||||
// 转换响应
|
||||
data := convertMintingActivitiesResponse(resp)
|
||||
response.Success(c, data)
|
||||
}
|
||||
|
||||
// convertMintingActivitiesResponse 转换铸造活动列表响应
|
||||
func convertMintingActivitiesResponse(resp *pbActivity.GetMintingActivitiesResponse) map[string]interface{} {
|
||||
activities := make([]map[string]interface{}, 0, len(resp.Activities))
|
||||
for _, activity := range resp.Activities {
|
||||
activities = append(activities, map[string]interface{}{
|
||||
"id": activity.Id,
|
||||
"title": activity.Title,
|
||||
"description": activity.Description,
|
||||
"cover_image": activity.CoverImage,
|
||||
"star_id": activity.StarId,
|
||||
"route": activity.Route,
|
||||
"is_active": activity.IsActive,
|
||||
"created_at": activity.CreatedAt,
|
||||
"updated_at": activity.UpdatedAt,
|
||||
})
|
||||
}
|
||||
|
||||
return map[string]interface{}{
|
||||
"activities": activities,
|
||||
"page": resp.Page,
|
||||
"page_size": resp.PageSize,
|
||||
"total": resp.Total,
|
||||
}
|
||||
}
|
||||
|
||||
// convertActivityListResponse 转换活动列表响应
|
||||
func convertActivityListResponse(resp *pbActivity.GetActivityListResponse) map[string]interface{} {
|
||||
activities := make([]map[string]interface{}, 0, len(resp.Activities))
|
||||
|
||||
@ -242,6 +242,12 @@ func SetupRouter(userClient *client.Client, socialClient *client.Client, assetCl
|
||||
activities.GET("/:id/ranking", activityCtrl.GetContributionRanking) // 获取贡献点排名
|
||||
}
|
||||
|
||||
// 铸造活动相关路由(运营banner)- 公开接口,不需要认证
|
||||
mintingActivities := v1.Group("/minting-activities")
|
||||
{
|
||||
mintingActivities.GET("", activityCtrl.GetMintingActivities) // 获取铸造活动列表
|
||||
}
|
||||
|
||||
// 任务相关路由(需要认证)
|
||||
tasks := v1.Group("/tasks")
|
||||
tasks.Use(middleware.AuthMiddleware())
|
||||
|
||||
@ -1,338 +0,0 @@
|
||||
// Code generated by protoc-gen-triple. DO NOT EDIT.
|
||||
//
|
||||
// Source: proto/gallery.proto
|
||||
package gallery
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
import (
|
||||
"dubbo.apache.org/dubbo-go/v3"
|
||||
"dubbo.apache.org/dubbo-go/v3/client"
|
||||
"dubbo.apache.org/dubbo-go/v3/common"
|
||||
"dubbo.apache.org/dubbo-go/v3/common/constant"
|
||||
"dubbo.apache.org/dubbo-go/v3/protocol/triple/triple_protocol"
|
||||
"dubbo.apache.org/dubbo-go/v3/server"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file and the Triple package
|
||||
// are compatible. If you get a compiler error that this constant is not defined, this code was
|
||||
// generated with a version of Triple newer than the one compiled into your binary. You can fix the
|
||||
// problem by either regenerating this code with an older version of Triple or updating the Triple
|
||||
// version compiled into your binary.
|
||||
const _ = triple_protocol.IsAtLeastVersion0_1_0
|
||||
|
||||
const (
|
||||
// GalleryServiceName is the fully-qualified name of the GalleryService service.
|
||||
GalleryServiceName = "topfans.gallery.GalleryService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
// exposed at runtime as procedure and as the final two segments of the HTTP route.
|
||||
//
|
||||
// Note that these are different from the fully-qualified method names used by
|
||||
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
||||
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
||||
// period.
|
||||
const (
|
||||
// GalleryServiceGetMyGalleryProcedure is the fully-qualified name of the GalleryService's GetMyGallery RPC.
|
||||
GalleryServiceGetMyGalleryProcedure = "/topfans.gallery.GalleryService/GetMyGallery"
|
||||
// GalleryServiceGetUserGalleryProcedure is the fully-qualified name of the GalleryService's GetUserGallery RPC.
|
||||
GalleryServiceGetUserGalleryProcedure = "/topfans.gallery.GalleryService/GetUserGallery"
|
||||
// GalleryServicePlaceAssetProcedure is the fully-qualified name of the GalleryService's PlaceAsset RPC.
|
||||
GalleryServicePlaceAssetProcedure = "/topfans.gallery.GalleryService/PlaceAsset"
|
||||
// GalleryServiceUnlockSlotProcedure is the fully-qualified name of the GalleryService's UnlockSlot RPC.
|
||||
GalleryServiceUnlockSlotProcedure = "/topfans.gallery.GalleryService/UnlockSlot"
|
||||
// GalleryServiceRemoveFromSlotProcedure is the fully-qualified name of the GalleryService's RemoveFromSlot RPC.
|
||||
GalleryServiceRemoveFromSlotProcedure = "/topfans.gallery.GalleryService/RemoveFromSlot"
|
||||
// GalleryServiceGetMyExhibitedAssetsProcedure is the fully-qualified name of the GalleryService's GetMyExhibitedAssets RPC.
|
||||
GalleryServiceGetMyExhibitedAssetsProcedure = "/topfans.gallery.GalleryService/GetMyExhibitedAssets"
|
||||
// GalleryServiceGetInspirationFlowProcedure is the fully-qualified name of the GalleryService's GetInspirationFlow RPC.
|
||||
GalleryServiceGetInspirationFlowProcedure = "/topfans.gallery.GalleryService/GetInspirationFlow"
|
||||
// GalleryServiceGetUserExhibitedAssetsProcedure is the fully-qualified name of the GalleryService's GetUserExhibitedAssets RPC.
|
||||
GalleryServiceGetUserExhibitedAssetsProcedure = "/topfans.gallery.GalleryService/GetUserExhibitedAssets"
|
||||
// GalleryServiceCleanupDisplayStatusProcedure is the fully-qualified name of the GalleryService's CleanupDisplayStatus RPC.
|
||||
GalleryServiceCleanupDisplayStatusProcedure = "/topfans.gallery.GalleryService/CleanupDisplayStatus"
|
||||
)
|
||||
|
||||
var (
|
||||
_ GalleryService = (*GalleryServiceImpl)(nil)
|
||||
)
|
||||
|
||||
// GalleryService is a client for the topfans.gallery.GalleryService service.
|
||||
type GalleryService interface {
|
||||
GetMyGallery(ctx context.Context, req *GetMyGalleryRequest, opts ...client.CallOption) (*GetMyGalleryResponse, error)
|
||||
GetUserGallery(ctx context.Context, req *GetUserGalleryRequest, opts ...client.CallOption) (*GetUserGalleryResponse, error)
|
||||
PlaceAsset(ctx context.Context, req *PlaceAssetRequest, opts ...client.CallOption) (*PlaceAssetResponse, error)
|
||||
UnlockSlot(ctx context.Context, req *UnlockSlotRequest, opts ...client.CallOption) (*UnlockSlotResponse, error)
|
||||
RemoveFromSlot(ctx context.Context, req *RemoveFromSlotRequest, opts ...client.CallOption) (*RemoveFromSlotResponse, error)
|
||||
GetMyExhibitedAssets(ctx context.Context, req *GetMyExhibitedAssetsRequest, opts ...client.CallOption) (*GetMyExhibitedAssetsResponse, error)
|
||||
GetInspirationFlow(ctx context.Context, req *GetInspirationFlowRequest, opts ...client.CallOption) (*GetInspirationFlowResponse, error)
|
||||
GetUserExhibitedAssets(ctx context.Context, req *GetUserExhibitedAssetsRequest, opts ...client.CallOption) (*GetUserExhibitedAssetsResponse, error)
|
||||
CleanupDisplayStatus(ctx context.Context, req *CleanupDisplayStatusRequest, opts ...client.CallOption) (*CleanupDisplayStatusResponse, error)
|
||||
}
|
||||
|
||||
// NewGalleryService constructs a client for the gallery.GalleryService service.
|
||||
func NewGalleryService(cli *client.Client, opts ...client.ReferenceOption) (GalleryService, error) {
|
||||
conn, err := cli.DialWithInfo("topfans.gallery.GalleryService", &GalleryService_ClientInfo, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &GalleryServiceImpl{
|
||||
conn: conn,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func SetConsumerGalleryService(srv common.RPCService) {
|
||||
dubbo.SetConsumerServiceWithInfo(srv, &GalleryService_ClientInfo)
|
||||
}
|
||||
|
||||
// GalleryServiceImpl implements GalleryService.
|
||||
type GalleryServiceImpl struct {
|
||||
conn *client.Connection
|
||||
}
|
||||
|
||||
func (c *GalleryServiceImpl) GetMyGallery(ctx context.Context, req *GetMyGalleryRequest, opts ...client.CallOption) (*GetMyGalleryResponse, error) {
|
||||
resp := new(GetMyGalleryResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetMyGallery", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *GalleryServiceImpl) GetUserGallery(ctx context.Context, req *GetUserGalleryRequest, opts ...client.CallOption) (*GetUserGalleryResponse, error) {
|
||||
resp := new(GetUserGalleryResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetUserGallery", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *GalleryServiceImpl) PlaceAsset(ctx context.Context, req *PlaceAssetRequest, opts ...client.CallOption) (*PlaceAssetResponse, error) {
|
||||
resp := new(PlaceAssetResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "PlaceAsset", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *GalleryServiceImpl) UnlockSlot(ctx context.Context, req *UnlockSlotRequest, opts ...client.CallOption) (*UnlockSlotResponse, error) {
|
||||
resp := new(UnlockSlotResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "UnlockSlot", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *GalleryServiceImpl) RemoveFromSlot(ctx context.Context, req *RemoveFromSlotRequest, opts ...client.CallOption) (*RemoveFromSlotResponse, error) {
|
||||
resp := new(RemoveFromSlotResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "RemoveFromSlot", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *GalleryServiceImpl) GetMyExhibitedAssets(ctx context.Context, req *GetMyExhibitedAssetsRequest, opts ...client.CallOption) (*GetMyExhibitedAssetsResponse, error) {
|
||||
resp := new(GetMyExhibitedAssetsResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetMyExhibitedAssets", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *GalleryServiceImpl) GetInspirationFlow(ctx context.Context, req *GetInspirationFlowRequest, opts ...client.CallOption) (*GetInspirationFlowResponse, error) {
|
||||
resp := new(GetInspirationFlowResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetInspirationFlow", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *GalleryServiceImpl) GetUserExhibitedAssets(ctx context.Context, req *GetUserExhibitedAssetsRequest, opts ...client.CallOption) (*GetUserExhibitedAssetsResponse, error) {
|
||||
resp := new(GetUserExhibitedAssetsResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetUserExhibitedAssets", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *GalleryServiceImpl) CleanupDisplayStatus(ctx context.Context, req *CleanupDisplayStatusRequest, opts ...client.CallOption) (*CleanupDisplayStatusResponse, error) {
|
||||
resp := new(CleanupDisplayStatusResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "CleanupDisplayStatus", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
var GalleryService_ClientInfo = client.ClientInfo{
|
||||
InterfaceName: "topfans.gallery.GalleryService",
|
||||
MethodNames: []string{"GetMyGallery", "GetUserGallery", "PlaceAsset", "UnlockSlot", "RemoveFromSlot", "GetMyExhibitedAssets", "GetInspirationFlow", "GetUserExhibitedAssets", "CleanupDisplayStatus"},
|
||||
ConnectionInjectFunc: func(dubboCliRaw interface{}, conn *client.Connection) {
|
||||
dubboCli := dubboCliRaw.(*GalleryServiceImpl)
|
||||
dubboCli.conn = conn
|
||||
},
|
||||
}
|
||||
|
||||
// GalleryServiceHandler is an implementation of the topfans.gallery.GalleryService service.
|
||||
type GalleryServiceHandler interface {
|
||||
GetMyGallery(context.Context, *GetMyGalleryRequest) (*GetMyGalleryResponse, error)
|
||||
GetUserGallery(context.Context, *GetUserGalleryRequest) (*GetUserGalleryResponse, error)
|
||||
PlaceAsset(context.Context, *PlaceAssetRequest) (*PlaceAssetResponse, error)
|
||||
UnlockSlot(context.Context, *UnlockSlotRequest) (*UnlockSlotResponse, error)
|
||||
RemoveFromSlot(context.Context, *RemoveFromSlotRequest) (*RemoveFromSlotResponse, error)
|
||||
GetMyExhibitedAssets(context.Context, *GetMyExhibitedAssetsRequest) (*GetMyExhibitedAssetsResponse, error)
|
||||
GetInspirationFlow(context.Context, *GetInspirationFlowRequest) (*GetInspirationFlowResponse, error)
|
||||
GetUserExhibitedAssets(context.Context, *GetUserExhibitedAssetsRequest) (*GetUserExhibitedAssetsResponse, error)
|
||||
CleanupDisplayStatus(context.Context, *CleanupDisplayStatusRequest) (*CleanupDisplayStatusResponse, error)
|
||||
}
|
||||
|
||||
func RegisterGalleryServiceHandler(srv *server.Server, hdlr GalleryServiceHandler, opts ...server.ServiceOption) error {
|
||||
return srv.Register(hdlr, &GalleryService_ServiceInfo, opts...)
|
||||
}
|
||||
|
||||
func SetProviderGalleryService(srv common.RPCService) {
|
||||
dubbo.SetProviderServiceWithInfo(srv, &GalleryService_ServiceInfo)
|
||||
}
|
||||
|
||||
var GalleryService_ServiceInfo = server.ServiceInfo{
|
||||
InterfaceName: "topfans.gallery.GalleryService",
|
||||
ServiceType: (*GalleryServiceHandler)(nil),
|
||||
Methods: []server.MethodInfo{
|
||||
{
|
||||
Name: "GetMyGallery",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(GetMyGalleryRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*GetMyGalleryRequest)
|
||||
res, err := handler.(GalleryServiceHandler).GetMyGallery(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "GetUserGallery",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(GetUserGalleryRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*GetUserGalleryRequest)
|
||||
res, err := handler.(GalleryServiceHandler).GetUserGallery(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "PlaceAsset",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(PlaceAssetRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*PlaceAssetRequest)
|
||||
res, err := handler.(GalleryServiceHandler).PlaceAsset(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "UnlockSlot",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(UnlockSlotRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*UnlockSlotRequest)
|
||||
res, err := handler.(GalleryServiceHandler).UnlockSlot(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "RemoveFromSlot",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(RemoveFromSlotRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*RemoveFromSlotRequest)
|
||||
res, err := handler.(GalleryServiceHandler).RemoveFromSlot(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "GetMyExhibitedAssets",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(GetMyExhibitedAssetsRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*GetMyExhibitedAssetsRequest)
|
||||
res, err := handler.(GalleryServiceHandler).GetMyExhibitedAssets(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "GetInspirationFlow",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(GetInspirationFlowRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*GetInspirationFlowRequest)
|
||||
res, err := handler.(GalleryServiceHandler).GetInspirationFlow(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "GetUserExhibitedAssets",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(GetUserExhibitedAssetsRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*GetUserExhibitedAssetsRequest)
|
||||
res, err := handler.(GalleryServiceHandler).GetUserExhibitedAssets(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "CleanupDisplayStatus",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(CleanupDisplayStatusRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*CleanupDisplayStatusRequest)
|
||||
res, err := handler.(GalleryServiceHandler).CleanupDisplayStatus(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
19
backend/pkg/models/minting_activity.go
Normal file
19
backend/pkg/models/minting_activity.go
Normal file
@ -0,0 +1,19 @@
|
||||
package models
|
||||
|
||||
// MintingActivity 铸造活动表(运营banner)
|
||||
type MintingActivity struct {
|
||||
ID int64 `json:"id" gorm:"primaryKey;autoIncrement"`
|
||||
Title string `json:"title" gorm:"size:100;not null"`
|
||||
Description string `json:"description" gorm:"type:text"`
|
||||
CoverImage string `json:"cover_image" gorm:"size:500"`
|
||||
StarID int64 `json:"star_id" gorm:"not null"`
|
||||
Route string `json:"route" gorm:"size:200"`
|
||||
IsActive bool `json:"is_active" gorm:"default:true"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
}
|
||||
|
||||
// TableName 表名
|
||||
func (MintingActivity) TableName() string {
|
||||
return "minting_activities"
|
||||
}
|
||||
@ -1104,6 +1104,253 @@ func (x *GetProgressResponse) GetStatus() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// 铸造活动信息(用于运营banner)
|
||||
type MintingActivity struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
|
||||
CoverImage string `protobuf:"bytes,4,opt,name=cover_image,json=coverImage,proto3" json:"cover_image,omitempty"`
|
||||
StarId int64 `protobuf:"varint,5,opt,name=star_id,json=starId,proto3" json:"star_id,omitempty"`
|
||||
Route string `protobuf:"bytes,6,opt,name=route,proto3" json:"route,omitempty"`
|
||||
IsActive bool `protobuf:"varint,7,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"`
|
||||
CreatedAt int64 `protobuf:"varint,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
|
||||
UpdatedAt int64 `protobuf:"varint,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *MintingActivity) Reset() {
|
||||
*x = MintingActivity{}
|
||||
mi := &file_activity_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *MintingActivity) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MintingActivity) ProtoMessage() {}
|
||||
|
||||
func (x *MintingActivity) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_activity_proto_msgTypes[13]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use MintingActivity.ProtoReflect.Descriptor instead.
|
||||
func (*MintingActivity) Descriptor() ([]byte, []int) {
|
||||
return file_activity_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
func (x *MintingActivity) GetId() int64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MintingActivity) GetTitle() string {
|
||||
if x != nil {
|
||||
return x.Title
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MintingActivity) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MintingActivity) GetCoverImage() string {
|
||||
if x != nil {
|
||||
return x.CoverImage
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MintingActivity) GetStarId() int64 {
|
||||
if x != nil {
|
||||
return x.StarId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MintingActivity) GetRoute() string {
|
||||
if x != nil {
|
||||
return x.Route
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MintingActivity) GetIsActive() bool {
|
||||
if x != nil {
|
||||
return x.IsActive
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *MintingActivity) GetCreatedAt() int64 {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MintingActivity) GetUpdatedAt() int64 {
|
||||
if x != nil {
|
||||
return x.UpdatedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 获取铸造活动列表请求
|
||||
type GetMintingActivitiesRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
StarId int64 `protobuf:"varint,1,opt,name=star_id,json=starId,proto3" json:"star_id,omitempty"` // 可选,不传则返回所有
|
||||
Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"`
|
||||
PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetMintingActivitiesRequest) Reset() {
|
||||
*x = GetMintingActivitiesRequest{}
|
||||
mi := &file_activity_proto_msgTypes[14]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetMintingActivitiesRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetMintingActivitiesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetMintingActivitiesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_activity_proto_msgTypes[14]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetMintingActivitiesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetMintingActivitiesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_activity_proto_rawDescGZIP(), []int{14}
|
||||
}
|
||||
|
||||
func (x *GetMintingActivitiesRequest) GetStarId() int64 {
|
||||
if x != nil {
|
||||
return x.StarId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetMintingActivitiesRequest) GetPage() int32 {
|
||||
if x != nil {
|
||||
return x.Page
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetMintingActivitiesRequest) GetPageSize() int32 {
|
||||
if x != nil {
|
||||
return x.PageSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 获取铸造活动列表响应
|
||||
type GetMintingActivitiesResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Base *common.BaseResponse `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
|
||||
Activities []*MintingActivity `protobuf:"bytes,2,rep,name=activities,proto3" json:"activities,omitempty"`
|
||||
Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
|
||||
PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
|
||||
Total int32 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetMintingActivitiesResponse) Reset() {
|
||||
*x = GetMintingActivitiesResponse{}
|
||||
mi := &file_activity_proto_msgTypes[15]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetMintingActivitiesResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetMintingActivitiesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetMintingActivitiesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_activity_proto_msgTypes[15]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetMintingActivitiesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetMintingActivitiesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_activity_proto_rawDescGZIP(), []int{15}
|
||||
}
|
||||
|
||||
func (x *GetMintingActivitiesResponse) GetBase() *common.BaseResponse {
|
||||
if x != nil {
|
||||
return x.Base
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GetMintingActivitiesResponse) GetActivities() []*MintingActivity {
|
||||
if x != nil {
|
||||
return x.Activities
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GetMintingActivitiesResponse) GetPage() int32 {
|
||||
if x != nil {
|
||||
return x.Page
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetMintingActivitiesResponse) GetPageSize() int32 {
|
||||
if x != nil {
|
||||
return x.PageSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetMintingActivitiesResponse) GetTotal() int32 {
|
||||
if x != nil {
|
||||
return x.Total
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_activity_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_activity_proto_rawDesc = "" +
|
||||
@ -1207,14 +1454,40 @@ const file_activity_proto_rawDesc = "" +
|
||||
"\x0ftarget_progress\x18\x04 \x01(\x03R\x0etargetProgress\x12#\n" +
|
||||
"\rcurrent_stage\x18\x05 \x01(\tR\fcurrentStage\x12\x19\n" +
|
||||
"\bend_time\x18\x06 \x01(\x03R\aendTime\x12\x16\n" +
|
||||
"\x06status\x18\a \x01(\tR\x06status2\xf5\x06\n" +
|
||||
"\x06status\x18\a \x01(\tR\x06status\"\x84\x02\n" +
|
||||
"\x0fMintingActivity\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x14\n" +
|
||||
"\x05title\x18\x02 \x01(\tR\x05title\x12 \n" +
|
||||
"\vdescription\x18\x03 \x01(\tR\vdescription\x12\x1f\n" +
|
||||
"\vcover_image\x18\x04 \x01(\tR\n" +
|
||||
"coverImage\x12\x17\n" +
|
||||
"\astar_id\x18\x05 \x01(\x03R\x06starId\x12\x14\n" +
|
||||
"\x05route\x18\x06 \x01(\tR\x05route\x12\x1b\n" +
|
||||
"\tis_active\x18\a \x01(\bR\bisActive\x12\x1d\n" +
|
||||
"\n" +
|
||||
"created_at\x18\b \x01(\x03R\tcreatedAt\x12\x1d\n" +
|
||||
"\n" +
|
||||
"updated_at\x18\t \x01(\x03R\tupdatedAt\"g\n" +
|
||||
"\x1bGetMintingActivitiesRequest\x12\x17\n" +
|
||||
"\astar_id\x18\x01 \x01(\x03R\x06starId\x12\x12\n" +
|
||||
"\x04page\x18\x02 \x01(\x05R\x04page\x12\x1b\n" +
|
||||
"\tpage_size\x18\x03 \x01(\x05R\bpageSize\"\xda\x01\n" +
|
||||
"\x1cGetMintingActivitiesResponse\x120\n" +
|
||||
"\x04base\x18\x01 \x01(\v2\x1c.topfans.common.BaseResponseR\x04base\x12A\n" +
|
||||
"\n" +
|
||||
"activities\x18\x02 \x03(\v2!.topfans.activity.MintingActivityR\n" +
|
||||
"activities\x12\x12\n" +
|
||||
"\x04page\x18\x03 \x01(\x05R\x04page\x12\x1b\n" +
|
||||
"\tpage_size\x18\x04 \x01(\x05R\bpageSize\x12\x14\n" +
|
||||
"\x05total\x18\x05 \x01(\x05R\x05total2\x91\b\n" +
|
||||
"\x0fActivityService\x12\x82\x01\n" +
|
||||
"\x0fGetActivityList\x12(.topfans.activity.GetActivityListRequest\x1a).topfans.activity.GetActivityListResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\x12\x12/api/v1/activities\x12y\n" +
|
||||
"\vGetActivity\x12$.topfans.activity.GetProgressRequest\x1a\x1a.topfans.activity.Activity\"(\x82\xd3\xe4\x93\x02\"\x12 /api/v1/activities/{activity_id}\x12\x91\x01\n" +
|
||||
"\x10GetActivityItems\x12$.topfans.activity.GetProgressRequest\x1a'.topfans.activity.ActivityItemsResponse\".\x82\xd3\xe4\x93\x02(\x12&/api/v1/activities/{activity_id}/items\x12\x8d\x01\n" +
|
||||
"\vGetProgress\x12$.topfans.activity.GetProgressRequest\x1a%.topfans.activity.GetProgressResponse\"1\x82\xd3\xe4\x93\x02+\x12)/api/v1/activities/{activity_id}/progress\x12\x93\x01\n" +
|
||||
"\fPurchaseItem\x12%.topfans.activity.PurchaseItemRequest\x1a&.topfans.activity.PurchaseItemResponse\"4\x82\xd3\xe4\x93\x02.:\x01*\")/api/v1/activities/{activity_id}/purchase\x12\xa7\x01\n" +
|
||||
"\x16GetContributionRanking\x12,.topfans.activity.ContributionRankingRequest\x1a-.topfans.activity.ContributionRankingResponse\"0\x82\xd3\xe4\x93\x02*\x12(/api/v1/activities/{activity_id}/rankingB8Z6github.com/topfans/backend/pkg/proto/activity;activityb\x06proto3"
|
||||
"\x16GetContributionRanking\x12,.topfans.activity.ContributionRankingRequest\x1a-.topfans.activity.ContributionRankingResponse\"0\x82\xd3\xe4\x93\x02*\x12(/api/v1/activities/{activity_id}/ranking\x12\x99\x01\n" +
|
||||
"\x14GetMintingActivities\x12-.topfans.activity.GetMintingActivitiesRequest\x1a..topfans.activity.GetMintingActivitiesResponse\"\"\x82\xd3\xe4\x93\x02\x1c\x12\x1a/api/v1/minting-activitiesB8Z6github.com/topfans/backend/pkg/proto/activity;activityb\x06proto3"
|
||||
|
||||
var (
|
||||
file_activity_proto_rawDescOnce sync.Once
|
||||
@ -1228,50 +1501,57 @@ func file_activity_proto_rawDescGZIP() []byte {
|
||||
return file_activity_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_activity_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
|
||||
var file_activity_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
|
||||
var file_activity_proto_goTypes = []any{
|
||||
(*Activity)(nil), // 0: topfans.activity.Activity
|
||||
(*ActivityItem)(nil), // 1: topfans.activity.ActivityItem
|
||||
(*ActivityItemsResponse)(nil), // 2: topfans.activity.ActivityItemsResponse
|
||||
(*PurchaseItemRequest)(nil), // 3: topfans.activity.PurchaseItemRequest
|
||||
(*PurchaseItemResponse)(nil), // 4: topfans.activity.PurchaseItemResponse
|
||||
(*ContributionRankingRequest)(nil), // 5: topfans.activity.ContributionRankingRequest
|
||||
(*ContributionRankingItem)(nil), // 6: topfans.activity.ContributionRankingItem
|
||||
(*ContributionRankingResponse)(nil), // 7: topfans.activity.ContributionRankingResponse
|
||||
(*MyContribution)(nil), // 8: topfans.activity.MyContribution
|
||||
(*GetActivityListRequest)(nil), // 9: topfans.activity.GetActivityListRequest
|
||||
(*GetActivityListResponse)(nil), // 10: topfans.activity.GetActivityListResponse
|
||||
(*GetProgressRequest)(nil), // 11: topfans.activity.GetProgressRequest
|
||||
(*GetProgressResponse)(nil), // 12: topfans.activity.GetProgressResponse
|
||||
(*common.BaseResponse)(nil), // 13: topfans.common.BaseResponse
|
||||
(*Activity)(nil), // 0: topfans.activity.Activity
|
||||
(*ActivityItem)(nil), // 1: topfans.activity.ActivityItem
|
||||
(*ActivityItemsResponse)(nil), // 2: topfans.activity.ActivityItemsResponse
|
||||
(*PurchaseItemRequest)(nil), // 3: topfans.activity.PurchaseItemRequest
|
||||
(*PurchaseItemResponse)(nil), // 4: topfans.activity.PurchaseItemResponse
|
||||
(*ContributionRankingRequest)(nil), // 5: topfans.activity.ContributionRankingRequest
|
||||
(*ContributionRankingItem)(nil), // 6: topfans.activity.ContributionRankingItem
|
||||
(*ContributionRankingResponse)(nil), // 7: topfans.activity.ContributionRankingResponse
|
||||
(*MyContribution)(nil), // 8: topfans.activity.MyContribution
|
||||
(*GetActivityListRequest)(nil), // 9: topfans.activity.GetActivityListRequest
|
||||
(*GetActivityListResponse)(nil), // 10: topfans.activity.GetActivityListResponse
|
||||
(*GetProgressRequest)(nil), // 11: topfans.activity.GetProgressRequest
|
||||
(*GetProgressResponse)(nil), // 12: topfans.activity.GetProgressResponse
|
||||
(*MintingActivity)(nil), // 13: topfans.activity.MintingActivity
|
||||
(*GetMintingActivitiesRequest)(nil), // 14: topfans.activity.GetMintingActivitiesRequest
|
||||
(*GetMintingActivitiesResponse)(nil), // 15: topfans.activity.GetMintingActivitiesResponse
|
||||
(*common.BaseResponse)(nil), // 16: topfans.common.BaseResponse
|
||||
}
|
||||
var file_activity_proto_depIdxs = []int32{
|
||||
1, // 0: topfans.activity.Activity.items:type_name -> topfans.activity.ActivityItem
|
||||
1, // 1: topfans.activity.ActivityItemsResponse.items:type_name -> topfans.activity.ActivityItem
|
||||
13, // 2: topfans.activity.PurchaseItemResponse.base:type_name -> topfans.common.BaseResponse
|
||||
13, // 3: topfans.activity.ContributionRankingResponse.base:type_name -> topfans.common.BaseResponse
|
||||
16, // 2: topfans.activity.PurchaseItemResponse.base:type_name -> topfans.common.BaseResponse
|
||||
16, // 3: topfans.activity.ContributionRankingResponse.base:type_name -> topfans.common.BaseResponse
|
||||
6, // 4: topfans.activity.ContributionRankingResponse.items:type_name -> topfans.activity.ContributionRankingItem
|
||||
8, // 5: topfans.activity.ContributionRankingResponse.my_contribution:type_name -> topfans.activity.MyContribution
|
||||
13, // 6: topfans.activity.GetActivityListResponse.base:type_name -> topfans.common.BaseResponse
|
||||
16, // 6: topfans.activity.GetActivityListResponse.base:type_name -> topfans.common.BaseResponse
|
||||
0, // 7: topfans.activity.GetActivityListResponse.activities:type_name -> topfans.activity.Activity
|
||||
13, // 8: topfans.activity.GetProgressResponse.base:type_name -> topfans.common.BaseResponse
|
||||
9, // 9: topfans.activity.ActivityService.GetActivityList:input_type -> topfans.activity.GetActivityListRequest
|
||||
11, // 10: topfans.activity.ActivityService.GetActivity:input_type -> topfans.activity.GetProgressRequest
|
||||
11, // 11: topfans.activity.ActivityService.GetActivityItems:input_type -> topfans.activity.GetProgressRequest
|
||||
11, // 12: topfans.activity.ActivityService.GetProgress:input_type -> topfans.activity.GetProgressRequest
|
||||
3, // 13: topfans.activity.ActivityService.PurchaseItem:input_type -> topfans.activity.PurchaseItemRequest
|
||||
5, // 14: topfans.activity.ActivityService.GetContributionRanking:input_type -> topfans.activity.ContributionRankingRequest
|
||||
10, // 15: topfans.activity.ActivityService.GetActivityList:output_type -> topfans.activity.GetActivityListResponse
|
||||
0, // 16: topfans.activity.ActivityService.GetActivity:output_type -> topfans.activity.Activity
|
||||
2, // 17: topfans.activity.ActivityService.GetActivityItems:output_type -> topfans.activity.ActivityItemsResponse
|
||||
12, // 18: topfans.activity.ActivityService.GetProgress:output_type -> topfans.activity.GetProgressResponse
|
||||
4, // 19: topfans.activity.ActivityService.PurchaseItem:output_type -> topfans.activity.PurchaseItemResponse
|
||||
7, // 20: topfans.activity.ActivityService.GetContributionRanking:output_type -> topfans.activity.ContributionRankingResponse
|
||||
15, // [15:21] is the sub-list for method output_type
|
||||
9, // [9:15] is the sub-list for method input_type
|
||||
9, // [9:9] is the sub-list for extension type_name
|
||||
9, // [9:9] is the sub-list for extension extendee
|
||||
0, // [0:9] is the sub-list for field type_name
|
||||
16, // 8: topfans.activity.GetProgressResponse.base:type_name -> topfans.common.BaseResponse
|
||||
16, // 9: topfans.activity.GetMintingActivitiesResponse.base:type_name -> topfans.common.BaseResponse
|
||||
13, // 10: topfans.activity.GetMintingActivitiesResponse.activities:type_name -> topfans.activity.MintingActivity
|
||||
9, // 11: topfans.activity.ActivityService.GetActivityList:input_type -> topfans.activity.GetActivityListRequest
|
||||
11, // 12: topfans.activity.ActivityService.GetActivity:input_type -> topfans.activity.GetProgressRequest
|
||||
11, // 13: topfans.activity.ActivityService.GetActivityItems:input_type -> topfans.activity.GetProgressRequest
|
||||
11, // 14: topfans.activity.ActivityService.GetProgress:input_type -> topfans.activity.GetProgressRequest
|
||||
3, // 15: topfans.activity.ActivityService.PurchaseItem:input_type -> topfans.activity.PurchaseItemRequest
|
||||
5, // 16: topfans.activity.ActivityService.GetContributionRanking:input_type -> topfans.activity.ContributionRankingRequest
|
||||
14, // 17: topfans.activity.ActivityService.GetMintingActivities:input_type -> topfans.activity.GetMintingActivitiesRequest
|
||||
10, // 18: topfans.activity.ActivityService.GetActivityList:output_type -> topfans.activity.GetActivityListResponse
|
||||
0, // 19: topfans.activity.ActivityService.GetActivity:output_type -> topfans.activity.Activity
|
||||
2, // 20: topfans.activity.ActivityService.GetActivityItems:output_type -> topfans.activity.ActivityItemsResponse
|
||||
12, // 21: topfans.activity.ActivityService.GetProgress:output_type -> topfans.activity.GetProgressResponse
|
||||
4, // 22: topfans.activity.ActivityService.PurchaseItem:output_type -> topfans.activity.PurchaseItemResponse
|
||||
7, // 23: topfans.activity.ActivityService.GetContributionRanking:output_type -> topfans.activity.ContributionRankingResponse
|
||||
15, // 24: topfans.activity.ActivityService.GetMintingActivities:output_type -> topfans.activity.GetMintingActivitiesResponse
|
||||
18, // [18:25] is the sub-list for method output_type
|
||||
11, // [11:18] is the sub-list for method input_type
|
||||
11, // [11:11] is the sub-list for extension type_name
|
||||
11, // [11:11] is the sub-list for extension extendee
|
||||
0, // [0:11] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_activity_proto_init() }
|
||||
@ -1285,7 +1565,7 @@ func file_activity_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_activity_proto_rawDesc), len(file_activity_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 13,
|
||||
NumMessages: 16,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-triple. DO NOT EDIT.
|
||||
//
|
||||
// Source: proto/activity.proto
|
||||
// Source: activity.proto
|
||||
package activity
|
||||
|
||||
import (
|
||||
@ -48,6 +48,8 @@ const (
|
||||
ActivityServicePurchaseItemProcedure = "/topfans.activity.ActivityService/PurchaseItem"
|
||||
// ActivityServiceGetContributionRankingProcedure is the fully-qualified name of the ActivityService's GetContributionRanking RPC.
|
||||
ActivityServiceGetContributionRankingProcedure = "/topfans.activity.ActivityService/GetContributionRanking"
|
||||
// ActivityServiceGetMintingActivitiesProcedure is the fully-qualified name of the ActivityService's GetMintingActivities RPC.
|
||||
ActivityServiceGetMintingActivitiesProcedure = "/topfans.activity.ActivityService/GetMintingActivities"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -62,6 +64,7 @@ type ActivityService interface {
|
||||
GetProgress(ctx context.Context, req *GetProgressRequest, opts ...client.CallOption) (*GetProgressResponse, error)
|
||||
PurchaseItem(ctx context.Context, req *PurchaseItemRequest, opts ...client.CallOption) (*PurchaseItemResponse, error)
|
||||
GetContributionRanking(ctx context.Context, req *ContributionRankingRequest, opts ...client.CallOption) (*ContributionRankingResponse, error)
|
||||
GetMintingActivities(ctx context.Context, req *GetMintingActivitiesRequest, opts ...client.CallOption) (*GetMintingActivitiesResponse, error)
|
||||
}
|
||||
|
||||
// NewActivityService constructs a client for the activity.ActivityService service.
|
||||
@ -132,9 +135,17 @@ func (c *ActivityServiceImpl) GetContributionRanking(ctx context.Context, req *C
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (c *ActivityServiceImpl) GetMintingActivities(ctx context.Context, req *GetMintingActivitiesRequest, opts ...client.CallOption) (*GetMintingActivitiesResponse, error) {
|
||||
resp := new(GetMintingActivitiesResponse)
|
||||
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetMintingActivities", opts...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
var ActivityService_ClientInfo = client.ClientInfo{
|
||||
InterfaceName: "topfans.activity.ActivityService",
|
||||
MethodNames: []string{"GetActivityList", "GetActivity", "GetActivityItems", "GetProgress", "PurchaseItem", "GetContributionRanking"},
|
||||
MethodNames: []string{"GetActivityList", "GetActivity", "GetActivityItems", "GetProgress", "PurchaseItem", "GetContributionRanking", "GetMintingActivities"},
|
||||
ConnectionInjectFunc: func(dubboCliRaw interface{}, conn *client.Connection) {
|
||||
dubboCli := dubboCliRaw.(*ActivityServiceImpl)
|
||||
dubboCli.conn = conn
|
||||
@ -149,6 +160,7 @@ type ActivityServiceHandler interface {
|
||||
GetProgress(context.Context, *GetProgressRequest) (*GetProgressResponse, error)
|
||||
PurchaseItem(context.Context, *PurchaseItemRequest) (*PurchaseItemResponse, error)
|
||||
GetContributionRanking(context.Context, *ContributionRankingRequest) (*ContributionRankingResponse, error)
|
||||
GetMintingActivities(context.Context, *GetMintingActivitiesRequest) (*GetMintingActivitiesResponse, error)
|
||||
}
|
||||
|
||||
func RegisterActivityServiceHandler(srv *server.Server, hdlr ActivityServiceHandler, opts ...server.ServiceOption) error {
|
||||
@ -253,5 +265,20 @@ var ActivityService_ServiceInfo = server.ServiceInfo{
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "GetMintingActivities",
|
||||
Type: constant.CallUnary,
|
||||
ReqInitFunc: func() interface{} {
|
||||
return new(GetMintingActivitiesRequest)
|
||||
},
|
||||
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
||||
req := args[0].(*GetMintingActivitiesRequest)
|
||||
res, err := handler.(ActivityServiceHandler).GetMintingActivities(ctx, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return triple_protocol.NewResponse(res), nil
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v7.34.0
|
||||
// source: proto/gallery.proto
|
||||
// source: gallery.proto
|
||||
|
||||
package gallery
|
||||
|
||||
@ -32,7 +32,7 @@ type GetMyGalleryRequest struct {
|
||||
|
||||
func (x *GetMyGalleryRequest) Reset() {
|
||||
*x = GetMyGalleryRequest{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[0]
|
||||
mi := &file_gallery_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -44,7 +44,7 @@ func (x *GetMyGalleryRequest) String() string {
|
||||
func (*GetMyGalleryRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetMyGalleryRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[0]
|
||||
mi := &file_gallery_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -57,7 +57,7 @@ func (x *GetMyGalleryRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetMyGalleryRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetMyGalleryRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{0}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
type GetMyGalleryResponse struct {
|
||||
@ -70,7 +70,7 @@ type GetMyGalleryResponse struct {
|
||||
|
||||
func (x *GetMyGalleryResponse) Reset() {
|
||||
*x = GetMyGalleryResponse{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[1]
|
||||
mi := &file_gallery_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -82,7 +82,7 @@ func (x *GetMyGalleryResponse) String() string {
|
||||
func (*GetMyGalleryResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetMyGalleryResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[1]
|
||||
mi := &file_gallery_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -95,7 +95,7 @@ func (x *GetMyGalleryResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetMyGalleryResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetMyGalleryResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{1}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetMyGalleryResponse) GetBase() *common.BaseResponse {
|
||||
@ -121,7 +121,7 @@ type GetUserGalleryRequest struct {
|
||||
|
||||
func (x *GetUserGalleryRequest) Reset() {
|
||||
*x = GetUserGalleryRequest{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[2]
|
||||
mi := &file_gallery_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -133,7 +133,7 @@ func (x *GetUserGalleryRequest) String() string {
|
||||
func (*GetUserGalleryRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetUserGalleryRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[2]
|
||||
mi := &file_gallery_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -146,7 +146,7 @@ func (x *GetUserGalleryRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetUserGalleryRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetUserGalleryRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{2}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *GetUserGalleryRequest) GetTargetUid() int64 {
|
||||
@ -166,7 +166,7 @@ type GetUserGalleryResponse struct {
|
||||
|
||||
func (x *GetUserGalleryResponse) Reset() {
|
||||
*x = GetUserGalleryResponse{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[3]
|
||||
mi := &file_gallery_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -178,7 +178,7 @@ func (x *GetUserGalleryResponse) String() string {
|
||||
func (*GetUserGalleryResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetUserGalleryResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[3]
|
||||
mi := &file_gallery_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -191,7 +191,7 @@ func (x *GetUserGalleryResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetUserGalleryResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetUserGalleryResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{3}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *GetUserGalleryResponse) GetBase() *common.BaseResponse {
|
||||
@ -219,7 +219,7 @@ type PlaceAssetRequest struct {
|
||||
|
||||
func (x *PlaceAssetRequest) Reset() {
|
||||
*x = PlaceAssetRequest{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[4]
|
||||
mi := &file_gallery_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -231,7 +231,7 @@ func (x *PlaceAssetRequest) String() string {
|
||||
func (*PlaceAssetRequest) ProtoMessage() {}
|
||||
|
||||
func (x *PlaceAssetRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[4]
|
||||
mi := &file_gallery_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -244,7 +244,7 @@ func (x *PlaceAssetRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use PlaceAssetRequest.ProtoReflect.Descriptor instead.
|
||||
func (*PlaceAssetRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{4}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *PlaceAssetRequest) GetAssetId() int64 {
|
||||
@ -278,7 +278,7 @@ type PlaceAssetResponse struct {
|
||||
|
||||
func (x *PlaceAssetResponse) Reset() {
|
||||
*x = PlaceAssetResponse{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[5]
|
||||
mi := &file_gallery_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -290,7 +290,7 @@ func (x *PlaceAssetResponse) String() string {
|
||||
func (*PlaceAssetResponse) ProtoMessage() {}
|
||||
|
||||
func (x *PlaceAssetResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[5]
|
||||
mi := &file_gallery_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -303,7 +303,7 @@ func (x *PlaceAssetResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use PlaceAssetResponse.ProtoReflect.Descriptor instead.
|
||||
func (*PlaceAssetResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{5}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *PlaceAssetResponse) GetBase() *common.BaseResponse {
|
||||
@ -328,7 +328,7 @@ type UnlockSlotRequest struct {
|
||||
|
||||
func (x *UnlockSlotRequest) Reset() {
|
||||
*x = UnlockSlotRequest{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[6]
|
||||
mi := &file_gallery_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -340,7 +340,7 @@ func (x *UnlockSlotRequest) String() string {
|
||||
func (*UnlockSlotRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UnlockSlotRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[6]
|
||||
mi := &file_gallery_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -353,7 +353,7 @@ func (x *UnlockSlotRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UnlockSlotRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UnlockSlotRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{6}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
type UnlockSlotResponse struct {
|
||||
@ -366,7 +366,7 @@ type UnlockSlotResponse struct {
|
||||
|
||||
func (x *UnlockSlotResponse) Reset() {
|
||||
*x = UnlockSlotResponse{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[7]
|
||||
mi := &file_gallery_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -378,7 +378,7 @@ func (x *UnlockSlotResponse) String() string {
|
||||
func (*UnlockSlotResponse) ProtoMessage() {}
|
||||
|
||||
func (x *UnlockSlotResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[7]
|
||||
mi := &file_gallery_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -391,7 +391,7 @@ func (x *UnlockSlotResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UnlockSlotResponse.ProtoReflect.Descriptor instead.
|
||||
func (*UnlockSlotResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{7}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *UnlockSlotResponse) GetBase() *common.BaseResponse {
|
||||
@ -421,7 +421,7 @@ type GalleryData struct {
|
||||
|
||||
func (x *GalleryData) Reset() {
|
||||
*x = GalleryData{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[8]
|
||||
mi := &file_gallery_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -433,7 +433,7 @@ func (x *GalleryData) String() string {
|
||||
func (*GalleryData) ProtoMessage() {}
|
||||
|
||||
func (x *GalleryData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[8]
|
||||
mi := &file_gallery_proto_msgTypes[8]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -446,7 +446,7 @@ func (x *GalleryData) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GalleryData.ProtoReflect.Descriptor instead.
|
||||
func (*GalleryData) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{8}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *GalleryData) GetGalleryOwnerId() int64 {
|
||||
@ -497,7 +497,7 @@ type SlotInfo struct {
|
||||
|
||||
func (x *SlotInfo) Reset() {
|
||||
*x = SlotInfo{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[9]
|
||||
mi := &file_gallery_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -509,7 +509,7 @@ func (x *SlotInfo) String() string {
|
||||
func (*SlotInfo) ProtoMessage() {}
|
||||
|
||||
func (x *SlotInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[9]
|
||||
mi := &file_gallery_proto_msgTypes[9]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -522,7 +522,7 @@ func (x *SlotInfo) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use SlotInfo.ProtoReflect.Descriptor instead.
|
||||
func (*SlotInfo) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{9}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *SlotInfo) GetSlotId() int64 {
|
||||
@ -622,7 +622,7 @@ type AssetInfo struct {
|
||||
|
||||
func (x *AssetInfo) Reset() {
|
||||
*x = AssetInfo{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[10]
|
||||
mi := &file_gallery_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -634,7 +634,7 @@ func (x *AssetInfo) String() string {
|
||||
func (*AssetInfo) ProtoMessage() {}
|
||||
|
||||
func (x *AssetInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[10]
|
||||
mi := &file_gallery_proto_msgTypes[10]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -647,7 +647,7 @@ func (x *AssetInfo) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use AssetInfo.ProtoReflect.Descriptor instead.
|
||||
func (*AssetInfo) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{10}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *AssetInfo) GetAssetId() int64 {
|
||||
@ -695,7 +695,7 @@ type UnlockCondition struct {
|
||||
|
||||
func (x *UnlockCondition) Reset() {
|
||||
*x = UnlockCondition{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[11]
|
||||
mi := &file_gallery_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -707,7 +707,7 @@ func (x *UnlockCondition) String() string {
|
||||
func (*UnlockCondition) ProtoMessage() {}
|
||||
|
||||
func (x *UnlockCondition) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[11]
|
||||
mi := &file_gallery_proto_msgTypes[11]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -720,7 +720,7 @@ func (x *UnlockCondition) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UnlockCondition.ProtoReflect.Descriptor instead.
|
||||
func (*UnlockCondition) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{11}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *UnlockCondition) GetType() string {
|
||||
@ -748,7 +748,7 @@ type PlaceAssetData struct {
|
||||
|
||||
func (x *PlaceAssetData) Reset() {
|
||||
*x = PlaceAssetData{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[12]
|
||||
mi := &file_gallery_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -760,7 +760,7 @@ func (x *PlaceAssetData) String() string {
|
||||
func (*PlaceAssetData) ProtoMessage() {}
|
||||
|
||||
func (x *PlaceAssetData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[12]
|
||||
mi := &file_gallery_proto_msgTypes[12]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -773,7 +773,7 @@ func (x *PlaceAssetData) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use PlaceAssetData.ProtoReflect.Descriptor instead.
|
||||
func (*PlaceAssetData) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{12}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (x *PlaceAssetData) GetStatus() string {
|
||||
@ -807,7 +807,7 @@ type UnlockSlotData struct {
|
||||
|
||||
func (x *UnlockSlotData) Reset() {
|
||||
*x = UnlockSlotData{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[13]
|
||||
mi := &file_gallery_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -819,7 +819,7 @@ func (x *UnlockSlotData) String() string {
|
||||
func (*UnlockSlotData) ProtoMessage() {}
|
||||
|
||||
func (x *UnlockSlotData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[13]
|
||||
mi := &file_gallery_proto_msgTypes[13]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -832,7 +832,7 @@ func (x *UnlockSlotData) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UnlockSlotData.ProtoReflect.Descriptor instead.
|
||||
func (*UnlockSlotData) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{13}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
func (x *UnlockSlotData) GetSlotTotal() int32 {
|
||||
@ -859,7 +859,7 @@ type RemoveFromSlotRequest struct {
|
||||
|
||||
func (x *RemoveFromSlotRequest) Reset() {
|
||||
*x = RemoveFromSlotRequest{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[14]
|
||||
mi := &file_gallery_proto_msgTypes[14]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -871,7 +871,7 @@ func (x *RemoveFromSlotRequest) String() string {
|
||||
func (*RemoveFromSlotRequest) ProtoMessage() {}
|
||||
|
||||
func (x *RemoveFromSlotRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[14]
|
||||
mi := &file_gallery_proto_msgTypes[14]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -884,7 +884,7 @@ func (x *RemoveFromSlotRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use RemoveFromSlotRequest.ProtoReflect.Descriptor instead.
|
||||
func (*RemoveFromSlotRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{14}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{14}
|
||||
}
|
||||
|
||||
func (x *RemoveFromSlotRequest) GetSlotId() int64 {
|
||||
@ -904,7 +904,7 @@ type RemoveFromSlotResponse struct {
|
||||
|
||||
func (x *RemoveFromSlotResponse) Reset() {
|
||||
*x = RemoveFromSlotResponse{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[15]
|
||||
mi := &file_gallery_proto_msgTypes[15]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -916,7 +916,7 @@ func (x *RemoveFromSlotResponse) String() string {
|
||||
func (*RemoveFromSlotResponse) ProtoMessage() {}
|
||||
|
||||
func (x *RemoveFromSlotResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[15]
|
||||
mi := &file_gallery_proto_msgTypes[15]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -929,7 +929,7 @@ func (x *RemoveFromSlotResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use RemoveFromSlotResponse.ProtoReflect.Descriptor instead.
|
||||
func (*RemoveFromSlotResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{15}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{15}
|
||||
}
|
||||
|
||||
func (x *RemoveFromSlotResponse) GetBase() *common.BaseResponse {
|
||||
@ -950,7 +950,7 @@ type GetMyExhibitedAssetsRequest struct {
|
||||
|
||||
func (x *GetMyExhibitedAssetsRequest) Reset() {
|
||||
*x = GetMyExhibitedAssetsRequest{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[16]
|
||||
mi := &file_gallery_proto_msgTypes[16]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -962,7 +962,7 @@ func (x *GetMyExhibitedAssetsRequest) String() string {
|
||||
func (*GetMyExhibitedAssetsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetMyExhibitedAssetsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[16]
|
||||
mi := &file_gallery_proto_msgTypes[16]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -975,7 +975,7 @@ func (x *GetMyExhibitedAssetsRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetMyExhibitedAssetsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetMyExhibitedAssetsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{16}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{16}
|
||||
}
|
||||
|
||||
func (x *GetMyExhibitedAssetsRequest) GetPage() int32 {
|
||||
@ -1003,7 +1003,7 @@ type GetMyExhibitedAssetsResponse struct {
|
||||
|
||||
func (x *GetMyExhibitedAssetsResponse) Reset() {
|
||||
*x = GetMyExhibitedAssetsResponse{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[17]
|
||||
mi := &file_gallery_proto_msgTypes[17]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1015,7 +1015,7 @@ func (x *GetMyExhibitedAssetsResponse) String() string {
|
||||
func (*GetMyExhibitedAssetsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetMyExhibitedAssetsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[17]
|
||||
mi := &file_gallery_proto_msgTypes[17]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1028,7 +1028,7 @@ func (x *GetMyExhibitedAssetsResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetMyExhibitedAssetsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetMyExhibitedAssetsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{17}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{17}
|
||||
}
|
||||
|
||||
func (x *GetMyExhibitedAssetsResponse) GetBase() *common.BaseResponse {
|
||||
@ -1059,7 +1059,7 @@ type ExhibitedAssetsData struct {
|
||||
|
||||
func (x *ExhibitedAssetsData) Reset() {
|
||||
*x = ExhibitedAssetsData{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[18]
|
||||
mi := &file_gallery_proto_msgTypes[18]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1071,7 +1071,7 @@ func (x *ExhibitedAssetsData) String() string {
|
||||
func (*ExhibitedAssetsData) ProtoMessage() {}
|
||||
|
||||
func (x *ExhibitedAssetsData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[18]
|
||||
mi := &file_gallery_proto_msgTypes[18]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1084,7 +1084,7 @@ func (x *ExhibitedAssetsData) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ExhibitedAssetsData.ProtoReflect.Descriptor instead.
|
||||
func (*ExhibitedAssetsData) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{18}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{18}
|
||||
}
|
||||
|
||||
func (x *ExhibitedAssetsData) GetItems() []*ExhibitedAssetItem {
|
||||
@ -1138,7 +1138,7 @@ type ExhibitedAssetItem struct {
|
||||
|
||||
func (x *ExhibitedAssetItem) Reset() {
|
||||
*x = ExhibitedAssetItem{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[19]
|
||||
mi := &file_gallery_proto_msgTypes[19]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1150,7 +1150,7 @@ func (x *ExhibitedAssetItem) String() string {
|
||||
func (*ExhibitedAssetItem) ProtoMessage() {}
|
||||
|
||||
func (x *ExhibitedAssetItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[19]
|
||||
mi := &file_gallery_proto_msgTypes[19]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1163,7 +1163,7 @@ func (x *ExhibitedAssetItem) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ExhibitedAssetItem.ProtoReflect.Descriptor instead.
|
||||
func (*ExhibitedAssetItem) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{19}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{19}
|
||||
}
|
||||
|
||||
func (x *ExhibitedAssetItem) GetAssetId() int64 {
|
||||
@ -1229,7 +1229,7 @@ type GetInspirationFlowRequest struct {
|
||||
|
||||
func (x *GetInspirationFlowRequest) Reset() {
|
||||
*x = GetInspirationFlowRequest{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[20]
|
||||
mi := &file_gallery_proto_msgTypes[20]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1241,7 +1241,7 @@ func (x *GetInspirationFlowRequest) String() string {
|
||||
func (*GetInspirationFlowRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetInspirationFlowRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[20]
|
||||
mi := &file_gallery_proto_msgTypes[20]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1254,7 +1254,7 @@ func (x *GetInspirationFlowRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetInspirationFlowRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetInspirationFlowRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{20}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{20}
|
||||
}
|
||||
|
||||
func (x *GetInspirationFlowRequest) GetCursor() string {
|
||||
@ -1303,7 +1303,7 @@ type GetInspirationFlowResponse struct {
|
||||
|
||||
func (x *GetInspirationFlowResponse) Reset() {
|
||||
*x = GetInspirationFlowResponse{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[21]
|
||||
mi := &file_gallery_proto_msgTypes[21]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1315,7 +1315,7 @@ func (x *GetInspirationFlowResponse) String() string {
|
||||
func (*GetInspirationFlowResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetInspirationFlowResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[21]
|
||||
mi := &file_gallery_proto_msgTypes[21]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1328,7 +1328,7 @@ func (x *GetInspirationFlowResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetInspirationFlowResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetInspirationFlowResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{21}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{21}
|
||||
}
|
||||
|
||||
func (x *GetInspirationFlowResponse) GetBase() *common.BaseResponse {
|
||||
@ -1358,7 +1358,7 @@ type InspirationFlowData struct {
|
||||
|
||||
func (x *InspirationFlowData) Reset() {
|
||||
*x = InspirationFlowData{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[22]
|
||||
mi := &file_gallery_proto_msgTypes[22]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1370,7 +1370,7 @@ func (x *InspirationFlowData) String() string {
|
||||
func (*InspirationFlowData) ProtoMessage() {}
|
||||
|
||||
func (x *InspirationFlowData) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[22]
|
||||
mi := &file_gallery_proto_msgTypes[22]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1383,7 +1383,7 @@ func (x *InspirationFlowData) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use InspirationFlowData.ProtoReflect.Descriptor instead.
|
||||
func (*InspirationFlowData) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{22}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{22}
|
||||
}
|
||||
|
||||
func (x *InspirationFlowData) GetItems() []*InspirationFlowItem {
|
||||
@ -1430,7 +1430,7 @@ type InspirationFlowItem struct {
|
||||
|
||||
func (x *InspirationFlowItem) Reset() {
|
||||
*x = InspirationFlowItem{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[23]
|
||||
mi := &file_gallery_proto_msgTypes[23]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1442,7 +1442,7 @@ func (x *InspirationFlowItem) String() string {
|
||||
func (*InspirationFlowItem) ProtoMessage() {}
|
||||
|
||||
func (x *InspirationFlowItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[23]
|
||||
mi := &file_gallery_proto_msgTypes[23]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1455,7 +1455,7 @@ func (x *InspirationFlowItem) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use InspirationFlowItem.ProtoReflect.Descriptor instead.
|
||||
func (*InspirationFlowItem) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{23}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{23}
|
||||
}
|
||||
|
||||
func (x *InspirationFlowItem) GetAssetId() int64 {
|
||||
@ -1519,7 +1519,7 @@ type GetUserExhibitedAssetsRequest struct {
|
||||
|
||||
func (x *GetUserExhibitedAssetsRequest) Reset() {
|
||||
*x = GetUserExhibitedAssetsRequest{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[24]
|
||||
mi := &file_gallery_proto_msgTypes[24]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1531,7 +1531,7 @@ func (x *GetUserExhibitedAssetsRequest) String() string {
|
||||
func (*GetUserExhibitedAssetsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetUserExhibitedAssetsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[24]
|
||||
mi := &file_gallery_proto_msgTypes[24]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1544,7 +1544,7 @@ func (x *GetUserExhibitedAssetsRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetUserExhibitedAssetsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetUserExhibitedAssetsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{24}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{24}
|
||||
}
|
||||
|
||||
func (x *GetUserExhibitedAssetsRequest) GetUserId() int64 {
|
||||
@ -1579,7 +1579,7 @@ type GetUserExhibitedAssetsResponse struct {
|
||||
|
||||
func (x *GetUserExhibitedAssetsResponse) Reset() {
|
||||
*x = GetUserExhibitedAssetsResponse{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[25]
|
||||
mi := &file_gallery_proto_msgTypes[25]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -1591,7 +1591,7 @@ func (x *GetUserExhibitedAssetsResponse) String() string {
|
||||
func (*GetUserExhibitedAssetsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetUserExhibitedAssetsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[25]
|
||||
mi := &file_gallery_proto_msgTypes[25]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -1604,7 +1604,7 @@ func (x *GetUserExhibitedAssetsResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetUserExhibitedAssetsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetUserExhibitedAssetsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{25}
|
||||
return file_gallery_proto_rawDescGZIP(), []int{25}
|
||||
}
|
||||
|
||||
func (x *GetUserExhibitedAssetsResponse) GetBase() *common.BaseResponse {
|
||||
@ -1621,101 +1621,11 @@ func (x *GetUserExhibitedAssetsResponse) GetData() *ExhibitedAssetsData {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 清理无效展示状态请求
|
||||
type CleanupDisplayStatusRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
var File_gallery_proto protoreflect.FileDescriptor
|
||||
|
||||
func (x *CleanupDisplayStatusRequest) Reset() {
|
||||
*x = CleanupDisplayStatusRequest{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[26]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CleanupDisplayStatusRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CleanupDisplayStatusRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CleanupDisplayStatusRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[26]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CleanupDisplayStatusRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CleanupDisplayStatusRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{26}
|
||||
}
|
||||
|
||||
// 清理无效展示状态响应
|
||||
type CleanupDisplayStatusResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Base *common.BaseResponse `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"`
|
||||
CleanedCount int32 `protobuf:"varint,2,opt,name=cleaned_count,json=cleanedCount,proto3" json:"cleaned_count,omitempty"` // 清理的资产数量
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *CleanupDisplayStatusResponse) Reset() {
|
||||
*x = CleanupDisplayStatusResponse{}
|
||||
mi := &file_proto_gallery_proto_msgTypes[27]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CleanupDisplayStatusResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CleanupDisplayStatusResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CleanupDisplayStatusResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_gallery_proto_msgTypes[27]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CleanupDisplayStatusResponse.ProtoReflect.Descriptor instead.
|
||||
func (*CleanupDisplayStatusResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_gallery_proto_rawDescGZIP(), []int{27}
|
||||
}
|
||||
|
||||
func (x *CleanupDisplayStatusResponse) GetBase() *common.BaseResponse {
|
||||
if x != nil {
|
||||
return x.Base
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *CleanupDisplayStatusResponse) GetCleanedCount() int32 {
|
||||
if x != nil {
|
||||
return x.CleanedCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_proto_gallery_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_proto_gallery_proto_rawDesc = "" +
|
||||
const file_gallery_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x13proto/gallery.proto\x12\x0ftopfans.gallery\x1a\x12proto/common.proto\x1a\x1cgoogle/api/annotations.proto\"\x15\n" +
|
||||
"\rgallery.proto\x12\x0ftopfans.gallery\x1a\x12proto/common.proto\x1a\x1cgoogle/api/annotations.proto\"\x15\n" +
|
||||
"\x13GetMyGalleryRequest\"z\n" +
|
||||
"\x14GetMyGalleryResponse\x120\n" +
|
||||
"\x04base\x18\x01 \x01(\v2\x1c.topfans.common.BaseResponseR\x04base\x120\n" +
|
||||
@ -1838,12 +1748,7 @@ const file_proto_gallery_proto_rawDesc = "" +
|
||||
"\tpage_size\x18\x03 \x01(\x05R\bpageSize\"\x8c\x01\n" +
|
||||
"\x1eGetUserExhibitedAssetsResponse\x120\n" +
|
||||
"\x04base\x18\x01 \x01(\v2\x1c.topfans.common.BaseResponseR\x04base\x128\n" +
|
||||
"\x04data\x18\x02 \x01(\v2$.topfans.gallery.ExhibitedAssetsDataR\x04data\"\x1d\n" +
|
||||
"\x1bCleanupDisplayStatusRequest\"u\n" +
|
||||
"\x1cCleanupDisplayStatusResponse\x120\n" +
|
||||
"\x04base\x18\x01 \x01(\v2\x1c.topfans.common.BaseResponseR\x04base\x12#\n" +
|
||||
"\rcleaned_count\x18\x02 \x01(\x05R\fcleanedCount2\x9f\n" +
|
||||
"\n" +
|
||||
"\x04data\x18\x02 \x01(\v2$.topfans.gallery.ExhibitedAssetsDataR\x04data2\xf4\b\n" +
|
||||
"\x0eGalleryService\x12u\n" +
|
||||
"\fGetMyGallery\x12$.topfans.gallery.GetMyGalleryRequest\x1a%.topfans.gallery.GetMyGalleryResponse\"\x18\x82\xd3\xe4\x93\x02\x12\x12\x10/api/mygalleries\x12\x86\x01\n" +
|
||||
"\x0eGetUserGallery\x12&.topfans.gallery.GetUserGalleryRequest\x1a'.topfans.gallery.GetUserGalleryResponse\"#\x82\xd3\xe4\x93\x02\x1d\x12\x1b/api/galleries/{target_uid}\x12v\n" +
|
||||
@ -1854,23 +1759,22 @@ const file_proto_gallery_proto_rawDesc = "" +
|
||||
"\x0eRemoveFromSlot\x12&.topfans.gallery.RemoveFromSlotRequest\x1a'.topfans.gallery.RemoveFromSlotResponse\",\x82\xd3\xe4\x93\x02&*$/api/galleries/slots/{slot_id}/asset\x12\x98\x01\n" +
|
||||
"\x14GetMyExhibitedAssets\x12,.topfans.gallery.GetMyExhibitedAssetsRequest\x1a-.topfans.gallery.GetMyExhibitedAssetsResponse\"#\x82\xd3\xe4\x93\x02\x1d\x12\x1b/api/v1/me/exhibited-assets\x12\x8f\x01\n" +
|
||||
"\x12GetInspirationFlow\x12*.topfans.gallery.GetInspirationFlowRequest\x1a+.topfans.gallery.GetInspirationFlowResponse\" \x82\xd3\xe4\x93\x02\x1a\x12\x18/api/v1/inspiration-flow\x12\xab\x01\n" +
|
||||
"\x16GetUserExhibitedAssets\x12..topfans.gallery.GetUserExhibitedAssetsRequest\x1a/.topfans.gallery.GetUserExhibitedAssetsResponse\"0\x82\xd3\xe4\x93\x02*\x12(/api/v1/users/{user_id}/exhibited-assets\x12\xa8\x01\n" +
|
||||
"\x14CleanupDisplayStatus\x12,.topfans.gallery.CleanupDisplayStatusRequest\x1a-.topfans.gallery.CleanupDisplayStatusResponse\"3\x82\xd3\xe4\x93\x02-:\x01*\"(/api/v1/galleries/cleanup-display-statusB6Z4github.com/topfans/backend/pkg/proto/gallery;galleryb\x06proto3"
|
||||
"\x16GetUserExhibitedAssets\x12..topfans.gallery.GetUserExhibitedAssetsRequest\x1a/.topfans.gallery.GetUserExhibitedAssetsResponse\"0\x82\xd3\xe4\x93\x02*\x12(/api/v1/users/{user_id}/exhibited-assetsB6Z4github.com/topfans/backend/pkg/proto/gallery;galleryb\x06proto3"
|
||||
|
||||
var (
|
||||
file_proto_gallery_proto_rawDescOnce sync.Once
|
||||
file_proto_gallery_proto_rawDescData []byte
|
||||
file_gallery_proto_rawDescOnce sync.Once
|
||||
file_gallery_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_proto_gallery_proto_rawDescGZIP() []byte {
|
||||
file_proto_gallery_proto_rawDescOnce.Do(func() {
|
||||
file_proto_gallery_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_gallery_proto_rawDesc), len(file_proto_gallery_proto_rawDesc)))
|
||||
func file_gallery_proto_rawDescGZIP() []byte {
|
||||
file_gallery_proto_rawDescOnce.Do(func() {
|
||||
file_gallery_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_gallery_proto_rawDesc), len(file_gallery_proto_rawDesc)))
|
||||
})
|
||||
return file_proto_gallery_proto_rawDescData
|
||||
return file_gallery_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_proto_gallery_proto_msgTypes = make([]protoimpl.MessageInfo, 28)
|
||||
var file_proto_gallery_proto_goTypes = []any{
|
||||
var file_gallery_proto_msgTypes = make([]protoimpl.MessageInfo, 26)
|
||||
var file_gallery_proto_goTypes = []any{
|
||||
(*GetMyGalleryRequest)(nil), // 0: topfans.gallery.GetMyGalleryRequest
|
||||
(*GetMyGalleryResponse)(nil), // 1: topfans.gallery.GetMyGalleryResponse
|
||||
(*GetUserGalleryRequest)(nil), // 2: topfans.gallery.GetUserGalleryRequest
|
||||
@ -1897,77 +1801,72 @@ var file_proto_gallery_proto_goTypes = []any{
|
||||
(*InspirationFlowItem)(nil), // 23: topfans.gallery.InspirationFlowItem
|
||||
(*GetUserExhibitedAssetsRequest)(nil), // 24: topfans.gallery.GetUserExhibitedAssetsRequest
|
||||
(*GetUserExhibitedAssetsResponse)(nil), // 25: topfans.gallery.GetUserExhibitedAssetsResponse
|
||||
(*CleanupDisplayStatusRequest)(nil), // 26: topfans.gallery.CleanupDisplayStatusRequest
|
||||
(*CleanupDisplayStatusResponse)(nil), // 27: topfans.gallery.CleanupDisplayStatusResponse
|
||||
(*common.BaseResponse)(nil), // 28: topfans.common.BaseResponse
|
||||
(*common.BaseResponse)(nil), // 26: topfans.common.BaseResponse
|
||||
}
|
||||
var file_proto_gallery_proto_depIdxs = []int32{
|
||||
28, // 0: topfans.gallery.GetMyGalleryResponse.base:type_name -> topfans.common.BaseResponse
|
||||
var file_gallery_proto_depIdxs = []int32{
|
||||
26, // 0: topfans.gallery.GetMyGalleryResponse.base:type_name -> topfans.common.BaseResponse
|
||||
8, // 1: topfans.gallery.GetMyGalleryResponse.data:type_name -> topfans.gallery.GalleryData
|
||||
28, // 2: topfans.gallery.GetUserGalleryResponse.base:type_name -> topfans.common.BaseResponse
|
||||
26, // 2: topfans.gallery.GetUserGalleryResponse.base:type_name -> topfans.common.BaseResponse
|
||||
8, // 3: topfans.gallery.GetUserGalleryResponse.data:type_name -> topfans.gallery.GalleryData
|
||||
28, // 4: topfans.gallery.PlaceAssetResponse.base:type_name -> topfans.common.BaseResponse
|
||||
26, // 4: topfans.gallery.PlaceAssetResponse.base:type_name -> topfans.common.BaseResponse
|
||||
12, // 5: topfans.gallery.PlaceAssetResponse.data:type_name -> topfans.gallery.PlaceAssetData
|
||||
28, // 6: topfans.gallery.UnlockSlotResponse.base:type_name -> topfans.common.BaseResponse
|
||||
26, // 6: topfans.gallery.UnlockSlotResponse.base:type_name -> topfans.common.BaseResponse
|
||||
13, // 7: topfans.gallery.UnlockSlotResponse.data:type_name -> topfans.gallery.UnlockSlotData
|
||||
9, // 8: topfans.gallery.GalleryData.slots:type_name -> topfans.gallery.SlotInfo
|
||||
10, // 9: topfans.gallery.SlotInfo.asset:type_name -> topfans.gallery.AssetInfo
|
||||
11, // 10: topfans.gallery.SlotInfo.unlock_condition:type_name -> topfans.gallery.UnlockCondition
|
||||
28, // 11: topfans.gallery.RemoveFromSlotResponse.base:type_name -> topfans.common.BaseResponse
|
||||
28, // 12: topfans.gallery.GetMyExhibitedAssetsResponse.base:type_name -> topfans.common.BaseResponse
|
||||
26, // 11: topfans.gallery.RemoveFromSlotResponse.base:type_name -> topfans.common.BaseResponse
|
||||
26, // 12: topfans.gallery.GetMyExhibitedAssetsResponse.base:type_name -> topfans.common.BaseResponse
|
||||
18, // 13: topfans.gallery.GetMyExhibitedAssetsResponse.data:type_name -> topfans.gallery.ExhibitedAssetsData
|
||||
19, // 14: topfans.gallery.ExhibitedAssetsData.items:type_name -> topfans.gallery.ExhibitedAssetItem
|
||||
28, // 15: topfans.gallery.GetInspirationFlowResponse.base:type_name -> topfans.common.BaseResponse
|
||||
26, // 15: topfans.gallery.GetInspirationFlowResponse.base:type_name -> topfans.common.BaseResponse
|
||||
22, // 16: topfans.gallery.GetInspirationFlowResponse.data:type_name -> topfans.gallery.InspirationFlowData
|
||||
23, // 17: topfans.gallery.InspirationFlowData.items:type_name -> topfans.gallery.InspirationFlowItem
|
||||
28, // 18: topfans.gallery.GetUserExhibitedAssetsResponse.base:type_name -> topfans.common.BaseResponse
|
||||
26, // 18: topfans.gallery.GetUserExhibitedAssetsResponse.base:type_name -> topfans.common.BaseResponse
|
||||
18, // 19: topfans.gallery.GetUserExhibitedAssetsResponse.data:type_name -> topfans.gallery.ExhibitedAssetsData
|
||||
28, // 20: topfans.gallery.CleanupDisplayStatusResponse.base:type_name -> topfans.common.BaseResponse
|
||||
0, // 21: topfans.gallery.GalleryService.GetMyGallery:input_type -> topfans.gallery.GetMyGalleryRequest
|
||||
2, // 22: topfans.gallery.GalleryService.GetUserGallery:input_type -> topfans.gallery.GetUserGalleryRequest
|
||||
4, // 23: topfans.gallery.GalleryService.PlaceAsset:input_type -> topfans.gallery.PlaceAssetRequest
|
||||
6, // 24: topfans.gallery.GalleryService.UnlockSlot:input_type -> topfans.gallery.UnlockSlotRequest
|
||||
14, // 25: topfans.gallery.GalleryService.RemoveFromSlot:input_type -> topfans.gallery.RemoveFromSlotRequest
|
||||
16, // 26: topfans.gallery.GalleryService.GetMyExhibitedAssets:input_type -> topfans.gallery.GetMyExhibitedAssetsRequest
|
||||
20, // 27: topfans.gallery.GalleryService.GetInspirationFlow:input_type -> topfans.gallery.GetInspirationFlowRequest
|
||||
24, // 28: topfans.gallery.GalleryService.GetUserExhibitedAssets:input_type -> topfans.gallery.GetUserExhibitedAssetsRequest
|
||||
26, // 29: topfans.gallery.GalleryService.CleanupDisplayStatus:input_type -> topfans.gallery.CleanupDisplayStatusRequest
|
||||
1, // 30: topfans.gallery.GalleryService.GetMyGallery:output_type -> topfans.gallery.GetMyGalleryResponse
|
||||
3, // 31: topfans.gallery.GalleryService.GetUserGallery:output_type -> topfans.gallery.GetUserGalleryResponse
|
||||
5, // 32: topfans.gallery.GalleryService.PlaceAsset:output_type -> topfans.gallery.PlaceAssetResponse
|
||||
7, // 33: topfans.gallery.GalleryService.UnlockSlot:output_type -> topfans.gallery.UnlockSlotResponse
|
||||
15, // 34: topfans.gallery.GalleryService.RemoveFromSlot:output_type -> topfans.gallery.RemoveFromSlotResponse
|
||||
17, // 35: topfans.gallery.GalleryService.GetMyExhibitedAssets:output_type -> topfans.gallery.GetMyExhibitedAssetsResponse
|
||||
21, // 36: topfans.gallery.GalleryService.GetInspirationFlow:output_type -> topfans.gallery.GetInspirationFlowResponse
|
||||
25, // 37: topfans.gallery.GalleryService.GetUserExhibitedAssets:output_type -> topfans.gallery.GetUserExhibitedAssetsResponse
|
||||
27, // 38: topfans.gallery.GalleryService.CleanupDisplayStatus:output_type -> topfans.gallery.CleanupDisplayStatusResponse
|
||||
30, // [30:39] is the sub-list for method output_type
|
||||
21, // [21:30] is the sub-list for method input_type
|
||||
21, // [21:21] is the sub-list for extension type_name
|
||||
21, // [21:21] is the sub-list for extension extendee
|
||||
0, // [0:21] is the sub-list for field type_name
|
||||
0, // 20: topfans.gallery.GalleryService.GetMyGallery:input_type -> topfans.gallery.GetMyGalleryRequest
|
||||
2, // 21: topfans.gallery.GalleryService.GetUserGallery:input_type -> topfans.gallery.GetUserGalleryRequest
|
||||
4, // 22: topfans.gallery.GalleryService.PlaceAsset:input_type -> topfans.gallery.PlaceAssetRequest
|
||||
6, // 23: topfans.gallery.GalleryService.UnlockSlot:input_type -> topfans.gallery.UnlockSlotRequest
|
||||
14, // 24: topfans.gallery.GalleryService.RemoveFromSlot:input_type -> topfans.gallery.RemoveFromSlotRequest
|
||||
16, // 25: topfans.gallery.GalleryService.GetMyExhibitedAssets:input_type -> topfans.gallery.GetMyExhibitedAssetsRequest
|
||||
20, // 26: topfans.gallery.GalleryService.GetInspirationFlow:input_type -> topfans.gallery.GetInspirationFlowRequest
|
||||
24, // 27: topfans.gallery.GalleryService.GetUserExhibitedAssets:input_type -> topfans.gallery.GetUserExhibitedAssetsRequest
|
||||
1, // 28: topfans.gallery.GalleryService.GetMyGallery:output_type -> topfans.gallery.GetMyGalleryResponse
|
||||
3, // 29: topfans.gallery.GalleryService.GetUserGallery:output_type -> topfans.gallery.GetUserGalleryResponse
|
||||
5, // 30: topfans.gallery.GalleryService.PlaceAsset:output_type -> topfans.gallery.PlaceAssetResponse
|
||||
7, // 31: topfans.gallery.GalleryService.UnlockSlot:output_type -> topfans.gallery.UnlockSlotResponse
|
||||
15, // 32: topfans.gallery.GalleryService.RemoveFromSlot:output_type -> topfans.gallery.RemoveFromSlotResponse
|
||||
17, // 33: topfans.gallery.GalleryService.GetMyExhibitedAssets:output_type -> topfans.gallery.GetMyExhibitedAssetsResponse
|
||||
21, // 34: topfans.gallery.GalleryService.GetInspirationFlow:output_type -> topfans.gallery.GetInspirationFlowResponse
|
||||
25, // 35: topfans.gallery.GalleryService.GetUserExhibitedAssets:output_type -> topfans.gallery.GetUserExhibitedAssetsResponse
|
||||
28, // [28:36] is the sub-list for method output_type
|
||||
20, // [20:28] is the sub-list for method input_type
|
||||
20, // [20:20] is the sub-list for extension type_name
|
||||
20, // [20:20] is the sub-list for extension extendee
|
||||
0, // [0:20] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_proto_gallery_proto_init() }
|
||||
func file_proto_gallery_proto_init() {
|
||||
if File_proto_gallery_proto != nil {
|
||||
func init() { file_gallery_proto_init() }
|
||||
func file_gallery_proto_init() {
|
||||
if File_gallery_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_gallery_proto_rawDesc), len(file_proto_gallery_proto_rawDesc)),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_gallery_proto_rawDesc), len(file_gallery_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 28,
|
||||
NumMessages: 26,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_proto_gallery_proto_goTypes,
|
||||
DependencyIndexes: file_proto_gallery_proto_depIdxs,
|
||||
MessageInfos: file_proto_gallery_proto_msgTypes,
|
||||
GoTypes: file_gallery_proto_goTypes,
|
||||
DependencyIndexes: file_gallery_proto_depIdxs,
|
||||
MessageInfos: file_gallery_proto_msgTypes,
|
||||
}.Build()
|
||||
File_proto_gallery_proto = out.File
|
||||
file_proto_gallery_proto_goTypes = nil
|
||||
file_proto_gallery_proto_depIdxs = nil
|
||||
File_gallery_proto = out.File
|
||||
file_gallery_proto_goTypes = nil
|
||||
file_gallery_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@ -136,6 +136,37 @@ message GetProgressResponse {
|
||||
string status = 7; // pending/active/completed/expired
|
||||
}
|
||||
|
||||
// ==================== 铸造活动(MintingActivity)相关消息 ====================
|
||||
|
||||
// 铸造活动信息(用于运营banner)
|
||||
message MintingActivity {
|
||||
int64 id = 1;
|
||||
string title = 2;
|
||||
string description = 3;
|
||||
string cover_image = 4;
|
||||
int64 star_id = 5;
|
||||
string route = 6;
|
||||
bool is_active = 7;
|
||||
int64 created_at = 8;
|
||||
int64 updated_at = 9;
|
||||
}
|
||||
|
||||
// 获取铸造活动列表请求
|
||||
message GetMintingActivitiesRequest {
|
||||
int64 star_id = 1; // 可选,不传则返回所有
|
||||
int32 page = 2;
|
||||
int32 page_size = 3;
|
||||
}
|
||||
|
||||
// 获取铸造活动列表响应
|
||||
message GetMintingActivitiesResponse {
|
||||
topfans.common.BaseResponse base = 1;
|
||||
repeated MintingActivity activities = 2;
|
||||
int32 page = 3;
|
||||
int32 page_size = 4;
|
||||
int32 total = 5;
|
||||
}
|
||||
|
||||
// ==================== 活动服务 ====================
|
||||
|
||||
service ActivityService {
|
||||
@ -181,4 +212,11 @@ service ActivityService {
|
||||
get: "/api/v1/activities/{activity_id}/ranking"
|
||||
};
|
||||
}
|
||||
|
||||
// 获取铸造活动列表(用于运营banner)
|
||||
rpc GetMintingActivities(GetMintingActivitiesRequest) returns (GetMintingActivitiesResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/v1/minting-activities"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -84,6 +84,7 @@ func main() {
|
||||
|
||||
// 初始化 Repository
|
||||
activityRepo := repository.NewActivityRepository()
|
||||
mintingActivityRepo := repository.NewMintingActivityRepository()
|
||||
|
||||
// 初始化 User RPC Client
|
||||
userRPCClient, err := createUserRPCClient()
|
||||
@ -92,7 +93,7 @@ func main() {
|
||||
}
|
||||
|
||||
// 初始化 Service
|
||||
activityService := service.NewActivityService(activityRepo, userRPCClient)
|
||||
activityService := service.NewActivityService(activityRepo, mintingActivityRepo, userRPCClient)
|
||||
|
||||
// 初始化 Provider
|
||||
activityProvider := provider.NewActivityProvider(activityService)
|
||||
@ -135,6 +136,7 @@ func autoMigrate() error {
|
||||
&models.ActivityItem{},
|
||||
&models.ActivityContribution{},
|
||||
&models.ActivityUserStats{},
|
||||
&models.MintingActivity{},
|
||||
}
|
||||
|
||||
for _, table := range tables {
|
||||
|
||||
@ -190,3 +190,31 @@ func (p *ActivityProvider) GetContributionRanking(ctx context.Context, req *pb.C
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// GetMintingActivities 获取铸造活动列表(用于运营banner)
|
||||
func (p *ActivityProvider) GetMintingActivities(ctx context.Context, req *pb.GetMintingActivitiesRequest) (*pb.GetMintingActivitiesResponse, error) {
|
||||
logger.Logger.Info("Received GetMintingActivities request",
|
||||
zap.Int64("star_id", req.StarId),
|
||||
zap.Int32("page", req.Page),
|
||||
zap.Int32("page_size", req.PageSize),
|
||||
)
|
||||
|
||||
// 调用Service层
|
||||
resp, err := p.activityService.GetMintingActivities(ctx, req)
|
||||
if err != nil {
|
||||
logger.Logger.Error("GetMintingActivities failed", zap.Error(err))
|
||||
return &pb.GetMintingActivitiesResponse{
|
||||
Base: &pbCommon.BaseResponse{
|
||||
Code: appErrors.ToStatusCode(err),
|
||||
Message: err.Error(),
|
||||
Timestamp: time.Now().UnixMilli(),
|
||||
},
|
||||
}, err
|
||||
}
|
||||
|
||||
logger.Logger.Debug("GetMintingActivities successful",
|
||||
zap.Int("activities_count", len(resp.Activities)),
|
||||
)
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
@ -0,0 +1,80 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/topfans/backend/pkg/database"
|
||||
"github.com/topfans/backend/pkg/models"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// MintingActivityRepository MintingActivity仓库接口
|
||||
type MintingActivityRepository interface {
|
||||
// GetActiveMintingActivities 获取活跃的铸造活动列表
|
||||
GetActiveMintingActivities(starID int64, page, pageSize int) ([]*models.MintingActivity, int64, error)
|
||||
|
||||
// GetMintingActivityByID 根据ID获取铸造活动
|
||||
GetMintingActivityByID(id int64) (*models.MintingActivity, error)
|
||||
}
|
||||
|
||||
// mintingActivityRepository MintingActivity仓库实现
|
||||
type mintingActivityRepository struct {
|
||||
db *gorm.DB
|
||||
}
|
||||
|
||||
// NewMintingActivityRepository 创建MintingActivity仓库实例
|
||||
func NewMintingActivityRepository() MintingActivityRepository {
|
||||
return &mintingActivityRepository{
|
||||
db: database.GetDB(),
|
||||
}
|
||||
}
|
||||
|
||||
// GetActiveMintingActivities 获取活跃的铸造活动列表
|
||||
func (r *mintingActivityRepository) GetActiveMintingActivities(starID int64, page, pageSize int) ([]*models.MintingActivity, int64, error) {
|
||||
if page <= 0 {
|
||||
page = 1
|
||||
}
|
||||
if pageSize <= 0 {
|
||||
pageSize = 10
|
||||
}
|
||||
|
||||
query := r.db.Model(&models.MintingActivity{}).Where("is_active = ?", true)
|
||||
|
||||
if starID > 0 {
|
||||
query = query.Where("star_id = ?", starID)
|
||||
}
|
||||
|
||||
var total int64
|
||||
if err := query.Count(&total).Error; err != nil {
|
||||
return nil, 0, err
|
||||
}
|
||||
|
||||
offset := (page - 1) * pageSize
|
||||
var activities []*models.MintingActivity
|
||||
if err := query.
|
||||
Order("created_at DESC").
|
||||
Offset(offset).
|
||||
Limit(pageSize).
|
||||
Find(&activities).Error; err != nil {
|
||||
return nil, 0, err
|
||||
}
|
||||
|
||||
return activities, total, nil
|
||||
}
|
||||
|
||||
// GetMintingActivityByID 根据ID获取铸造活动
|
||||
func (r *mintingActivityRepository) GetMintingActivityByID(id int64) (*models.MintingActivity, error) {
|
||||
if id <= 0 {
|
||||
return nil, errors.New("id must be greater than 0")
|
||||
}
|
||||
|
||||
var activity models.MintingActivity
|
||||
if err := r.db.First(&activity, id).Error; err != nil {
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
return nil, nil
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &activity, nil
|
||||
}
|
||||
@ -86,6 +86,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, computed } from 'vue';
|
||||
import { getMintingActivitiesApi } from '@/utils/api.js';
|
||||
|
||||
// 判断是否为Android设备
|
||||
const isAndroid = ref(false);
|
||||
@ -99,26 +100,7 @@ const backButtonTop = computed(() => {
|
||||
});
|
||||
|
||||
// 轮播图数据
|
||||
const bannerList = ref([
|
||||
{
|
||||
image_url: '/static/sucai/image-05.png',
|
||||
title: '这河非遇美学宇宙联名',
|
||||
link_type: 'activity',
|
||||
link_value: '1'
|
||||
},
|
||||
{
|
||||
image_url: '/static/sucai/image-06.png',
|
||||
title: '限时创作活动',
|
||||
link_type: 'activity',
|
||||
link_value: '2'
|
||||
},
|
||||
{
|
||||
image_url: '/static/sucai/image-03.png',
|
||||
title: '精选作品展示',
|
||||
link_type: 'topic',
|
||||
link_value: '3'
|
||||
}
|
||||
]);
|
||||
const bannerList = ref([]);
|
||||
|
||||
// 主Tab配置
|
||||
const mainTabs = ref([
|
||||
@ -181,11 +163,40 @@ onMounted(() => {
|
||||
// 加载轮播图
|
||||
const loadBanners = async () => {
|
||||
try {
|
||||
// TODO: 调用后台接口获取轮播图数据
|
||||
// const res = await request('/api/castlove/banners', 'GET');
|
||||
// bannerList.value = res.data;
|
||||
const res = await getMintingActivitiesApi(null, 1, 10);
|
||||
if (res.data && res.data.activities) {
|
||||
// 将后端数据转换为前端格式
|
||||
bannerList.value = res.data.activities.map(activity => ({
|
||||
image_url: activity.cover_image,
|
||||
title: activity.title,
|
||||
link_type: 'activity',
|
||||
link_value: activity.id.toString(),
|
||||
description: activity.description,
|
||||
route: activity.route
|
||||
}));
|
||||
}
|
||||
// 如果没有数据,使用默认图片
|
||||
if (bannerList.value.length === 0) {
|
||||
bannerList.value = [
|
||||
{
|
||||
image_url: '/static/sucai/image-05.png',
|
||||
title: '这河非遇美学宇宙联名',
|
||||
link_type: 'activity',
|
||||
link_value: '1'
|
||||
}
|
||||
];
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载轮播图失败:', e);
|
||||
// 失败时使用默认图片
|
||||
bannerList.value = [
|
||||
{
|
||||
image_url: '/static/sucai/image-05.png',
|
||||
title: '这河非遇美学宇宙联名',
|
||||
link_type: 'activity',
|
||||
link_value: '1'
|
||||
}
|
||||
];
|
||||
}
|
||||
};
|
||||
|
||||
@ -270,7 +281,23 @@ const generateMockData = () => {
|
||||
// 轮播图点击
|
||||
const handleBannerClick = (banner) => {
|
||||
console.log('点击轮播图:', banner);
|
||||
// TODO: 根据link_type跳转
|
||||
// 根据link_type跳转
|
||||
if (banner.link_type === 'activity') {
|
||||
// 跳转到活动详情页面
|
||||
uni.navigateTo({
|
||||
url: `/pages/castlove/detail?id=${banner.link_value}`
|
||||
});
|
||||
} else if (banner.link_type === 'topic') {
|
||||
// 跳转到话题页面
|
||||
uni.navigateTo({
|
||||
url: `/pages/topic/detail?id=${banner.link_value}`
|
||||
});
|
||||
} else if (banner.route) {
|
||||
// 如果有自定义路由,直接跳转
|
||||
uni.navigateTo({
|
||||
url: banner.route
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// 主Tab点击 - 进入铸造页面
|
||||
|
||||
@ -637,4 +637,18 @@ export function getBatchOssPresignedUrlsApi(files, expires = 3600, type = 'asset
|
||||
url: `/api/v1/assets/oss/batch-presigned-urls?files=${encodeURIComponent(JSON.stringify(files))}&expires=${expires}&type=${type}`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
// ==================== 铸造活动相关接口(运营banner)====================
|
||||
|
||||
// 获取铸造活动列表
|
||||
export function getMintingActivitiesApi(starId = null, page = 1, pageSize = 10) {
|
||||
let url = `/api/v1/minting-activities?page=${page}&page_size=${pageSize}`
|
||||
if (starId) {
|
||||
url += `&star_id=${starId}`
|
||||
}
|
||||
return request({
|
||||
url: url,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user