Documentation ¶
Index ¶
- func LoggerMiddleware(c *web.C, h http.Handler) http.Handler
- func RecoverMiddleware(c *web.C, h http.Handler) http.Handler
- func SetVersion(v string)
- type AccountIndexAction
- func (action *AccountIndexAction) JSON()
- func (action *AccountIndexAction) LoadPage()
- func (action *AccountIndexAction) LoadQuery()
- func (action *AccountIndexAction) LoadRecords()
- func (action *AccountIndexAction) SSE(stream sse.Stream)
- func (action AccountIndexAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
- type AccountShowAction
- func (action *AccountShowAction) JSON()
- func (action *AccountShowAction) LoadQuery()
- func (action *AccountShowAction) LoadRecord()
- func (action *AccountShowAction) LoadResource()
- func (action *AccountShowAction) SSE(stream sse.Stream)
- func (action AccountShowAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
- type Action
- func (action *Action) BaseURL() *url.URL
- func (action *Action) GetPageQuery() db.PageQuery
- func (action *Action) GetPagingParams() (cursor string, order string, limit int32)
- func (action *Action) Prepare(c web.C, w http.ResponseWriter, r *http.Request)
- func (action *Action) ValidateCursorAsDefault()
- type App
- func (a *App) Close()
- func (a *App) CoreQuery() db.SqlQuery
- func (a *App) HistoryQuery() db.SqlQuery
- func (app *App) Middleware(c *web.C, h http.Handler) http.Handler
- func (a *App) Serve()
- func (a *App) UpdateLedgerState()
- func (a *App) UpdateMetrics(ctx context.Context)
- func (a *App) UpdateStellarCoreInfo()
- type Config
- type EffectIndexAction
- func (action *EffectIndexAction) JSON()
- func (action *EffectIndexAction) LoadPage()
- func (action *EffectIndexAction) LoadQuery()
- func (action *EffectIndexAction) LoadRecords()
- func (action *EffectIndexAction) SSE(stream sse.Stream)
- func (action EffectIndexAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
- func (action *EffectIndexAction) ValidateCursor()
- type FriendbotAction
- type InitFn
- type LedgerIndexAction
- func (action *LedgerIndexAction) JSON()
- func (action *LedgerIndexAction) LoadPage()
- func (action *LedgerIndexAction) LoadQuery()
- func (action *LedgerIndexAction) LoadRecords()
- func (action *LedgerIndexAction) SSE(stream sse.Stream)
- func (action LedgerIndexAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
- type LedgerShowAction
- type MetricsAction
- type NotFoundAction
- type NotImplementedAction
- type OffersByAccountAction
- func (action *OffersByAccountAction) JSON()
- func (action *OffersByAccountAction) LoadPage()
- func (action *OffersByAccountAction) LoadQuery()
- func (action *OffersByAccountAction) LoadRecords()
- func (action *OffersByAccountAction) SSE(stream sse.Stream)
- func (action OffersByAccountAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
- type OperationIndexAction
- func (action *OperationIndexAction) JSON()
- func (action *OperationIndexAction) LoadPage()
- func (action *OperationIndexAction) LoadQuery()
- func (action *OperationIndexAction) LoadRecords()
- func (action *OperationIndexAction) SSE(stream sse.Stream)
- func (action OperationIndexAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
- type OperationShowAction
- type OrderBookShowAction
- func (action *OrderBookShowAction) JSON()
- func (action *OrderBookShowAction) LoadQuery()
- func (action *OrderBookShowAction) LoadRecord()
- func (action *OrderBookShowAction) LoadResource()
- func (action *OrderBookShowAction) SSE(stream sse.Stream)
- func (action OrderBookShowAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
- type PathIndexAction
- func (action *PathIndexAction) JSON()
- func (action *PathIndexAction) LoadPage()
- func (action *PathIndexAction) LoadQuery()
- func (action *PathIndexAction) LoadRecords()
- func (action *PathIndexAction) LoadSourceAssets()
- func (action PathIndexAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
- type PaymentsIndexAction
- func (action *PaymentsIndexAction) JSON()
- func (action *PaymentsIndexAction) LoadPage()
- func (action *PaymentsIndexAction) LoadQuery()
- func (action *PaymentsIndexAction) LoadRecords()
- func (action *PaymentsIndexAction) SSE(stream sse.Stream)
- func (action PaymentsIndexAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
- type RateLimitExceededAction
- type RootAction
- type TradeIndexAction
- type TransactionCreateAction
- type TransactionIndexAction
- func (action *TransactionIndexAction) JSON()
- func (action *TransactionIndexAction) LoadPage()
- func (action *TransactionIndexAction) LoadQuery()
- func (action *TransactionIndexAction) LoadRecords()
- func (action *TransactionIndexAction) SSE(stream sse.Stream)
- func (action TransactionIndexAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
- type TransactionShowAction
- type Web
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggerMiddleware ¶
LoggerMiddleware is the middleware that logs http requests and resposnes to the logging subsytem of horizon.
func RecoverMiddleware ¶
RecoverMiddleware helps the server recover from panics. It ensures that no request can fully bring down the horizon server, and it also logs the panics to the logging subsystem.
func SetVersion ¶
func SetVersion(v string)
Types ¶
type AccountIndexAction ¶
type AccountIndexAction struct { Action Query db.HistoryAccountPageQuery Records []db.HistoryAccountRecord Page hal.Page }
AccountIndexAction renders a page of account resources, identified by a normal page query, ordered by the operation id that created them.
func (*AccountIndexAction) JSON ¶
func (action *AccountIndexAction) JSON()
JSON is a method for actions.JSON
func (*AccountIndexAction) LoadPage ¶
func (action *AccountIndexAction) LoadPage()
LoadPage populates action.Page
func (*AccountIndexAction) LoadQuery ¶
func (action *AccountIndexAction) LoadQuery()
LoadQuery sets action.Query from the request params
func (*AccountIndexAction) LoadRecords ¶
func (action *AccountIndexAction) LoadRecords()
LoadRecords populates action.Records
func (*AccountIndexAction) SSE ¶
func (action *AccountIndexAction) SSE(stream sse.Stream)
SSE is a method for actions.SSE
func (AccountIndexAction) ServeHTTPC ¶
func (action AccountIndexAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type AccountShowAction ¶
type AccountShowAction struct { Action Query db.AccountByAddressQuery Record db.AccountRecord Resource resource.Account }
AccountShowAction renders a account summary found by its address.
func (*AccountShowAction) JSON ¶
func (action *AccountShowAction) JSON()
JSON is a method for actions.JSON
func (*AccountShowAction) LoadQuery ¶
func (action *AccountShowAction) LoadQuery()
LoadQuery sets action.Query from the request params
func (*AccountShowAction) LoadRecord ¶
func (action *AccountShowAction) LoadRecord()
LoadRecord populates action.Record
func (*AccountShowAction) LoadResource ¶
func (action *AccountShowAction) LoadResource()
LoadResource populates action.Resource
func (*AccountShowAction) SSE ¶
func (action *AccountShowAction) SSE(stream sse.Stream)
SSE is a method for actions.SSE
func (AccountShowAction) ServeHTTPC ¶
func (action AccountShowAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type Action ¶
Action is the "base type" for all actions in horizon. It provides structs that embed it with access to the App struct.
Additionally, this type is a trigger for go-codegen and causes the file at Action.tmpl to be instantiated for each struct that embeds Action.
func (*Action) GetPageQuery ¶
GetPageQuery is a helper that returns a new db.PageQuery struct initialized using the results from a call to GetPagingParams()
func (*Action) GetPagingParams ¶
GetPagingParams modifies the base GetPagingParams method to replace cursors that are "now" with the last seen ledger's cursor.
func (*Action) ValidateCursorAsDefault ¶
func (action *Action) ValidateCursorAsDefault()
type App ¶
type App struct {
// contains filtered or unexported fields
}
func AppFromContext ¶
AppFromContext retrieves a *App from the context tree.
func (*App) Close ¶
func (a *App) Close()
Close cancels the app and forces the closure of db connections
func (*App) CoreQuery ¶
CoreQuery returns a SqlQuery that can be embedded in a parent query to specify the query should run against the connected stellar core database
func (*App) HistoryQuery ¶
HistoryQuery returns a SqlQuery that can be embedded in a parent query to specify the query should run against the history database
func (*App) Middleware ¶
Adds the "app" env key into every request, so that subsequence middleware or handlers can retrieve a horizon.App instance
func (*App) Serve ¶
func (a *App) Serve()
Serve starts the horizon system, binding it to a socket, setting up the shutdown signals and starting the appropriate db-streaming pumps.
func (*App) UpdateLedgerState ¶
func (a *App) UpdateLedgerState()
UpdateMetrics triggers a refresh of several metrics gauges, such as open db connections and ledger state
func (*App) UpdateMetrics ¶
UpdateMetrics triggers a refresh of several metrics gauges, such as open db connections and ledger state
func (*App) UpdateStellarCoreInfo ¶
func (a *App) UpdateStellarCoreInfo()
UpdateCoreVersion updates the value of coreVersion from the Stellar core API
type Config ¶
type Config struct { DatabaseUrl string StellarCoreDatabaseUrl string StellarCoreUrl string RubyHorizonUrl string Port int Autopump bool RateLimit throttled.Quota RedisUrl string LogLevel logrus.Level SentryDSN string LogglyHost string LogglyToken string FriendbotSecret string }
Config is the configuration for horizon. It get's populated by the app's main function and is provided to NewApp.
type EffectIndexAction ¶
type EffectIndexAction struct { Action Query db.EffectPageQuery Records []db.EffectRecord Page hal.Page }
EffectIndexAction renders a page of effect resources, identified by a normal page query and optionally filtered by an account, ledger, transaction, or operation.
func (*EffectIndexAction) JSON ¶
func (action *EffectIndexAction) JSON()
JSON is a method for actions.JSON
func (*EffectIndexAction) LoadPage ¶
func (action *EffectIndexAction) LoadPage()
LoadPage populates action.Page
func (*EffectIndexAction) LoadQuery ¶
func (action *EffectIndexAction) LoadQuery()
LoadQuery sets action.Query from the request params
func (*EffectIndexAction) LoadRecords ¶
func (action *EffectIndexAction) LoadRecords()
LoadRecords populates action.Records
func (*EffectIndexAction) SSE ¶
func (action *EffectIndexAction) SSE(stream sse.Stream)
SSE is a method for actions.SSE
func (EffectIndexAction) ServeHTTPC ¶
func (action EffectIndexAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
func (*EffectIndexAction) ValidateCursor ¶
func (action *EffectIndexAction) ValidateCursor()
ValidateCursor ensures that the provided cursor parameter is of the form OPERATIONID-INDEX (such as 1234-56) or is the special value "now" that represents the the cursor directly after the last closed ledger
type FriendbotAction ¶
type FriendbotAction struct { TransactionCreateAction Address string }
func (*FriendbotAction) CheckEnabled ¶
func (action *FriendbotAction) CheckEnabled()
func (*FriendbotAction) JSON ¶
func (action *FriendbotAction) JSON()
JSON is a method for actions.JSON
func (*FriendbotAction) LoadAddress ¶
func (action *FriendbotAction) LoadAddress()
func (*FriendbotAction) LoadResult ¶
func (action *FriendbotAction) LoadResult()
func (FriendbotAction) ServeHTTPC ¶
func (action FriendbotAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type InitFn ¶
type InitFn func(*App)
InitFn is a function that contributes to the initialization of an App struct
type LedgerIndexAction ¶
type LedgerIndexAction struct { Action Query db.LedgerPageQuery Records []db.LedgerRecord Page hal.Page }
LedgerIndexAction renders a page of ledger resources, identified by a normal page query.
func (*LedgerIndexAction) JSON ¶
func (action *LedgerIndexAction) JSON()
JSON is a method for actions.JSON
func (*LedgerIndexAction) LoadPage ¶
func (action *LedgerIndexAction) LoadPage()
LoadPage populates action.Page
func (*LedgerIndexAction) LoadQuery ¶
func (action *LedgerIndexAction) LoadQuery()
LoadQuery sets action.Query from the request params
func (*LedgerIndexAction) LoadRecords ¶
func (action *LedgerIndexAction) LoadRecords()
LoadRecords populates action.Records
func (*LedgerIndexAction) SSE ¶
func (action *LedgerIndexAction) SSE(stream sse.Stream)
SSE is a method for actions.SSE
func (LedgerIndexAction) ServeHTTPC ¶
func (action LedgerIndexAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type LedgerShowAction ¶
type LedgerShowAction struct { Action Query db.LedgerBySequenceQuery Record db.LedgerRecord }
LedgerShowAction renders a ledger found by its sequence number.
func (*LedgerShowAction) JSON ¶
func (action *LedgerShowAction) JSON()
JSON is a method for actions.JSON
func (*LedgerShowAction) LoadQuery ¶
func (action *LedgerShowAction) LoadQuery()
func (*LedgerShowAction) LoadRecord ¶
func (action *LedgerShowAction) LoadRecord()
func (LedgerShowAction) ServeHTTPC ¶
func (action LedgerShowAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type MetricsAction ¶
MetricsAction collects and renders a snapshot from the metrics system that will inlude any previously registered metrics.
func (*MetricsAction) LoadSnapshot ¶
func (action *MetricsAction) LoadSnapshot()
LoadSnapshot populates action.Snapshot
Original code copied from github.com/rcrowley/go-metrics MarshalJSON
func (MetricsAction) ServeHTTPC ¶
func (action MetricsAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type NotFoundAction ¶
type NotFoundAction struct {
Action
}
NotFoundAction renders a 404 response
func (*NotFoundAction) JSON ¶
func (action *NotFoundAction) JSON()
JSON is a method for actions.JSON
func (NotFoundAction) ServeHTTPC ¶
func (action NotFoundAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type NotImplementedAction ¶
type NotImplementedAction struct {
Action
}
NotImplementedAction renders a NotImplemented prblem
func (*NotImplementedAction) JSON ¶
func (action *NotImplementedAction) JSON()
JSON is a method for actions.JSON
func (NotImplementedAction) ServeHTTPC ¶
func (action NotImplementedAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type OffersByAccountAction ¶
type OffersByAccountAction struct { Action Query db.CoreOfferPageByAddressQuery Records []db.CoreOfferRecord Page hal.Page }
OffersByAccountAction renders a page of offer resources, for a given account. These offers are present in the ledger as of the latest validated ledger.
func (*OffersByAccountAction) JSON ¶
func (action *OffersByAccountAction) JSON()
JSON is a method for actions.JSON
func (*OffersByAccountAction) LoadPage ¶
func (action *OffersByAccountAction) LoadPage()
LoadPage populates action.Page
func (*OffersByAccountAction) LoadQuery ¶
func (action *OffersByAccountAction) LoadQuery()
LoadQuery sets action.Query from the request params
func (*OffersByAccountAction) LoadRecords ¶
func (action *OffersByAccountAction) LoadRecords()
LoadRecords populates action.Records
func (*OffersByAccountAction) SSE ¶
func (action *OffersByAccountAction) SSE(stream sse.Stream)
SSE is a method for actions.SSE
func (OffersByAccountAction) ServeHTTPC ¶
func (action OffersByAccountAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type OperationIndexAction ¶
type OperationIndexAction struct { Action Query db.OperationPageQuery Records []db.OperationRecord Page hal.Page }
OperationIndexAction renders a page of operations resources, identified by a normal page query and optionally filtered by an account, ledger, or transaction.
func (*OperationIndexAction) JSON ¶
func (action *OperationIndexAction) JSON()
JSON is a method for actions.JSON
func (*OperationIndexAction) LoadPage ¶
func (action *OperationIndexAction) LoadPage()
LoadPage populates action.Page
func (*OperationIndexAction) LoadQuery ¶
func (action *OperationIndexAction) LoadQuery()
LoadQuery sets action.Query from the request params
func (*OperationIndexAction) LoadRecords ¶
func (action *OperationIndexAction) LoadRecords()
LoadRecords populates action.Records
func (*OperationIndexAction) SSE ¶
func (action *OperationIndexAction) SSE(stream sse.Stream)
SSE is a method for actions.SSE
func (OperationIndexAction) ServeHTTPC ¶
func (action OperationIndexAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type OperationShowAction ¶
type OperationShowAction struct { Action Query db.OperationByIdQuery Record db.OperationRecord Resource interface{} }
OperationShowAction renders a ledger found by its sequence number.
func (*OperationShowAction) JSON ¶
func (action *OperationShowAction) JSON()
JSON is a method for actions.JSON
func (*OperationShowAction) LoadQuery ¶
func (action *OperationShowAction) LoadQuery()
func (*OperationShowAction) LoadRecord ¶
func (action *OperationShowAction) LoadRecord()
func (*OperationShowAction) LoadResource ¶
func (action *OperationShowAction) LoadResource()
func (OperationShowAction) ServeHTTPC ¶
func (action OperationShowAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type OrderBookShowAction ¶
type OrderBookShowAction struct { Action Query *db.OrderBookSummaryQuery Record db.OrderBookSummaryRecord Resource resource.OrderBookSummary }
OrderBookShowAction renders a account summary found by its address.
func (*OrderBookShowAction) JSON ¶
func (action *OrderBookShowAction) JSON()
JSON is a method for actions.JSON
func (*OrderBookShowAction) LoadQuery ¶
func (action *OrderBookShowAction) LoadQuery()
LoadQuery sets action.Query from the request params
func (*OrderBookShowAction) LoadRecord ¶
func (action *OrderBookShowAction) LoadRecord()
LoadRecord populates action.Record
func (*OrderBookShowAction) LoadResource ¶
func (action *OrderBookShowAction) LoadResource()
LoadResource populates action.Record
func (*OrderBookShowAction) SSE ¶
func (action *OrderBookShowAction) SSE(stream sse.Stream)
SSE is a method for actions.SSE
func (OrderBookShowAction) ServeHTTPC ¶
func (action OrderBookShowAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type PathIndexAction ¶
PathIndexAction provides path finding
func (*PathIndexAction) LoadPage ¶
func (action *PathIndexAction) LoadPage()
LoadResources converts the found records into JSON resources
func (*PathIndexAction) LoadQuery ¶
func (action *PathIndexAction) LoadQuery()
LoadQuery builds the path finding query based upon the request parameters.
func (*PathIndexAction) LoadRecords ¶
func (action *PathIndexAction) LoadRecords()
LoadRecords performs the path find and populates action.Records
func (*PathIndexAction) LoadSourceAssets ¶
func (action *PathIndexAction) LoadSourceAssets()
func (PathIndexAction) ServeHTTPC ¶
func (action PathIndexAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type PaymentsIndexAction ¶
type PaymentsIndexAction struct { Action Query db.OperationPageQuery Records []db.OperationRecord Page hal.Page }
func (*PaymentsIndexAction) JSON ¶
func (action *PaymentsIndexAction) JSON()
JSON is a method for actions.JSON
func (*PaymentsIndexAction) LoadPage ¶
func (action *PaymentsIndexAction) LoadPage()
LoadPage populates action.Page
func (*PaymentsIndexAction) LoadQuery ¶
func (action *PaymentsIndexAction) LoadQuery()
LoadQuery sets action.Query from the request params
func (*PaymentsIndexAction) LoadRecords ¶
func (action *PaymentsIndexAction) LoadRecords()
LoadRecords populates action.Records
func (*PaymentsIndexAction) SSE ¶
func (action *PaymentsIndexAction) SSE(stream sse.Stream)
SSE is a method for actions.SSE
func (PaymentsIndexAction) ServeHTTPC ¶
func (action PaymentsIndexAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type RateLimitExceededAction ¶
RateLimitExceededAction renders a 429 response
func (RateLimitExceededAction) ServeHTTP ¶
func (action RateLimitExceededAction) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
func (RateLimitExceededAction) ServeHTTPC ¶
func (action RateLimitExceededAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type RootAction ¶
type RootAction struct {
Action
}
RootAction provides a summary of the horizon instance and links to various useful endpoints
func (*RootAction) JSON ¶
func (action *RootAction) JSON()
JSON renders the json response for RootAction
func (RootAction) ServeHTTPC ¶
func (action RootAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type TradeIndexAction ¶
type TradeIndexAction struct { Action Query db.EffectPageQuery Records []db.EffectRecord Page hal.Page }
TradeIndexAction renders a page of effect resources, filtered to include only trades, identified by a normal page query and optionally filtered by an account or order book
func (*TradeIndexAction) JSON ¶
func (action *TradeIndexAction) JSON()
JSON is a method for actions.JSON
func (*TradeIndexAction) LoadPage ¶
func (action *TradeIndexAction) LoadPage()
LoadPage populates action.Page
func (*TradeIndexAction) LoadQuery ¶
func (action *TradeIndexAction) LoadQuery()
LoadQuery sets action.Query from the request params
func (*TradeIndexAction) LoadRecords ¶
func (action *TradeIndexAction) LoadRecords()
LoadRecords populates action.Records
func (TradeIndexAction) ServeHTTPC ¶
func (action TradeIndexAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type TransactionCreateAction ¶
type TransactionCreateAction struct { Action TX string Result txsub.Result Resource resource.TransactionSuccess }
TransactionCreateAction submits a transaction to the stellar-core network on behalf of the requesting client.
func (*TransactionCreateAction) JSON ¶
func (action *TransactionCreateAction) JSON()
JSON format action handler
func (*TransactionCreateAction) LoadResource ¶
func (action *TransactionCreateAction) LoadResource()
func (*TransactionCreateAction) LoadResult ¶
func (action *TransactionCreateAction) LoadResult()
func (*TransactionCreateAction) LoadTX ¶
func (action *TransactionCreateAction) LoadTX()
func (TransactionCreateAction) ServeHTTPC ¶
func (action TransactionCreateAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type TransactionIndexAction ¶
type TransactionIndexAction struct { Action Query db.TransactionPageQuery Records []db.TransactionRecord Page hal.Page }
TransactionIndexAction renders a page of ledger resources, identified by a normal page query.
func (*TransactionIndexAction) JSON ¶
func (action *TransactionIndexAction) JSON()
JSON is a method for actions.JSON
func (*TransactionIndexAction) LoadPage ¶
func (action *TransactionIndexAction) LoadPage()
LoadPage populates action.Page
func (*TransactionIndexAction) LoadQuery ¶
func (action *TransactionIndexAction) LoadQuery()
LoadQuery sets action.Query from the request params
func (*TransactionIndexAction) LoadRecords ¶
func (action *TransactionIndexAction) LoadRecords()
LoadRecords populates action.Records
func (*TransactionIndexAction) SSE ¶
func (action *TransactionIndexAction) SSE(stream sse.Stream)
SSE is a method for actions.SSE
func (TransactionIndexAction) ServeHTTPC ¶
func (action TransactionIndexAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
type TransactionShowAction ¶
type TransactionShowAction struct { Action Query db.TransactionByHashQuery Record db.TransactionRecord Resource resource.Transaction }
TransactionShowAction renders a ledger found by its sequence number.
func (*TransactionShowAction) JSON ¶
func (action *TransactionShowAction) JSON()
JSON is a method for actions.JSON
func (*TransactionShowAction) LoadQuery ¶
func (action *TransactionShowAction) LoadQuery()
func (*TransactionShowAction) LoadRecord ¶
func (action *TransactionShowAction) LoadRecord()
func (*TransactionShowAction) LoadResource ¶
func (action *TransactionShowAction) LoadResource()
func (TransactionShowAction) ServeHTTPC ¶
func (action TransactionShowAction) ServeHTTPC(c web.C, w http.ResponseWriter, r *http.Request)
ServeHTTPC is a method for web.Handler
Source Files ¶
- action.go
- actions_account.go
- actions_effects.go
- actions_friendbot.go
- actions_ledger.go
- actions_metrics.go
- actions_not_found.go
- actions_not_implemented.go
- actions_offer.go
- actions_operation.go
- actions_order_book.go
- actions_path.go
- actions_payment.go
- actions_rate_limit_exceeded.go
- actions_root.go
- actions_trade.go
- actions_transaction.go
- app.go
- config.go
- init.go
- init_app_context.go
- init_core_info.go
- init_db.go
- init_friendbot.go
- init_ledger_state.go
- init_log.go
- init_metrics.go
- init_path_finder.go
- init_pump.go
- init_redis.go
- init_txsub.go
- init_web.go
- main.go
- main_generated.go
- middleware_app.go
- middleware_context.go
- middleware_logger.go
- middleware_rate_limit.go
- middleware_recover.go
- middleware_request_metrics.go
- middleware_trailing_slash.go
Directories ¶
Path | Synopsis |
---|---|
Package actions provides the infrastructure for defining and executing actions (code that is triggered in response to an client request) on horizon.
|
Package actions provides the infrastructure for defining and executing actions (code that is triggered in response to an client request) on horizon. |
Package assets is a simple helper package to help convert to/from xdr.AssetType values
|
Package assets is a simple helper package to help convert to/from xdr.AssetType values |
cmd
|
|
Package codes is a helper package to help convert to transaction and operation result codes to strings used in horizon.
|
Package codes is a helper package to help convert to transaction and operation result codes to strings used in horizon. |
context
|
|
requestid
Package requestid provides functions to support embedded and retrieving a request id from a go context tree
|
Package requestid provides functions to support embedded and retrieving a request id from a go context tree |
Package db provides machinery for the database subsystem of horizon.
|
Package db provides machinery for the database subsystem of horizon. |
Package log provides the logging facilities used for horizon.
|
Package log provides the logging facilities used for horizon. |
Package paths provides utilities and facilities for payment paths as needed by horizon.
|
Package paths provides utilities and facilities for payment paths as needed by horizon. |
sse
This package contains the Server Sent Events implementation used by horizon.
|
This package contains the Server Sent Events implementation used by horizon. |
Package resource contains the type definitions for all of horizons response resources.
|
Package resource contains the type definitions for all of horizons response resources. |
Package simplepath provides an implementation of paths.Finder that performs a breadth first search for paths against a stellar-core's database
|
Package simplepath provides an implementation of paths.Finder that performs a breadth first search for paths against a stellar-core's database |
Package test contains simple test helpers that should not have any dependencies on horizon's packages.
|
Package test contains simple test helpers that should not have any dependencies on horizon's packages. |
Package txsub provides the machinery that horizon uses to submit transactions to the stellar network and track their progress.
|
Package txsub provides the machinery that horizon uses to submit transactions to the stellar network and track their progress. |
sequence
Package sequence providers helpers to manage sequence numbers on behalf of horizon clients.
|
Package sequence providers helpers to manage sequence numbers on behalf of horizon clients. |