Documentation ¶
Index ¶
- Constants
- Variables
- func WriteError(resp http.ResponseWriter, err error)
- type Compound
- type HTTPClient
- type Market
- func (*Market) Descriptor() ([]byte, []int)deprecated
- func (x *Market) GetAssetId() string
- func (x *Market) GetBaseRate() string
- func (x *Market) GetBlockNumber() int64
- func (x *Market) GetBorrowApy() string
- func (x *Market) GetBorrowCap() string
- func (x *Market) GetBorrowIndex() string
- func (x *Market) GetBorrowRatePerBlock() string
- func (x *Market) GetBorrowers() int64
- func (x *Market) GetCloseFactor() string
- func (x *Market) GetCollateralFactor() string
- func (x *Market) GetCreatedAt() *timestamppb.Timestamp
- func (x *Market) GetCtokenAssetId() string
- func (x *Market) GetCtokens() string
- func (x *Market) GetExchangeRate() string
- func (x *Market) GetId() int64
- func (x *Market) GetInitExchangeRate() string
- func (x *Market) GetJumpMultiplier() string
- func (x *Market) GetKink() string
- func (x *Market) GetLiquidationIncentive() string
- func (x *Market) GetMultiplier() string
- func (x *Market) GetPrice() string
- func (x *Market) GetPriceUpdateAt() *timestamppb.Timestamp
- func (x *Market) GetReserveFactor() string
- func (x *Market) GetReserves() string
- func (x *Market) GetStatus() int32
- func (x *Market) GetSuppliers() int64
- func (x *Market) GetSupplyApy() string
- func (x *Market) GetSupplyRatePerBlock() string
- func (x *Market) GetSymbol() string
- func (x *Market) GetTotalBorrows() string
- func (x *Market) GetTotalCash() string
- func (x *Market) GetUpdatedAt() *timestamppb.Timestamp
- func (x *Market) GetUtilizationRate() string
- func (*Market) ProtoMessage()
- func (x *Market) ProtoReflect() protoreflect.Message
- func (x *Market) Reset()
- func (x *Market) String() string
- type MarketListResp
- type MarketReq
- type OpponentMultiSig
- func (*OpponentMultiSig) Descriptor() ([]byte, []int)deprecated
- func (x *OpponentMultiSig) GetReceivers() []string
- func (x *OpponentMultiSig) GetThreshold() int32
- func (*OpponentMultiSig) ProtoMessage()
- func (x *OpponentMultiSig) ProtoReflect() protoreflect.Message
- func (x *OpponentMultiSig) Reset()
- func (x *OpponentMultiSig) String() string
- type PayReq
- func (*PayReq) Descriptor() ([]byte, []int)deprecated
- func (x *PayReq) GetAmount() string
- func (x *PayReq) GetAssetId() string
- func (x *PayReq) GetFollowId() string
- func (x *PayReq) GetMemoBase64() string
- func (x *PayReq) GetTraceId() string
- func (x *PayReq) GetWithGas() bool
- func (*PayReq) ProtoMessage()
- func (x *PayReq) ProtoReflect() protoreflect.Message
- func (x *PayReq) Reset()
- func (x *PayReq) String() string
- type PayResp
- type Price
- func (*Price) Descriptor() ([]byte, []int)deprecated
- func (x *Price) GetAssetId() string
- func (x *Price) GetReceiver() *PriceReceiver
- func (x *Price) GetSigners() []*PriceSigner
- func (x *Price) GetSymbol() string
- func (x *Price) GetThreshold() int32
- func (x *Price) GetTraceId() string
- func (*Price) ProtoMessage()
- func (x *Price) ProtoReflect() protoreflect.Message
- func (x *Price) Reset()
- func (x *Price) String() string
- type PriceReceiver
- func (*PriceReceiver) Descriptor() ([]byte, []int)deprecated
- func (x *PriceReceiver) GetMembers() []string
- func (x *PriceReceiver) GetThreshold() int32
- func (*PriceReceiver) ProtoMessage()
- func (x *PriceReceiver) ProtoReflect() protoreflect.Message
- func (x *PriceReceiver) Reset()
- func (x *PriceReceiver) String() string
- type PriceReq
- type PriceRequestResp
- type PriceSigner
- func (*PriceSigner) Descriptor() ([]byte, []int)deprecated
- func (x *PriceSigner) GetIndex() int32
- func (x *PriceSigner) GetVerifyKey() string
- func (*PriceSigner) ProtoMessage()
- func (x *PriceSigner) ProtoReflect() protoreflect.Message
- func (x *PriceSigner) Reset()
- func (x *PriceSigner) String() string
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)deprecated
- func (x *Transaction) GetAction() int32
- func (x *Transaction) GetAmount() string
- func (x *Transaction) GetAssetId() string
- func (x *Transaction) GetCreatedAt() *timestamppb.Timestamp
- func (x *Transaction) GetData() []byte
- func (x *Transaction) GetFollowId() string
- func (x *Transaction) GetId() int64
- func (x *Transaction) GetSnapshotTraceId() string
- func (x *Transaction) GetTraceId() string
- func (x *Transaction) GetUserId() string
- func (*Transaction) ProtoMessage()
- func (x *Transaction) ProtoReflect() protoreflect.Message
- func (x *Transaction) Reset()
- func (x *Transaction) String() string
- type TransactionListResp
- func (*TransactionListResp) Descriptor() ([]byte, []int)deprecated
- func (x *TransactionListResp) GetData() []*Transaction
- func (*TransactionListResp) ProtoMessage()
- func (x *TransactionListResp) ProtoReflect() protoreflect.Message
- func (x *TransactionListResp) Reset()
- func (x *TransactionListResp) String() string
- type TransactionReq
- func (*TransactionReq) Descriptor() ([]byte, []int)deprecated
- func (x *TransactionReq) GetLimit() int32
- func (x *TransactionReq) GetOffset() *timestamppb.Timestamp
- func (*TransactionReq) ProtoMessage()
- func (x *TransactionReq) ProtoReflect() protoreflect.Message
- func (x *TransactionReq) Reset()
- func (x *TransactionReq) String() string
- type TransferInput
- func (*TransferInput) Descriptor() ([]byte, []int)deprecated
- func (x *TransferInput) GetAmount() string
- func (x *TransferInput) GetAssetId() string
- func (x *TransferInput) GetMemo() string
- func (x *TransferInput) GetOpponentMultisig() *OpponentMultiSig
- func (x *TransferInput) GetTraceId() string
- func (*TransferInput) ProtoMessage()
- func (x *TransferInput) ProtoReflect() protoreflect.Message
- func (x *TransferInput) Reset()
- func (x *TransferInput) String() string
- type TwirpServer
Constants ¶
const CompoundPathPrefix = "/twirp/Compound/"
CompoundPathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html
Variables ¶
var File_service_proto protoreflect.FileDescriptor
Functions ¶
func WriteError ¶
func WriteError(resp http.ResponseWriter, err error)
WriteError writes an HTTP response with a valid Twirp error format (code, msg, meta). Useful outside of the Twirp server (e.g. http middleware), but does not trigger hooks. If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)
Types ¶
type Compound ¶
type Compound interface { AllMarkets(context.Context, *MarketReq) (*MarketListResp, error) PriceRequest(context.Context, *PriceReq) (*PriceRequestResp, error) Transactions(context.Context, *TransactionReq) (*TransactionListResp, error) PayRequest(context.Context, *PayReq) (*PayResp, error) }
func NewCompoundJSONClient ¶
func NewCompoundJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Compound
NewCompoundJSONClient creates a JSON client that implements the Compound interface. It communicates using JSON and can be configured with a custom HTTPClient.
func NewCompoundProtobufClient ¶
func NewCompoundProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) Compound
NewCompoundProtobufClient creates a Protobuf client that implements the Compound interface. It communicates using Protobuf and can be configured with a custom HTTPClient.
type HTTPClient ¶
HTTPClient is the interface used by generated clients to send HTTP requests. It is fulfilled by *(net/http).Client, which is sufficient for most users. Users can provide their own implementation for special retry policies.
HTTPClient implementations should not follow redirects. Redirects are automatically disabled if *(net/http).Client is passed to client constructors. See the withoutRedirects function in this file for more details.
type Market ¶
type Market struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` AssetId string `protobuf:"bytes,2,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` CtokenAssetId string `protobuf:"bytes,4,opt,name=ctoken_asset_id,json=ctokenAssetId,proto3" json:"ctoken_asset_id,omitempty"` TotalCash string `protobuf:"bytes,5,opt,name=total_cash,json=totalCash,proto3" json:"total_cash,omitempty"` TotalBorrows string `protobuf:"bytes,6,opt,name=total_borrows,json=totalBorrows,proto3" json:"total_borrows,omitempty"` Reserves string `protobuf:"bytes,7,opt,name=reserves,proto3" json:"reserves,omitempty"` Ctokens string `protobuf:"bytes,8,opt,name=ctokens,proto3" json:"ctokens,omitempty"` InitExchangeRate string `protobuf:"bytes,9,opt,name=init_exchange_rate,json=initExchangeRate,proto3" json:"init_exchange_rate,omitempty"` ReserveFactor string `protobuf:"bytes,10,opt,name=reserve_factor,json=reserveFactor,proto3" json:"reserve_factor,omitempty"` LiquidationIncentive string `protobuf:"bytes,11,opt,name=liquidation_incentive,json=liquidationIncentive,proto3" json:"liquidation_incentive,omitempty"` BorrowCap string `protobuf:"bytes,12,opt,name=borrow_cap,json=borrowCap,proto3" json:"borrow_cap,omitempty"` CollateralFactor string `protobuf:"bytes,13,opt,name=collateral_factor,json=collateralFactor,proto3" json:"collateral_factor,omitempty"` CloseFactor string `protobuf:"bytes,14,opt,name=close_factor,json=closeFactor,proto3" json:"close_factor,omitempty"` BaseRate string `protobuf:"bytes,15,opt,name=base_rate,json=baseRate,proto3" json:"base_rate,omitempty"` Multiplier string `protobuf:"bytes,16,opt,name=multiplier,proto3" json:"multiplier,omitempty"` JumpMultiplier string `protobuf:"bytes,17,opt,name=jump_multiplier,json=jumpMultiplier,proto3" json:"jump_multiplier,omitempty"` Kink string `protobuf:"bytes,18,opt,name=kink,proto3" json:"kink,omitempty"` BlockNumber int64 `protobuf:"varint,19,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` UtilizationRate string `protobuf:"bytes,20,opt,name=utilization_rate,json=utilizationRate,proto3" json:"utilization_rate,omitempty"` ExchangeRate string `protobuf:"bytes,21,opt,name=exchange_rate,json=exchangeRate,proto3" json:"exchange_rate,omitempty"` SupplyRatePerBlock string `protobuf:"bytes,22,opt,name=supply_rate_per_block,json=supplyRatePerBlock,proto3" json:"supply_rate_per_block,omitempty"` BorrowRatePerBlock string `protobuf:"bytes,23,opt,name=borrow_rate_per_block,json=borrowRatePerBlock,proto3" json:"borrow_rate_per_block,omitempty"` Price string `protobuf:"bytes,24,opt,name=price,proto3" json:"price,omitempty"` PriceUpdateAt *timestamppb.Timestamp `protobuf:"bytes,25,opt,name=price_update_at,json=priceUpdateAt,proto3" json:"price_update_at,omitempty"` BorrowIndex string `protobuf:"bytes,26,opt,name=borrow_index,json=borrowIndex,proto3" json:"borrow_index,omitempty"` Status int32 `protobuf:"varint,27,opt,name=status,proto3" json:"status,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,28,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,29,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` Suppliers int64 `protobuf:"varint,30,opt,name=suppliers,proto3" json:"suppliers,omitempty"` Borrowers int64 `protobuf:"varint,31,opt,name=borrowers,proto3" json:"borrowers,omitempty"` SupplyApy string `protobuf:"bytes,32,opt,name=supply_apy,json=supplyApy,proto3" json:"supply_apy,omitempty"` BorrowApy string `protobuf:"bytes,33,opt,name=borrow_apy,json=borrowApy,proto3" json:"borrow_apy,omitempty"` // contains filtered or unexported fields }
func (*Market) Descriptor
deprecated
func (*Market) GetAssetId ¶
func (*Market) GetBaseRate ¶
func (*Market) GetBlockNumber ¶
func (*Market) GetBorrowApy ¶
func (*Market) GetBorrowCap ¶
func (*Market) GetBorrowIndex ¶
func (*Market) GetBorrowRatePerBlock ¶
func (*Market) GetBorrowers ¶
func (*Market) GetCloseFactor ¶
func (*Market) GetCollateralFactor ¶
func (*Market) GetCreatedAt ¶
func (x *Market) GetCreatedAt() *timestamppb.Timestamp
func (*Market) GetCtokenAssetId ¶
func (*Market) GetCtokens ¶
func (*Market) GetExchangeRate ¶
func (*Market) GetInitExchangeRate ¶
func (*Market) GetJumpMultiplier ¶
func (*Market) GetLiquidationIncentive ¶
func (*Market) GetMultiplier ¶
func (*Market) GetPriceUpdateAt ¶
func (x *Market) GetPriceUpdateAt() *timestamppb.Timestamp
func (*Market) GetReserveFactor ¶
func (*Market) GetReserves ¶
func (*Market) GetSuppliers ¶
func (*Market) GetSupplyApy ¶
func (*Market) GetSupplyRatePerBlock ¶
func (*Market) GetTotalBorrows ¶
func (*Market) GetTotalCash ¶
func (*Market) GetUpdatedAt ¶
func (x *Market) GetUpdatedAt() *timestamppb.Timestamp
func (*Market) GetUtilizationRate ¶
func (*Market) ProtoMessage ¶
func (*Market) ProtoMessage()
func (*Market) ProtoReflect ¶
func (x *Market) ProtoReflect() protoreflect.Message
type MarketListResp ¶
type MarketListResp struct { Data []*Market `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*MarketListResp) Descriptor
deprecated
func (*MarketListResp) Descriptor() ([]byte, []int)
Deprecated: Use MarketListResp.ProtoReflect.Descriptor instead.
func (*MarketListResp) GetData ¶
func (x *MarketListResp) GetData() []*Market
func (*MarketListResp) ProtoMessage ¶
func (*MarketListResp) ProtoMessage()
func (*MarketListResp) ProtoReflect ¶
func (x *MarketListResp) ProtoReflect() protoreflect.Message
func (*MarketListResp) Reset ¶
func (x *MarketListResp) Reset()
func (*MarketListResp) String ¶
func (x *MarketListResp) String() string
type MarketReq ¶
type MarketReq struct {
// contains filtered or unexported fields
}
func (*MarketReq) Descriptor
deprecated
func (*MarketReq) ProtoMessage ¶
func (*MarketReq) ProtoMessage()
func (*MarketReq) ProtoReflect ¶
func (x *MarketReq) ProtoReflect() protoreflect.Message
type OpponentMultiSig ¶ added in v0.3.0
type OpponentMultiSig struct { Receivers []string `protobuf:"bytes,1,rep,name=receivers,proto3" json:"receivers,omitempty"` Threshold int32 `protobuf:"varint,2,opt,name=threshold,proto3" json:"threshold,omitempty"` // contains filtered or unexported fields }
func (*OpponentMultiSig) Descriptor
deprecated
added in
v0.3.0
func (*OpponentMultiSig) Descriptor() ([]byte, []int)
Deprecated: Use OpponentMultiSig.ProtoReflect.Descriptor instead.
func (*OpponentMultiSig) GetReceivers ¶ added in v0.3.0
func (x *OpponentMultiSig) GetReceivers() []string
func (*OpponentMultiSig) GetThreshold ¶ added in v0.3.0
func (x *OpponentMultiSig) GetThreshold() int32
func (*OpponentMultiSig) ProtoMessage ¶ added in v0.3.0
func (*OpponentMultiSig) ProtoMessage()
func (*OpponentMultiSig) ProtoReflect ¶ added in v0.3.0
func (x *OpponentMultiSig) ProtoReflect() protoreflect.Message
func (*OpponentMultiSig) Reset ¶ added in v0.3.0
func (x *OpponentMultiSig) Reset()
func (*OpponentMultiSig) String ¶ added in v0.3.0
func (x *OpponentMultiSig) String() string
type PayReq ¶
type PayReq struct { AssetId string `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` TraceId string `protobuf:"bytes,3,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` FollowId string `protobuf:"bytes,4,opt,name=follow_id,json=followId,proto3" json:"follow_id,omitempty"` MemoBase64 string `protobuf:"bytes,5,opt,name=memo_base64,json=memoBase64,proto3" json:"memo_base64,omitempty"` WithGas bool `protobuf:"varint,6,opt,name=with_gas,json=withGas,proto3" json:"with_gas,omitempty"` // contains filtered or unexported fields }
func (*PayReq) Descriptor
deprecated
func (*PayReq) GetAssetId ¶
func (*PayReq) GetFollowId ¶
func (*PayReq) GetMemoBase64 ¶
func (*PayReq) GetTraceId ¶
func (*PayReq) GetWithGas ¶
func (*PayReq) ProtoMessage ¶
func (*PayReq) ProtoMessage()
func (*PayReq) ProtoReflect ¶
func (x *PayReq) ProtoReflect() protoreflect.Message
type PayResp ¶
type PayResp struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` TransferInput *TransferInput `protobuf:"bytes,2,opt,name=transfer_input,json=transferInput,proto3" json:"transfer_input,omitempty"` // contains filtered or unexported fields }
func (*PayResp) Descriptor
deprecated
func (*PayResp) GetTransferInput ¶ added in v0.3.0
func (x *PayResp) GetTransferInput() *TransferInput
func (*PayResp) ProtoMessage ¶
func (*PayResp) ProtoMessage()
func (*PayResp) ProtoReflect ¶
func (x *PayResp) ProtoReflect() protoreflect.Message
type Price ¶
type Price struct { AssetId string `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` TraceId string `protobuf:"bytes,3,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` Receiver *PriceReceiver `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` Signers []*PriceSigner `protobuf:"bytes,5,rep,name=signers,proto3" json:"signers,omitempty"` Threshold int32 `protobuf:"varint,6,opt,name=threshold,proto3" json:"threshold,omitempty"` // contains filtered or unexported fields }
func (*Price) Descriptor
deprecated
func (*Price) GetAssetId ¶
func (*Price) GetReceiver ¶
func (x *Price) GetReceiver() *PriceReceiver
func (*Price) GetSigners ¶
func (x *Price) GetSigners() []*PriceSigner
func (*Price) GetThreshold ¶
func (*Price) GetTraceId ¶
func (*Price) ProtoMessage ¶
func (*Price) ProtoMessage()
func (*Price) ProtoReflect ¶
func (x *Price) ProtoReflect() protoreflect.Message
type PriceReceiver ¶
type PriceReceiver struct { Members []string `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` Threshold int32 `protobuf:"varint,2,opt,name=threshold,proto3" json:"threshold,omitempty"` // contains filtered or unexported fields }
func (*PriceReceiver) Descriptor
deprecated
func (*PriceReceiver) Descriptor() ([]byte, []int)
Deprecated: Use PriceReceiver.ProtoReflect.Descriptor instead.
func (*PriceReceiver) GetMembers ¶
func (x *PriceReceiver) GetMembers() []string
func (*PriceReceiver) GetThreshold ¶
func (x *PriceReceiver) GetThreshold() int32
func (*PriceReceiver) ProtoMessage ¶
func (*PriceReceiver) ProtoMessage()
func (*PriceReceiver) ProtoReflect ¶
func (x *PriceReceiver) ProtoReflect() protoreflect.Message
func (*PriceReceiver) Reset ¶
func (x *PriceReceiver) Reset()
func (*PriceReceiver) String ¶
func (x *PriceReceiver) String() string
type PriceReq ¶
type PriceReq struct {
// contains filtered or unexported fields
}
func (*PriceReq) Descriptor
deprecated
func (*PriceReq) ProtoMessage ¶
func (*PriceReq) ProtoMessage()
func (*PriceReq) ProtoReflect ¶
func (x *PriceReq) ProtoReflect() protoreflect.Message
type PriceRequestResp ¶
type PriceRequestResp struct { Data []*Price `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*PriceRequestResp) Descriptor
deprecated
func (*PriceRequestResp) Descriptor() ([]byte, []int)
Deprecated: Use PriceRequestResp.ProtoReflect.Descriptor instead.
func (*PriceRequestResp) GetData ¶
func (x *PriceRequestResp) GetData() []*Price
func (*PriceRequestResp) ProtoMessage ¶
func (*PriceRequestResp) ProtoMessage()
func (*PriceRequestResp) ProtoReflect ¶
func (x *PriceRequestResp) ProtoReflect() protoreflect.Message
func (*PriceRequestResp) Reset ¶
func (x *PriceRequestResp) Reset()
func (*PriceRequestResp) String ¶
func (x *PriceRequestResp) String() string
type PriceSigner ¶
type PriceSigner struct { Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` VerifyKey string `protobuf:"bytes,2,opt,name=verify_key,json=verifyKey,proto3" json:"verify_key,omitempty"` // contains filtered or unexported fields }
func (*PriceSigner) Descriptor
deprecated
func (*PriceSigner) Descriptor() ([]byte, []int)
Deprecated: Use PriceSigner.ProtoReflect.Descriptor instead.
func (*PriceSigner) GetIndex ¶
func (x *PriceSigner) GetIndex() int32
func (*PriceSigner) GetVerifyKey ¶
func (x *PriceSigner) GetVerifyKey() string
func (*PriceSigner) ProtoMessage ¶
func (*PriceSigner) ProtoMessage()
func (*PriceSigner) ProtoReflect ¶
func (x *PriceSigner) ProtoReflect() protoreflect.Message
func (*PriceSigner) Reset ¶
func (x *PriceSigner) Reset()
func (*PriceSigner) String ¶
func (x *PriceSigner) String() string
type Transaction ¶
type Transaction struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Action int32 `protobuf:"varint,2,opt,name=action,proto3" json:"action,omitempty"` TraceId string `protobuf:"bytes,3,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` FollowId string `protobuf:"bytes,5,opt,name=follow_id,json=followId,proto3" json:"follow_id,omitempty"` SnapshotTraceId string `protobuf:"bytes,6,opt,name=snapshot_trace_id,json=snapshotTraceId,proto3" json:"snapshot_trace_id,omitempty"` AssetId string `protobuf:"bytes,7,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` Amount string `protobuf:"bytes,8,opt,name=amount,proto3" json:"amount,omitempty"` Data []byte `protobuf:"bytes,9,opt,name=data,proto3" json:"data,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // contains filtered or unexported fields }
func (*Transaction) Descriptor
deprecated
func (*Transaction) Descriptor() ([]byte, []int)
Deprecated: Use Transaction.ProtoReflect.Descriptor instead.
func (*Transaction) GetAction ¶
func (x *Transaction) GetAction() int32
func (*Transaction) GetAmount ¶
func (x *Transaction) GetAmount() string
func (*Transaction) GetAssetId ¶
func (x *Transaction) GetAssetId() string
func (*Transaction) GetCreatedAt ¶
func (x *Transaction) GetCreatedAt() *timestamppb.Timestamp
func (*Transaction) GetData ¶
func (x *Transaction) GetData() []byte
func (*Transaction) GetFollowId ¶
func (x *Transaction) GetFollowId() string
func (*Transaction) GetId ¶
func (x *Transaction) GetId() int64
func (*Transaction) GetSnapshotTraceId ¶
func (x *Transaction) GetSnapshotTraceId() string
func (*Transaction) GetTraceId ¶
func (x *Transaction) GetTraceId() string
func (*Transaction) GetUserId ¶
func (x *Transaction) GetUserId() string
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) ProtoReflect ¶
func (x *Transaction) ProtoReflect() protoreflect.Message
func (*Transaction) Reset ¶
func (x *Transaction) Reset()
func (*Transaction) String ¶
func (x *Transaction) String() string
type TransactionListResp ¶
type TransactionListResp struct { Data []*Transaction `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*TransactionListResp) Descriptor
deprecated
func (*TransactionListResp) Descriptor() ([]byte, []int)
Deprecated: Use TransactionListResp.ProtoReflect.Descriptor instead.
func (*TransactionListResp) GetData ¶
func (x *TransactionListResp) GetData() []*Transaction
func (*TransactionListResp) ProtoMessage ¶
func (*TransactionListResp) ProtoMessage()
func (*TransactionListResp) ProtoReflect ¶
func (x *TransactionListResp) ProtoReflect() protoreflect.Message
func (*TransactionListResp) Reset ¶
func (x *TransactionListResp) Reset()
func (*TransactionListResp) String ¶
func (x *TransactionListResp) String() string
type TransactionReq ¶
type TransactionReq struct { Offset *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=offset,proto3" json:"offset,omitempty"` Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*TransactionReq) Descriptor
deprecated
func (*TransactionReq) Descriptor() ([]byte, []int)
Deprecated: Use TransactionReq.ProtoReflect.Descriptor instead.
func (*TransactionReq) GetLimit ¶
func (x *TransactionReq) GetLimit() int32
func (*TransactionReq) GetOffset ¶
func (x *TransactionReq) GetOffset() *timestamppb.Timestamp
func (*TransactionReq) ProtoMessage ¶
func (*TransactionReq) ProtoMessage()
func (*TransactionReq) ProtoReflect ¶
func (x *TransactionReq) ProtoReflect() protoreflect.Message
func (*TransactionReq) Reset ¶
func (x *TransactionReq) Reset()
func (*TransactionReq) String ¶
func (x *TransactionReq) String() string
type TransferInput ¶ added in v0.3.0
type TransferInput struct { AssetId string `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` TraceId string `protobuf:"bytes,3,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` Memo string `protobuf:"bytes,4,opt,name=memo,proto3" json:"memo,omitempty"` OpponentMultisig *OpponentMultiSig `protobuf:"bytes,5,opt,name=opponent_multisig,json=opponentMultisig,proto3" json:"opponent_multisig,omitempty"` // contains filtered or unexported fields }
func (*TransferInput) Descriptor
deprecated
added in
v0.3.0
func (*TransferInput) Descriptor() ([]byte, []int)
Deprecated: Use TransferInput.ProtoReflect.Descriptor instead.
func (*TransferInput) GetAmount ¶ added in v0.3.0
func (x *TransferInput) GetAmount() string
func (*TransferInput) GetAssetId ¶ added in v0.3.0
func (x *TransferInput) GetAssetId() string
func (*TransferInput) GetMemo ¶ added in v0.3.0
func (x *TransferInput) GetMemo() string
func (*TransferInput) GetOpponentMultisig ¶ added in v0.3.0
func (x *TransferInput) GetOpponentMultisig() *OpponentMultiSig
func (*TransferInput) GetTraceId ¶ added in v0.3.0
func (x *TransferInput) GetTraceId() string
func (*TransferInput) ProtoMessage ¶ added in v0.3.0
func (*TransferInput) ProtoMessage()
func (*TransferInput) ProtoReflect ¶ added in v0.3.0
func (x *TransferInput) ProtoReflect() protoreflect.Message
func (*TransferInput) Reset ¶ added in v0.3.0
func (x *TransferInput) Reset()
func (*TransferInput) String ¶ added in v0.3.0
func (x *TransferInput) String() string
type TwirpServer ¶
type TwirpServer interface { http.Handler // ServiceDescriptor returns gzipped bytes describing the .proto file that // this service was generated from. Once unzipped, the bytes can be // unmarshalled as a // google.golang.org/protobuf/types/descriptorpb.FileDescriptorProto. // // The returned integer is the index of this particular service within that // FileDescriptorProto's 'Service' slice of ServiceDescriptorProtos. This is a // low-level field, expected to be used for reflection. ServiceDescriptor() ([]byte, int) // ProtocGenTwirpVersion is the semantic version string of the version of // twirp used to generate this file. ProtocGenTwirpVersion() string // PathPrefix returns the HTTP URL path prefix for all methods handled by this // service. This can be used with an HTTP mux to route Twirp requests. // The path prefix is in the form: "/<prefix>/<package>.<Service>/" // that is, everything in a Twirp route except for the <Method> at the end. PathPrefix() string }
TwirpServer is the interface generated server structs will support: they're HTTP handlers with additional methods for accessing metadata about the service. Those accessors are a low-level API for building reflection tools. Most people can think of TwirpServers as just http.Handlers.
func NewCompoundServer ¶
func NewCompoundServer(svc Compound, opts ...interface{}) TwirpServer
NewCompoundServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).