topfans/backend/pkg/proto/asset/asset.triple.go
2026-04-07 22:29:48 +08:00

474 lines
20 KiB
Go

// Code generated by protoc-gen-triple. DO NOT EDIT.
//
// Source: proto/asset.proto
package asset
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 (
// AssetServiceName is the fully-qualified name of the AssetService service.
AssetServiceName = "topfans.asset.AssetService"
)
// 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 (
// AssetServiceInitMintOrderProcedure is the fully-qualified name of the AssetService's InitMintOrder RPC.
AssetServiceInitMintOrderProcedure = "/topfans.asset.AssetService/InitMintOrder"
// AssetServicePreCreateMintOrderProcedure is the fully-qualified name of the AssetService's PreCreateMintOrder RPC.
AssetServicePreCreateMintOrderProcedure = "/topfans.asset.AssetService/PreCreateMintOrder"
// AssetServiceCreateMintOrderProcedure is the fully-qualified name of the AssetService's CreateMintOrder RPC.
AssetServiceCreateMintOrderProcedure = "/topfans.asset.AssetService/CreateMintOrder"
// AssetServiceGetMyAssetsProcedure is the fully-qualified name of the AssetService's GetMyAssets RPC.
AssetServiceGetMyAssetsProcedure = "/topfans.asset.AssetService/GetMyAssets"
// AssetServiceGetAssetProcedure is the fully-qualified name of the AssetService's GetAsset RPC.
AssetServiceGetAssetProcedure = "/topfans.asset.AssetService/GetAsset"
// AssetServiceGetAssetStatusProcedure is the fully-qualified name of the AssetService's GetAssetStatus RPC.
AssetServiceGetAssetStatusProcedure = "/topfans.asset.AssetService/GetAssetStatus"
// AssetServiceGetMintOrderProcedure is the fully-qualified name of the AssetService's GetMintOrder RPC.
AssetServiceGetMintOrderProcedure = "/topfans.asset.AssetService/GetMintOrder"
// AssetServiceCancelMintOrderProcedure is the fully-qualified name of the AssetService's CancelMintOrder RPC.
AssetServiceCancelMintOrderProcedure = "/topfans.asset.AssetService/CancelMintOrder"
// AssetServiceGetAssetForRPCProcedure is the fully-qualified name of the AssetService's GetAssetForRPC RPC.
AssetServiceGetAssetForRPCProcedure = "/topfans.asset.AssetService/GetAssetForRPC"
// AssetServiceLikeAssetProcedure is the fully-qualified name of the AssetService's LikeAsset RPC.
AssetServiceLikeAssetProcedure = "/topfans.asset.AssetService/LikeAsset"
// AssetServiceUnlikeAssetProcedure is the fully-qualified name of the AssetService's UnlikeAsset RPC.
AssetServiceUnlikeAssetProcedure = "/topfans.asset.AssetService/UnlikeAsset"
// AssetServiceCheckAssetLikeProcedure is the fully-qualified name of the AssetService's CheckAssetLike RPC.
AssetServiceCheckAssetLikeProcedure = "/topfans.asset.AssetService/CheckAssetLike"
// AssetServiceGetAssetLikesProcedure is the fully-qualified name of the AssetService's GetAssetLikes RPC.
AssetServiceGetAssetLikesProcedure = "/topfans.asset.AssetService/GetAssetLikes"
// AssetServiceClearAssetLikeRecordsProcedure is the fully-qualified name of the AssetService's ClearAssetLikeRecords RPC.
AssetServiceClearAssetLikeRecordsProcedure = "/topfans.asset.AssetService/ClearAssetLikeRecords"
)
var (
_ AssetService = (*AssetServiceImpl)(nil)
)
// AssetService is a client for the topfans.asset.AssetService service.
type AssetService interface {
InitMintOrder(ctx context.Context, req *InitMintOrderRequest, opts ...client.CallOption) (*InitMintOrderResponse, error)
PreCreateMintOrder(ctx context.Context, req *PreCreateMintOrderRequest, opts ...client.CallOption) (*PreCreateMintOrderResponse, error)
CreateMintOrder(ctx context.Context, req *CreateMintOrderRequest, opts ...client.CallOption) (*CreateMintOrderResponse, error)
GetMyAssets(ctx context.Context, req *GetMyAssetsRequest, opts ...client.CallOption) (*GetMyAssetsResponse, error)
GetAsset(ctx context.Context, req *GetAssetRequest, opts ...client.CallOption) (*GetAssetResponse, error)
GetAssetStatus(ctx context.Context, req *GetAssetStatusRequest, opts ...client.CallOption) (*GetAssetStatusResponse, error)
GetMintOrder(ctx context.Context, req *GetMintOrderRequest, opts ...client.CallOption) (*GetMintOrderResponse, error)
CancelMintOrder(ctx context.Context, req *CancelMintOrderRequest, opts ...client.CallOption) (*CancelMintOrderResponse, error)
GetAssetForRPC(ctx context.Context, req *GetAssetForRPCRequest, opts ...client.CallOption) (*GetAssetForRPCResponse, error)
LikeAsset(ctx context.Context, req *LikeAssetRequest, opts ...client.CallOption) (*LikeAssetResponse, error)
UnlikeAsset(ctx context.Context, req *UnlikeAssetRequest, opts ...client.CallOption) (*UnlikeAssetResponse, error)
CheckAssetLike(ctx context.Context, req *CheckAssetLikeRequest, opts ...client.CallOption) (*CheckAssetLikeResponse, error)
GetAssetLikes(ctx context.Context, req *GetAssetLikesRequest, opts ...client.CallOption) (*GetAssetLikesResponse, error)
ClearAssetLikeRecords(ctx context.Context, req *ClearAssetLikeRecordsRequest, opts ...client.CallOption) (*ClearAssetLikeRecordsResponse, error)
}
// NewAssetService constructs a client for the asset.AssetService service.
func NewAssetService(cli *client.Client, opts ...client.ReferenceOption) (AssetService, error) {
conn, err := cli.DialWithInfo("topfans.asset.AssetService", &AssetService_ClientInfo, opts...)
if err != nil {
return nil, err
}
return &AssetServiceImpl{
conn: conn,
}, nil
}
func SetConsumerAssetService(srv common.RPCService) {
dubbo.SetConsumerServiceWithInfo(srv, &AssetService_ClientInfo)
}
// AssetServiceImpl implements AssetService.
type AssetServiceImpl struct {
conn *client.Connection
}
func (c *AssetServiceImpl) InitMintOrder(ctx context.Context, req *InitMintOrderRequest, opts ...client.CallOption) (*InitMintOrderResponse, error) {
resp := new(InitMintOrderResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "InitMintOrder", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *AssetServiceImpl) PreCreateMintOrder(ctx context.Context, req *PreCreateMintOrderRequest, opts ...client.CallOption) (*PreCreateMintOrderResponse, error) {
resp := new(PreCreateMintOrderResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "PreCreateMintOrder", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *AssetServiceImpl) CreateMintOrder(ctx context.Context, req *CreateMintOrderRequest, opts ...client.CallOption) (*CreateMintOrderResponse, error) {
resp := new(CreateMintOrderResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "CreateMintOrder", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *AssetServiceImpl) GetMyAssets(ctx context.Context, req *GetMyAssetsRequest, opts ...client.CallOption) (*GetMyAssetsResponse, error) {
resp := new(GetMyAssetsResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetMyAssets", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *AssetServiceImpl) GetAsset(ctx context.Context, req *GetAssetRequest, opts ...client.CallOption) (*GetAssetResponse, error) {
resp := new(GetAssetResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetAsset", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *AssetServiceImpl) GetAssetStatus(ctx context.Context, req *GetAssetStatusRequest, opts ...client.CallOption) (*GetAssetStatusResponse, error) {
resp := new(GetAssetStatusResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetAssetStatus", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *AssetServiceImpl) GetMintOrder(ctx context.Context, req *GetMintOrderRequest, opts ...client.CallOption) (*GetMintOrderResponse, error) {
resp := new(GetMintOrderResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetMintOrder", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *AssetServiceImpl) CancelMintOrder(ctx context.Context, req *CancelMintOrderRequest, opts ...client.CallOption) (*CancelMintOrderResponse, error) {
resp := new(CancelMintOrderResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "CancelMintOrder", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *AssetServiceImpl) GetAssetForRPC(ctx context.Context, req *GetAssetForRPCRequest, opts ...client.CallOption) (*GetAssetForRPCResponse, error) {
resp := new(GetAssetForRPCResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetAssetForRPC", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *AssetServiceImpl) LikeAsset(ctx context.Context, req *LikeAssetRequest, opts ...client.CallOption) (*LikeAssetResponse, error) {
resp := new(LikeAssetResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "LikeAsset", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *AssetServiceImpl) UnlikeAsset(ctx context.Context, req *UnlikeAssetRequest, opts ...client.CallOption) (*UnlikeAssetResponse, error) {
resp := new(UnlikeAssetResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "UnlikeAsset", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *AssetServiceImpl) CheckAssetLike(ctx context.Context, req *CheckAssetLikeRequest, opts ...client.CallOption) (*CheckAssetLikeResponse, error) {
resp := new(CheckAssetLikeResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "CheckAssetLike", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *AssetServiceImpl) GetAssetLikes(ctx context.Context, req *GetAssetLikesRequest, opts ...client.CallOption) (*GetAssetLikesResponse, error) {
resp := new(GetAssetLikesResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetAssetLikes", opts...); err != nil {
return nil, err
}
return resp, nil
}
func (c *AssetServiceImpl) ClearAssetLikeRecords(ctx context.Context, req *ClearAssetLikeRecordsRequest, opts ...client.CallOption) (*ClearAssetLikeRecordsResponse, error) {
resp := new(ClearAssetLikeRecordsResponse)
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "ClearAssetLikeRecords", opts...); err != nil {
return nil, err
}
return resp, nil
}
var AssetService_ClientInfo = client.ClientInfo{
InterfaceName: "topfans.asset.AssetService",
MethodNames: []string{"InitMintOrder", "PreCreateMintOrder", "CreateMintOrder", "GetMyAssets", "GetAsset", "GetAssetStatus", "GetMintOrder", "CancelMintOrder", "GetAssetForRPC", "LikeAsset", "UnlikeAsset", "CheckAssetLike", "GetAssetLikes", "ClearAssetLikeRecords"},
ConnectionInjectFunc: func(dubboCliRaw interface{}, conn *client.Connection) {
dubboCli := dubboCliRaw.(*AssetServiceImpl)
dubboCli.conn = conn
},
}
// AssetServiceHandler is an implementation of the topfans.asset.AssetService service.
type AssetServiceHandler interface {
InitMintOrder(context.Context, *InitMintOrderRequest) (*InitMintOrderResponse, error)
PreCreateMintOrder(context.Context, *PreCreateMintOrderRequest) (*PreCreateMintOrderResponse, error)
CreateMintOrder(context.Context, *CreateMintOrderRequest) (*CreateMintOrderResponse, error)
GetMyAssets(context.Context, *GetMyAssetsRequest) (*GetMyAssetsResponse, error)
GetAsset(context.Context, *GetAssetRequest) (*GetAssetResponse, error)
GetAssetStatus(context.Context, *GetAssetStatusRequest) (*GetAssetStatusResponse, error)
GetMintOrder(context.Context, *GetMintOrderRequest) (*GetMintOrderResponse, error)
CancelMintOrder(context.Context, *CancelMintOrderRequest) (*CancelMintOrderResponse, error)
GetAssetForRPC(context.Context, *GetAssetForRPCRequest) (*GetAssetForRPCResponse, error)
LikeAsset(context.Context, *LikeAssetRequest) (*LikeAssetResponse, error)
UnlikeAsset(context.Context, *UnlikeAssetRequest) (*UnlikeAssetResponse, error)
CheckAssetLike(context.Context, *CheckAssetLikeRequest) (*CheckAssetLikeResponse, error)
GetAssetLikes(context.Context, *GetAssetLikesRequest) (*GetAssetLikesResponse, error)
ClearAssetLikeRecords(context.Context, *ClearAssetLikeRecordsRequest) (*ClearAssetLikeRecordsResponse, error)
}
func RegisterAssetServiceHandler(srv *server.Server, hdlr AssetServiceHandler, opts ...server.ServiceOption) error {
return srv.Register(hdlr, &AssetService_ServiceInfo, opts...)
}
func SetProviderAssetService(srv common.RPCService) {
dubbo.SetProviderServiceWithInfo(srv, &AssetService_ServiceInfo)
}
var AssetService_ServiceInfo = server.ServiceInfo{
InterfaceName: "topfans.asset.AssetService",
ServiceType: (*AssetServiceHandler)(nil),
Methods: []server.MethodInfo{
{
Name: "InitMintOrder",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(InitMintOrderRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*InitMintOrderRequest)
res, err := handler.(AssetServiceHandler).InitMintOrder(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "PreCreateMintOrder",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(PreCreateMintOrderRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*PreCreateMintOrderRequest)
res, err := handler.(AssetServiceHandler).PreCreateMintOrder(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "CreateMintOrder",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(CreateMintOrderRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*CreateMintOrderRequest)
res, err := handler.(AssetServiceHandler).CreateMintOrder(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "GetMyAssets",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(GetMyAssetsRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*GetMyAssetsRequest)
res, err := handler.(AssetServiceHandler).GetMyAssets(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "GetAsset",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(GetAssetRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*GetAssetRequest)
res, err := handler.(AssetServiceHandler).GetAsset(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "GetAssetStatus",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(GetAssetStatusRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*GetAssetStatusRequest)
res, err := handler.(AssetServiceHandler).GetAssetStatus(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "GetMintOrder",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(GetMintOrderRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*GetMintOrderRequest)
res, err := handler.(AssetServiceHandler).GetMintOrder(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "CancelMintOrder",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(CancelMintOrderRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*CancelMintOrderRequest)
res, err := handler.(AssetServiceHandler).CancelMintOrder(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "GetAssetForRPC",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(GetAssetForRPCRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*GetAssetForRPCRequest)
res, err := handler.(AssetServiceHandler).GetAssetForRPC(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "LikeAsset",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(LikeAssetRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*LikeAssetRequest)
res, err := handler.(AssetServiceHandler).LikeAsset(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "UnlikeAsset",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(UnlikeAssetRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*UnlikeAssetRequest)
res, err := handler.(AssetServiceHandler).UnlikeAsset(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "CheckAssetLike",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(CheckAssetLikeRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*CheckAssetLikeRequest)
res, err := handler.(AssetServiceHandler).CheckAssetLike(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "GetAssetLikes",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(GetAssetLikesRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*GetAssetLikesRequest)
res, err := handler.(AssetServiceHandler).GetAssetLikes(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
{
Name: "ClearAssetLikeRecords",
Type: constant.CallUnary,
ReqInitFunc: func() interface{} {
return new(ClearAssetLikeRecordsRequest)
},
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
req := args[0].(*ClearAssetLikeRecordsRequest)
res, err := handler.(AssetServiceHandler).ClearAssetLikeRecords(ctx, req)
if err != nil {
return nil, err
}
return triple_protocol.NewResponse(res), nil
},
},
},
}