rpc

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

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) Descriptor() ([]byte, []int)

Deprecated: Use Market.ProtoReflect.Descriptor instead.

func (*Market) GetAssetId

func (x *Market) GetAssetId() string

func (*Market) GetBaseRate

func (x *Market) GetBaseRate() string

func (*Market) GetBlockNumber

func (x *Market) GetBlockNumber() int64

func (*Market) GetBorrowApy

func (x *Market) GetBorrowApy() string

func (*Market) GetBorrowCap

func (x *Market) GetBorrowCap() string

func (*Market) GetBorrowIndex

func (x *Market) GetBorrowIndex() string

func (*Market) GetBorrowRatePerBlock

func (x *Market) GetBorrowRatePerBlock() string

func (*Market) GetBorrowers

func (x *Market) GetBorrowers() int64

func (*Market) GetCloseFactor

func (x *Market) GetCloseFactor() string

func (*Market) GetCollateralFactor

func (x *Market) GetCollateralFactor() string

func (*Market) GetCreatedAt

func (x *Market) GetCreatedAt() *timestamppb.Timestamp

func (*Market) GetCtokenAssetId

func (x *Market) GetCtokenAssetId() string

func (*Market) GetCtokens

func (x *Market) GetCtokens() string

func (*Market) GetExchangeRate

func (x *Market) GetExchangeRate() string

func (*Market) GetId

func (x *Market) GetId() int64

func (*Market) GetInitExchangeRate

func (x *Market) GetInitExchangeRate() string

func (*Market) GetJumpMultiplier

func (x *Market) GetJumpMultiplier() string

func (*Market) GetKink

func (x *Market) GetKink() string

func (*Market) GetLiquidationIncentive

func (x *Market) GetLiquidationIncentive() string

func (*Market) GetMultiplier

func (x *Market) GetMultiplier() string

func (*Market) GetPrice

func (x *Market) GetPrice() string

func (*Market) GetPriceUpdateAt

func (x *Market) GetPriceUpdateAt() *timestamppb.Timestamp

func (*Market) GetReserveFactor

func (x *Market) GetReserveFactor() string

func (*Market) GetReserves

func (x *Market) GetReserves() string

func (*Market) GetStatus

func (x *Market) GetStatus() int32

func (*Market) GetSuppliers

func (x *Market) GetSuppliers() int64

func (*Market) GetSupplyApy

func (x *Market) GetSupplyApy() string

func (*Market) GetSupplyRatePerBlock

func (x *Market) GetSupplyRatePerBlock() string

func (*Market) GetSymbol

func (x *Market) GetSymbol() string

func (*Market) GetTotalBorrows

func (x *Market) GetTotalBorrows() string

func (*Market) GetTotalCash

func (x *Market) GetTotalCash() string

func (*Market) GetUpdatedAt

func (x *Market) GetUpdatedAt() *timestamppb.Timestamp

func (*Market) GetUtilizationRate

func (x *Market) GetUtilizationRate() string

func (*Market) ProtoMessage

func (*Market) ProtoMessage()

func (*Market) ProtoReflect

func (x *Market) ProtoReflect() protoreflect.Message

func (*Market) Reset

func (x *Market) Reset()

func (*Market) String

func (x *Market) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use MarketReq.ProtoReflect.Descriptor instead.

func (*MarketReq) ProtoMessage

func (*MarketReq) ProtoMessage()

func (*MarketReq) ProtoReflect

func (x *MarketReq) ProtoReflect() protoreflect.Message

func (*MarketReq) Reset

func (x *MarketReq) Reset()

func (*MarketReq) String

func (x *MarketReq) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use PayReq.ProtoReflect.Descriptor instead.

func (*PayReq) GetAmount

func (x *PayReq) GetAmount() string

func (*PayReq) GetAssetId

func (x *PayReq) GetAssetId() string

func (*PayReq) GetFollowId

func (x *PayReq) GetFollowId() string

func (*PayReq) GetMemoBase64

func (x *PayReq) GetMemoBase64() string

func (*PayReq) GetTraceId

func (x *PayReq) GetTraceId() string

func (*PayReq) GetWithGas

func (x *PayReq) GetWithGas() bool

func (*PayReq) ProtoMessage

func (*PayReq) ProtoMessage()

func (*PayReq) ProtoReflect

func (x *PayReq) ProtoReflect() protoreflect.Message

func (*PayReq) Reset

func (x *PayReq) Reset()

func (*PayReq) String

func (x *PayReq) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use PayResp.ProtoReflect.Descriptor instead.

func (*PayResp) GetTransferInput added in v0.3.0

func (x *PayResp) GetTransferInput() *TransferInput

func (*PayResp) GetUrl

func (x *PayResp) GetUrl() string

func (*PayResp) ProtoMessage

func (*PayResp) ProtoMessage()

func (*PayResp) ProtoReflect

func (x *PayResp) ProtoReflect() protoreflect.Message

func (*PayResp) Reset

func (x *PayResp) Reset()

func (*PayResp) String

func (x *PayResp) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Price.ProtoReflect.Descriptor instead.

func (*Price) GetAssetId

func (x *Price) GetAssetId() string

func (*Price) GetReceiver

func (x *Price) GetReceiver() *PriceReceiver

func (*Price) GetSigners

func (x *Price) GetSigners() []*PriceSigner

func (*Price) GetSymbol

func (x *Price) GetSymbol() string

func (*Price) GetThreshold

func (x *Price) GetThreshold() int32

func (*Price) GetTraceId

func (x *Price) GetTraceId() string

func (*Price) ProtoMessage

func (*Price) ProtoMessage()

func (*Price) ProtoReflect

func (x *Price) ProtoReflect() protoreflect.Message

func (*Price) Reset

func (x *Price) Reset()

func (*Price) String

func (x *Price) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use PriceReq.ProtoReflect.Descriptor instead.

func (*PriceReq) ProtoMessage

func (*PriceReq) ProtoMessage()

func (*PriceReq) ProtoReflect

func (x *PriceReq) ProtoReflect() protoreflect.Message

func (*PriceReq) Reset

func (x *PriceReq) Reset()

func (*PriceReq) String

func (x *PriceReq) String() string

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).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL