Documentation ¶
Index ¶
- func WithConfig(cfg config.API) func(*EndPoint)
- func WithEvents(evt *event.Event) func(*EndPoint)
- func WithLogs(logs *zap.Logger) func(*EndPoint)
- func WithMetrics(m *metrics.Metrics) func(*EndPoint)
- func WithPersistence(p persistenceadapter.Adapter) func(*EndPoint)
- func WithTransactions(t transaction.Adapter) func(*EndPoint)
- func WithUserAddress(a string) func(*EndPoint)
- func WithWallets(w wallet.IWallets) func(*EndPoint)
- type BodyReceived
- type EndPoint
- func (e *EndPoint) Handle(err error)
- func (e *EndPoint) IsEnabled() bool
- func (e *EndPoint) JSON(w http.ResponseWriter, code int, payload interface{})
- func (e *EndPoint) Listen() error
- func (e *EndPoint) MetricsMiddleware(next http.Handler) http.Handler
- func (e *EndPoint) Shutdown(ctx context.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithConfig ¶
WithConfig offer the possibility to set a config to the endpoint adapter.
func WithEvents ¶
WithEvents offer the possibility to set an event adapter to the endpoint adapter.
func WithMetrics ¶
WithMetrics offer the possibility to set a metric adapter to the endpoint adapter.
func WithPersistence ¶
func WithPersistence(p persistenceadapter.Adapter) func(*EndPoint)
WithPersistence offer the possibility to set a persistence adapter to the endpoint adapter.
func WithTransactions ¶
func WithTransactions(t transaction.Adapter) func(*EndPoint)
WithTransactions offer the possibility to set a transactions adapter to the endpoint adapter.
func WithUserAddress ¶
WithUserAddress offer the possibility to set an user address adapter to the endpoint adapter.
func WithWallets ¶
WithWallets offer the possibility to set a wallet adapter to the endpoint adapter.
Types ¶
type BodyReceived ¶
type BodyReceived interface{}
type EndPoint ¶
type EndPoint struct {
// contains filtered or unexported fields
}
EndPoint represent a HTTP endpoint adapter.
func (*EndPoint) JSON ¶
func (e *EndPoint) JSON(w http.ResponseWriter, code int, payload interface{})
func (*EndPoint) MetricsMiddleware ¶
MetricsMiddleware set a metrics middleware for HTTP endpoints.