Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterUgsBlockchainServiceHandler(s server.Server, hdlr UgsBlockchainServiceHandler, ...) error
- type BlockchainProject
- func (*BlockchainProject) Descriptor() ([]byte, []int)deprecated
- func (x *BlockchainProject) GetContract() string
- func (x *BlockchainProject) GetName() string
- func (*BlockchainProject) ProtoMessage()
- func (x *BlockchainProject) ProtoReflect() protoreflect.Message
- func (x *BlockchainProject) Reset()
- func (x *BlockchainProject) String() string
- type EstimateNetworkFeeRequest
- func (*EstimateNetworkFeeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EstimateNetworkFeeRequest) GetNetwork() string
- func (x *EstimateNetworkFeeRequest) GetNftPrice() float64
- func (x *EstimateNetworkFeeRequest) GetNftProjectId() string
- func (*EstimateNetworkFeeRequest) ProtoMessage()
- func (x *EstimateNetworkFeeRequest) ProtoReflect() protoreflect.Message
- func (x *EstimateNetworkFeeRequest) Reset()
- func (x *EstimateNetworkFeeRequest) String() string
- type EstimateNetworkFeeResponse
- func (*EstimateNetworkFeeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EstimateNetworkFeeResponse) GetEstimatedFee() string
- func (*EstimateNetworkFeeResponse) ProtoMessage()
- func (x *EstimateNetworkFeeResponse) ProtoReflect() protoreflect.Message
- func (x *EstimateNetworkFeeResponse) Reset()
- func (x *EstimateNetworkFeeResponse) String() string
- type GetProjectListResponse
- func (*GetProjectListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetProjectListResponse) GetProjects() map[string]*BlockchainProject
- func (*GetProjectListResponse) ProtoMessage()
- func (x *GetProjectListResponse) ProtoReflect() protoreflect.Message
- func (x *GetProjectListResponse) Reset()
- func (x *GetProjectListResponse) String() string
- type NFTMetaRequest
- func (*NFTMetaRequest) Descriptor() ([]byte, []int)deprecated
- func (x *NFTMetaRequest) GetNetwork() string
- func (x *NFTMetaRequest) GetNftProjectId() string
- func (*NFTMetaRequest) ProtoMessage()
- func (x *NFTMetaRequest) ProtoReflect() protoreflect.Message
- func (x *NFTMetaRequest) Reset()
- func (x *NFTMetaRequest) String() string
- type NFTMetaResponse
- func (*NFTMetaResponse) Descriptor() ([]byte, []int)deprecated
- func (x *NFTMetaResponse) GetTokenName() string
- func (x *NFTMetaResponse) GetTokenPrice() string
- func (x *NFTMetaResponse) GetTokenSymbol() string
- func (*NFTMetaResponse) ProtoMessage()
- func (x *NFTMetaResponse) ProtoReflect() protoreflect.Message
- func (x *NFTMetaResponse) Reset()
- func (x *NFTMetaResponse) String() string
- type OrderStatus
- func (OrderStatus) Descriptor() protoreflect.EnumDescriptor
- func (x OrderStatus) Enum() *OrderStatus
- func (OrderStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x OrderStatus) Number() protoreflect.EnumNumber
- func (x OrderStatus) String() string
- func (OrderStatus) Type() protoreflect.EnumType
- type ProcessNftMessage
- func (*ProcessNftMessage) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessNftMessage) GetOrderId() string
- func (x *ProcessNftMessage) GetOrderStatus() OrderStatus
- func (x *ProcessNftMessage) GetTxFee() string
- func (x *ProcessNftMessage) GetTxId() string
- func (*ProcessNftMessage) ProtoMessage()
- func (x *ProcessNftMessage) ProtoReflect() protoreflect.Message
- func (x *ProcessNftMessage) Reset()
- func (x *ProcessNftMessage) String() string
- type ProcessNftRequest
- func (*ProcessNftRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessNftRequest) GetExchangePayoutTx() string
- func (x *ProcessNftRequest) GetNetwork() string
- func (x *ProcessNftRequest) GetNftId() string
- func (x *ProcessNftRequest) GetNftPrice() float64
- func (x *ProcessNftRequest) GetNftProjectId() string
- func (x *ProcessNftRequest) GetOrderId() string
- func (x *ProcessNftRequest) GetOwnerWallet() string
- func (x *ProcessNftRequest) GetSmartContractAddr() string
- func (*ProcessNftRequest) ProtoMessage()
- func (x *ProcessNftRequest) ProtoReflect() protoreflect.Message
- func (x *ProcessNftRequest) Reset()
- func (x *ProcessNftRequest) String() string
- type ProcessNftResponse
- func (*ProcessNftResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessNftResponse) GetOrderId() string
- func (x *ProcessNftResponse) GetOrderStatus() OrderStatus
- func (*ProcessNftResponse) ProtoMessage()
- func (x *ProcessNftResponse) ProtoReflect() protoreflect.Message
- func (x *ProcessNftResponse) Reset()
- func (x *ProcessNftResponse) String() string
- type UgsBlockchainService
- type UgsBlockchainServiceHandler
Constants ¶
const ( // ServiceName - name of microservice ServiceName = "blockchain" // Version - version of service Version = "latest" BlockchainExchangeName = "blockchain-orders" BlockchainOrdersTopic = "blockchain-order-result" )
Variables ¶
var ( OrderStatus_name = map[int32]string{ 0: "UNINITIALIZED", 1: "ACCEPTED", 2: "MINT_TX_PLACED", 3: "BAYOUT_TX_PLACED", 4: "ACQUIRED", 5: "SHIPPED", 6: "FAILED", } OrderStatus_value = map[string]int32{ "UNINITIALIZED": 0, "ACCEPTED": 1, "MINT_TX_PLACED": 2, "BAYOUT_TX_PLACED": 3, "ACQUIRED": 4, "SHIPPED": 5, "FAILED": 6, } )
Enum value maps for OrderStatus.
var File_ugs_blockchain_proto protoreflect.FileDescriptor
Functions ¶
func RegisterUgsBlockchainServiceHandler ¶
func RegisterUgsBlockchainServiceHandler(s server.Server, hdlr UgsBlockchainServiceHandler, opts ...server.HandlerOption) error
Types ¶
type BlockchainProject ¶
type BlockchainProject struct { // @inject_tag: json:"name" bson:"name" Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" bson:"name"` // @inject_tag: json:"contract" bson:"contract" Contract string `protobuf:"bytes,2,opt,name=contract,proto3" json:"contract" bson:"contract"` // contains filtered or unexported fields }
func (*BlockchainProject) Descriptor
deprecated
func (*BlockchainProject) Descriptor() ([]byte, []int)
Deprecated: Use BlockchainProject.ProtoReflect.Descriptor instead.
func (*BlockchainProject) GetContract ¶
func (x *BlockchainProject) GetContract() string
func (*BlockchainProject) GetName ¶
func (x *BlockchainProject) GetName() string
func (*BlockchainProject) ProtoMessage ¶
func (*BlockchainProject) ProtoMessage()
func (*BlockchainProject) ProtoReflect ¶
func (x *BlockchainProject) ProtoReflect() protoreflect.Message
func (*BlockchainProject) Reset ¶
func (x *BlockchainProject) Reset()
func (*BlockchainProject) String ¶
func (x *BlockchainProject) String() string
type EstimateNetworkFeeRequest ¶
type EstimateNetworkFeeRequest struct { // @inject_tag: json:"network" bson:"network" validate:"required,oneof=BSC // ETH" required:"true" // // ID of a network. Examples "ETH", "BSC". Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network" bson:"network"` // @inject_tag: json:"nft_project_id" bson:"nft_project_id" // // Merchant's project ID (BSON hash). NftProjectId string `protobuf:"bytes,2,opt,name=nft_project_id,json=nftProjectId,proto3" json:"nft_project_id" bson:"nft_project_id"` // @inject_tag: json:"nft_price" bson:"nft_price" validate:"required" // required:"true" // // NFT token nominal price. NftPrice float64 `protobuf:"fixed64,3,opt,name=nft_price,json=nftPrice,proto3" json:"nft_price" bson:"nft_price" validate:"required"` // contains filtered or unexported fields }
func (*EstimateNetworkFeeRequest) Descriptor
deprecated
func (*EstimateNetworkFeeRequest) Descriptor() ([]byte, []int)
Deprecated: Use EstimateNetworkFeeRequest.ProtoReflect.Descriptor instead.
func (*EstimateNetworkFeeRequest) GetNetwork ¶
func (x *EstimateNetworkFeeRequest) GetNetwork() string
func (*EstimateNetworkFeeRequest) GetNftPrice ¶
func (x *EstimateNetworkFeeRequest) GetNftPrice() float64
func (*EstimateNetworkFeeRequest) GetNftProjectId ¶
func (x *EstimateNetworkFeeRequest) GetNftProjectId() string
func (*EstimateNetworkFeeRequest) ProtoMessage ¶
func (*EstimateNetworkFeeRequest) ProtoMessage()
func (*EstimateNetworkFeeRequest) ProtoReflect ¶
func (x *EstimateNetworkFeeRequest) ProtoReflect() protoreflect.Message
func (*EstimateNetworkFeeRequest) Reset ¶
func (x *EstimateNetworkFeeRequest) Reset()
func (*EstimateNetworkFeeRequest) String ¶
func (x *EstimateNetworkFeeRequest) String() string
type EstimateNetworkFeeResponse ¶
type EstimateNetworkFeeResponse struct { // @inject_tag: json:"estimated_fee" bson:"estimated_fee" // // Estimated network fee for token acquiring operation. EstimatedFee string `protobuf:"bytes,1,opt,name=estimated_fee,json=estimatedFee,proto3" json:"estimated_fee" bson:"estimated_fee"` // contains filtered or unexported fields }
func (*EstimateNetworkFeeResponse) Descriptor
deprecated
func (*EstimateNetworkFeeResponse) Descriptor() ([]byte, []int)
Deprecated: Use EstimateNetworkFeeResponse.ProtoReflect.Descriptor instead.
func (*EstimateNetworkFeeResponse) GetEstimatedFee ¶
func (x *EstimateNetworkFeeResponse) GetEstimatedFee() string
func (*EstimateNetworkFeeResponse) ProtoMessage ¶
func (*EstimateNetworkFeeResponse) ProtoMessage()
func (*EstimateNetworkFeeResponse) ProtoReflect ¶
func (x *EstimateNetworkFeeResponse) ProtoReflect() protoreflect.Message
func (*EstimateNetworkFeeResponse) Reset ¶
func (x *EstimateNetworkFeeResponse) Reset()
func (*EstimateNetworkFeeResponse) String ¶
func (x *EstimateNetworkFeeResponse) String() string
type GetProjectListResponse ¶
type GetProjectListResponse struct { // @inject_tag: json:"projects" bson:"projects" Projects map[string]*BlockchainProject `` /* 163-byte string literal not displayed */ // contains filtered or unexported fields }
func (*GetProjectListResponse) Descriptor
deprecated
func (*GetProjectListResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetProjectListResponse.ProtoReflect.Descriptor instead.
func (*GetProjectListResponse) GetProjects ¶
func (x *GetProjectListResponse) GetProjects() map[string]*BlockchainProject
func (*GetProjectListResponse) ProtoMessage ¶
func (*GetProjectListResponse) ProtoMessage()
func (*GetProjectListResponse) ProtoReflect ¶
func (x *GetProjectListResponse) ProtoReflect() protoreflect.Message
func (*GetProjectListResponse) Reset ¶
func (x *GetProjectListResponse) Reset()
func (*GetProjectListResponse) String ¶
func (x *GetProjectListResponse) String() string
type NFTMetaRequest ¶
type NFTMetaRequest struct { // @inject_tag: json:"network" bson:"network" validate:"required,oneof=BSC // ETH" required:"true" // // ID of a network. Examples "ETH", "BSC". Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network" bson:"network"` // @inject_tag: json:"nft_project_id" bson:"nft_project_id" // // Merchant's project ID (BSON hash). NftProjectId string `protobuf:"bytes,2,opt,name=nft_project_id,json=nftProjectId,proto3" json:"nft_project_id" bson:"nft_project_id"` // contains filtered or unexported fields }
func (*NFTMetaRequest) Descriptor
deprecated
func (*NFTMetaRequest) Descriptor() ([]byte, []int)
Deprecated: Use NFTMetaRequest.ProtoReflect.Descriptor instead.
func (*NFTMetaRequest) GetNetwork ¶
func (x *NFTMetaRequest) GetNetwork() string
func (*NFTMetaRequest) GetNftProjectId ¶
func (x *NFTMetaRequest) GetNftProjectId() string
func (*NFTMetaRequest) ProtoMessage ¶
func (*NFTMetaRequest) ProtoMessage()
func (*NFTMetaRequest) ProtoReflect ¶
func (x *NFTMetaRequest) ProtoReflect() protoreflect.Message
func (*NFTMetaRequest) Reset ¶
func (x *NFTMetaRequest) Reset()
func (*NFTMetaRequest) String ¶
func (x *NFTMetaRequest) String() string
type NFTMetaResponse ¶
type NFTMetaResponse struct { // @inject_tag: json:"token_symbol" bson:"token_symbol" TokenSymbol string `protobuf:"bytes,1,opt,name=token_symbol,json=tokenSymbol,proto3" json:"token_symbol" bson:"token_symbol"` // @inject_tag: json:"token_name" bson:"token_name" TokenName string `protobuf:"bytes,2,opt,name=token_name,json=tokenName,proto3" json:"token_name" bson:"token_name"` // @inject_tag: json:"token_price" bson:"token_price" TokenPrice string `protobuf:"bytes,3,opt,name=token_price,json=tokenPrice,proto3" json:"token_price" bson:"token_price"` // contains filtered or unexported fields }
func (*NFTMetaResponse) Descriptor
deprecated
func (*NFTMetaResponse) Descriptor() ([]byte, []int)
Deprecated: Use NFTMetaResponse.ProtoReflect.Descriptor instead.
func (*NFTMetaResponse) GetTokenName ¶
func (x *NFTMetaResponse) GetTokenName() string
func (*NFTMetaResponse) GetTokenPrice ¶
func (x *NFTMetaResponse) GetTokenPrice() string
func (*NFTMetaResponse) GetTokenSymbol ¶
func (x *NFTMetaResponse) GetTokenSymbol() string
func (*NFTMetaResponse) ProtoMessage ¶
func (*NFTMetaResponse) ProtoMessage()
func (*NFTMetaResponse) ProtoReflect ¶
func (x *NFTMetaResponse) ProtoReflect() protoreflect.Message
func (*NFTMetaResponse) Reset ¶
func (x *NFTMetaResponse) Reset()
func (*NFTMetaResponse) String ¶
func (x *NFTMetaResponse) String() string
type OrderStatus ¶
type OrderStatus int32
const ( OrderStatus_UNINITIALIZED OrderStatus = 0 OrderStatus_ACCEPTED OrderStatus = 1 OrderStatus_MINT_TX_PLACED OrderStatus = 2 OrderStatus_BAYOUT_TX_PLACED OrderStatus = 3 OrderStatus_ACQUIRED OrderStatus = 4 OrderStatus_SHIPPED OrderStatus = 5 OrderStatus_FAILED OrderStatus = 6 )
func (OrderStatus) Descriptor ¶
func (OrderStatus) Descriptor() protoreflect.EnumDescriptor
func (OrderStatus) Enum ¶
func (x OrderStatus) Enum() *OrderStatus
func (OrderStatus) EnumDescriptor
deprecated
func (OrderStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use OrderStatus.Descriptor instead.
func (OrderStatus) Number ¶
func (x OrderStatus) Number() protoreflect.EnumNumber
func (OrderStatus) String ¶
func (x OrderStatus) String() string
func (OrderStatus) Type ¶
func (OrderStatus) Type() protoreflect.EnumType
type ProcessNftMessage ¶
type ProcessNftMessage struct { // @inject_tag: json:"order_status" bson:"order_status" OrderStatus OrderStatus `` /* 136-byte string literal not displayed */ // @inject_tag: json:"order_id" bson:"order_id" OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id" bson:"order_id"` // @inject_tag: json:"tx_id" bson:"tx_id" TxId string `protobuf:"bytes,3,opt,name=tx_id,json=txId,proto3" json:"tx_id" bson:"tx_id"` // @inject_tag: json:"tx_fee" bson:"tx_fee" TxFee string `protobuf:"bytes,4,opt,name=tx_fee,json=txFee,proto3" json:"tx_fee" bson:"tx_fee"` // contains filtered or unexported fields }
func (*ProcessNftMessage) Descriptor
deprecated
func (*ProcessNftMessage) Descriptor() ([]byte, []int)
Deprecated: Use ProcessNftMessage.ProtoReflect.Descriptor instead.
func (*ProcessNftMessage) GetOrderId ¶
func (x *ProcessNftMessage) GetOrderId() string
func (*ProcessNftMessage) GetOrderStatus ¶
func (x *ProcessNftMessage) GetOrderStatus() OrderStatus
func (*ProcessNftMessage) GetTxFee ¶
func (x *ProcessNftMessage) GetTxFee() string
func (*ProcessNftMessage) GetTxId ¶
func (x *ProcessNftMessage) GetTxId() string
func (*ProcessNftMessage) ProtoMessage ¶
func (*ProcessNftMessage) ProtoMessage()
func (*ProcessNftMessage) ProtoReflect ¶
func (x *ProcessNftMessage) ProtoReflect() protoreflect.Message
func (*ProcessNftMessage) Reset ¶
func (x *ProcessNftMessage) Reset()
func (*ProcessNftMessage) String ¶
func (x *ProcessNftMessage) String() string
type ProcessNftRequest ¶
type ProcessNftRequest struct { // @inject_tag: json:"network" bson:"network" // // ID of a network. Examples "ETH", "BSC". Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network" bson:"network"` // @inject_tag: json:"nft_project_id" bson:"nft_project_id" // // Merchant's project ID (BSON hash). NftProjectId string `protobuf:"bytes,2,opt,name=nft_project_id,json=nftProjectId,proto3" json:"nft_project_id" bson:"nft_project_id"` // @inject_tag: json:"smart_contract_addr" bson:"smart_contract_addr" // // Addres of a smart contract that matches nft_project_id. SmartContractAddr string `` /* 131-byte string literal not displayed */ // @inject_tag: json:"exchange_payout_tx" bson:"exchange_payout_tx" // // ID of inbound transaction from crypto exchange to cover the deal. ExchangePayoutTx string `` /* 127-byte string literal not displayed */ // @inject_tag: json:"nft_price" bson:"nft_price" // // NFT nominal price. NftPrice float64 `protobuf:"fixed64,5,opt,name=nft_price,json=nftPrice,proto3" json:"nft_price" bson:"nft_price"` // @inject_tag: json:"nft_id" bson:"nft_id" // // Optional NFT id (if not being newly minted). NftId string `protobuf:"bytes,6,opt,name=nft_id,json=nftId,proto3" json:"nft_id" bson:"nft_id"` // @inject_tag: json:"owner_wallet" bson:"owner_wallet" // // Customer's wallet ID to ship out the NFT. OwnerWallet string `protobuf:"bytes,7,opt,name=owner_wallet,json=ownerWallet,proto3" json:"owner_wallet" bson:"owner_wallet"` // @inject_tag: json:"order_id" bson:"order_id" // // System order ID. OrderId string `protobuf:"bytes,8,opt,name=order_id,json=orderId,proto3" json:"order_id" bson:"order_id"` // contains filtered or unexported fields }
func (*ProcessNftRequest) Descriptor
deprecated
func (*ProcessNftRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProcessNftRequest.ProtoReflect.Descriptor instead.
func (*ProcessNftRequest) GetExchangePayoutTx ¶
func (x *ProcessNftRequest) GetExchangePayoutTx() string
func (*ProcessNftRequest) GetNetwork ¶
func (x *ProcessNftRequest) GetNetwork() string
func (*ProcessNftRequest) GetNftId ¶
func (x *ProcessNftRequest) GetNftId() string
func (*ProcessNftRequest) GetNftPrice ¶
func (x *ProcessNftRequest) GetNftPrice() float64
func (*ProcessNftRequest) GetNftProjectId ¶
func (x *ProcessNftRequest) GetNftProjectId() string
func (*ProcessNftRequest) GetOrderId ¶
func (x *ProcessNftRequest) GetOrderId() string
func (*ProcessNftRequest) GetOwnerWallet ¶
func (x *ProcessNftRequest) GetOwnerWallet() string
func (*ProcessNftRequest) GetSmartContractAddr ¶
func (x *ProcessNftRequest) GetSmartContractAddr() string
func (*ProcessNftRequest) ProtoMessage ¶
func (*ProcessNftRequest) ProtoMessage()
func (*ProcessNftRequest) ProtoReflect ¶
func (x *ProcessNftRequest) ProtoReflect() protoreflect.Message
func (*ProcessNftRequest) Reset ¶
func (x *ProcessNftRequest) Reset()
func (*ProcessNftRequest) String ¶
func (x *ProcessNftRequest) String() string
type ProcessNftResponse ¶
type ProcessNftResponse struct { // @inject_tag: json:"order_status" bson:"order_status" OrderStatus OrderStatus `` /* 136-byte string literal not displayed */ // @inject_tag: json:"order_id" bson:"order_id" OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id" bson:"order_id"` // contains filtered or unexported fields }
func (*ProcessNftResponse) Descriptor
deprecated
func (*ProcessNftResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProcessNftResponse.ProtoReflect.Descriptor instead.
func (*ProcessNftResponse) GetOrderId ¶
func (x *ProcessNftResponse) GetOrderId() string
func (*ProcessNftResponse) GetOrderStatus ¶
func (x *ProcessNftResponse) GetOrderStatus() OrderStatus
func (*ProcessNftResponse) ProtoMessage ¶
func (*ProcessNftResponse) ProtoMessage()
func (*ProcessNftResponse) ProtoReflect ¶
func (x *ProcessNftResponse) ProtoReflect() protoreflect.Message
func (*ProcessNftResponse) Reset ¶
func (x *ProcessNftResponse) Reset()
func (*ProcessNftResponse) String ¶
func (x *ProcessNftResponse) String() string
type UgsBlockchainService ¶
type UgsBlockchainService interface { ProcessNft(ctx context.Context, in *ProcessNftRequest, opts ...client.CallOption) (*ProcessNftResponse, error) GetProjectList(ctx context.Context, in *empty.Empty, opts ...client.CallOption) (*GetProjectListResponse, error) EstimateNetworkFee(ctx context.Context, in *EstimateNetworkFeeRequest, opts ...client.CallOption) (*EstimateNetworkFeeResponse, error) NFTMeta(ctx context.Context, in *NFTMetaRequest, opts ...client.CallOption) (*NFTMetaResponse, error) }
func NewUgsBlockchainService ¶
func NewUgsBlockchainService(name string, c client.Client) UgsBlockchainService
type UgsBlockchainServiceHandler ¶
type UgsBlockchainServiceHandler interface { ProcessNft(context.Context, *ProcessNftRequest, *ProcessNftResponse) error GetProjectList(context.Context, *empty.Empty, *GetProjectListResponse) error EstimateNetworkFee(context.Context, *EstimateNetworkFeeRequest, *EstimateNetworkFeeResponse) error NFTMeta(context.Context, *NFTMetaRequest, *NFTMetaResponse) error }