Documentation ¶
Index ¶
- type AccountStatusResponse
- type BalanceResponse
- type BankRestClient
- func (client BankRestClient) AccountStatus(request StatusQuery) (response StatusResult, err error)
- func (client BankRestClient) CreateAuction(request CreateAuctionsQuery) (err error)
- func (client BankRestClient) CreateUser(request CreateUserQuery) (err error)
- func (client BankRestClient) DepositAuction(request DepositAuctionQuery) (response DepositStatus, err error)
- func (client BankRestClient) SettleAuction(request SettleAuctionQuery) (err error)
- func (client BankRestClient) TransferIn(request TransferInQuery) (err error)
- func (client BankRestClient) TransferOut(request TransferOutQuery) (err error)
- type BidsResponse
- type ConsoleRestClient
- func (client ConsoleRestClient) AccountStatus(auctionID uint64, address string) (response AccountStatusResponse, err error)
- func (client ConsoleRestClient) Balance(auctionID uint64, address string) (response BalanceResponse, err error)
- func (client ConsoleRestClient) Bids(auctionID uint64) (response BidsResponse, err error)
- func (client ConsoleRestClient) CurrentPrice(auctionID uint64, round uint64) (response CurrentPriceResponse, err error)
- func (client ConsoleRestClient) LastAuctionID() (response LastAuctionIDResponse, err error)
- func (client ConsoleRestClient) Params(auctionID uint64) (response ParamsResponse, err error)
- type CreateAuctionsQuery
- type CreateUserQuery
- type CurrentPriceResponse
- type DepositAuctionQuery
- type DepositStatus
- type LastAuctionIDResponse
- type OutcomeResponse
- type ParamsResponse
- type SettleAuctionQuery
- type StatusQuery
- type StatusResult
- type TransferInQuery
- type TransferOutQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountStatusResponse ¶
type AccountStatusResponse struct { Address string `json:"address"` Balance uint64 `json:"balance"` Bids []auction.RunningBid `json:"bids"` }
AccountStatusResponse describes the balance and running bids of an address
type BalanceResponse ¶
BalanceResponse describes the tracked balance of an address
type BankRestClient ¶
type BankRestClient struct {
// contains filtered or unexported fields
}
BankRestClient manages the REST interface for a calling Auction Services.
func MakeAuctionBankRestClient ¶
func MakeAuctionBankRestClient(url url.URL) BankRestClient
MakeAuctionBankRestClient is the factory for constructing a AuctionRestClient for a given endpoint
func (BankRestClient) AccountStatus ¶
func (client BankRestClient) AccountStatus(request StatusQuery) (response StatusResult, err error)
AccountStatus retrieves the Account status from the Auction Bank instance
func (BankRestClient) CreateAuction ¶
func (client BankRestClient) CreateAuction(request CreateAuctionsQuery) (err error)
CreateAuction attempts to create a new auction within the Auction Bank
func (BankRestClient) CreateUser ¶
func (client BankRestClient) CreateUser(request CreateUserQuery) (err error)
CreateUser attempts to create a new user within the Auction Bank
func (BankRestClient) DepositAuction ¶
func (client BankRestClient) DepositAuction(request DepositAuctionQuery) (response DepositStatus, err error)
DepositAuction attempts to make a deposit within the Auction Bank
func (BankRestClient) SettleAuction ¶
func (client BankRestClient) SettleAuction(request SettleAuctionQuery) (err error)
SettleAuction attempts to settle the current Auction
func (BankRestClient) TransferIn ¶
func (client BankRestClient) TransferIn(request TransferInQuery) (err error)
TransferIn attempts to transfer value to an account within the Auction Bank
func (BankRestClient) TransferOut ¶
func (client BankRestClient) TransferOut(request TransferOutQuery) (err error)
TransferOut attempts to transfer value from an account within the Auction Bank
type BidsResponse ¶
type BidsResponse struct { Success bool `json:"success"` Bids []auction.RunningBid `json:"bids"` }
BidsResponse describes the current bids in the auction
type ConsoleRestClient ¶
type ConsoleRestClient struct {
// contains filtered or unexported fields
}
ConsoleRestClient manages the REST interface for a calling Auction Services.
func MakeAuctionConsoleRestClient ¶
func MakeAuctionConsoleRestClient(url url.URL) ConsoleRestClient
MakeAuctionConsoleRestClient is the factory for constructing a AuctionRestClient for a given endpoint
func (ConsoleRestClient) AccountStatus ¶
func (client ConsoleRestClient) AccountStatus(auctionID uint64, address string) (response AccountStatusResponse, err error)
AccountStatus returns the account status for the given auction id and address
func (ConsoleRestClient) Balance ¶
func (client ConsoleRestClient) Balance(auctionID uint64, address string) (response BalanceResponse, err error)
Balance returns the balance for the given auction id and address
func (ConsoleRestClient) Bids ¶
func (client ConsoleRestClient) Bids(auctionID uint64) (response BidsResponse, err error)
Bids returns the list of bids for the given auction id
func (ConsoleRestClient) CurrentPrice ¶
func (client ConsoleRestClient) CurrentPrice(auctionID uint64, round uint64) (response CurrentPriceResponse, err error)
CurrentPrice returns the current price for the given auction id and round
func (ConsoleRestClient) LastAuctionID ¶
func (client ConsoleRestClient) LastAuctionID() (response LastAuctionIDResponse, err error)
LastAuctionID returns the last auction id
func (ConsoleRestClient) Params ¶
func (client ConsoleRestClient) Params(auctionID uint64) (response ParamsResponse, err error)
Params returns the params for the given auction id
type CreateAuctionsQuery ¶
type CreateAuctionsQuery struct {
Auction string `schema:"auction"`
}
CreateAuctionsQuery is a request to create a new auction
type CreateUserQuery ¶
type CreateUserQuery struct {
Username string `schema:"username"`
}
CreateUserQuery is used to create a user
type CurrentPriceResponse ¶
type CurrentPriceResponse struct { Success bool `json:"success"` AuctionID uint64 `json:"auctionID"` Round uint64 `json:"round"` Price uint64 `json:"price"` }
CurrentPriceResponse describes the auction price for a given auction and round
type DepositAuctionQuery ¶
type DepositAuctionQuery struct { Username string `json:"username"` Auction string `json:"auction"` Bidder string `json:"bidder"` AuctionID uint64 `json:"auctionid"` Amount uint64 `json:"amount"` }
DepositAuctionQuery describes a desired Deposit
type DepositStatus ¶
type DepositStatus struct { Success bool `json:"success"` SignedDepositNote client.BytesBase64 `json:"sigdepb64"` }
DepositStatus is returned in response to DepositAuctionQuery, it contains the desired Deposit, signed as a blob
type LastAuctionIDResponse ¶
type LastAuctionIDResponse struct { AuctionKey basics.Address `json:"auctionKey"` AuctionID uint64 `json:"auctionID"` }
LastAuctionIDResponse describes the ID of the last completed auction
type OutcomeResponse ¶
type OutcomeResponse struct {
Outcome auction.BidOutcomes `json:"outcome"`
}
OutcomeResponse describes the auction bid outcomes
type ParamsResponse ¶
ParamsResponse describes the auction parameters
type SettleAuctionQuery ¶
type SettleAuctionQuery struct { AuctionKey string `schema:"auction"` SigSettlementBlob client.BytesBase64 `schema:"sigsettle"` OutcomesBlob client.BytesBase64 `schema:"outcomes"` }
SettleAuctionQuery defines the end of an auction
type StatusQuery ¶
type StatusQuery struct {
Username string `schema:"username"`
}
StatusQuery is used to learn about a user
type StatusResult ¶
type StatusResult struct { Success bool `json:"success"` Balance uint64 `json:"balance"` Pending uint64 `json:"pending"` }
StatusResult is the response to a StatusQuery
type TransferInQuery ¶
TransferInQuery is a request to add currency to a user's balance
type TransferOutQuery ¶
type TransferOutQuery struct { Username string `schema:"username"` Amount uint64 `schema:"amount"` }
TransferOutQuery is a request to subtract currency from a user's balance