mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-09 19:21:19 +00:00
6a638bd148
* in progress * implementation done * bzl * fixes * tests in progress * tests * go mod tidy * Update beacon-chain/rpc/eth/events/events.go Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com> * fix config test * fix unreachable code issue * remove proto service dir * test fix --------- Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com> Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
26 lines
689 B
Go
26 lines
689 B
Go
package apimiddleware
|
|
|
|
import (
|
|
"github.com/prysmaticlabs/prysm/v4/api/gateway/apimiddleware"
|
|
)
|
|
|
|
// BeaconEndpointFactory creates endpoints used for running beacon chain API calls through the API Middleware.
|
|
type BeaconEndpointFactory struct {
|
|
}
|
|
|
|
func (f *BeaconEndpointFactory) IsNil() bool {
|
|
return f == nil
|
|
}
|
|
|
|
// Paths is a collection of all valid beacon chain API paths.
|
|
func (_ *BeaconEndpointFactory) Paths() []string {
|
|
return []string{}
|
|
}
|
|
|
|
// Create returns a new endpoint for the provided API path.
|
|
func (_ *BeaconEndpointFactory) Create(path string) (*apimiddleware.Endpoint, error) {
|
|
endpoint := apimiddleware.DefaultEndpoint()
|
|
endpoint.Path = path
|
|
return &endpoint, nil
|
|
}
|