Documentation ¶
Index ¶
- Constants
- type GetSnapshots
- type GetSnapshotsBadRequest
- type GetSnapshotsHandler
- type GetSnapshotsHandlerFunc
- type GetSnapshotsNotFound
- type GetSnapshotsOK
- func (o *GetSnapshotsOK) SetPayload(payload []*models.Snapshots)
- func (o *GetSnapshotsOK) SetXTotalCount(xTotalCount int64)
- func (o *GetSnapshotsOK) WithPayload(payload []*models.Snapshots) *GetSnapshotsOK
- func (o *GetSnapshotsOK) WithXTotalCount(xTotalCount int64) *GetSnapshotsOK
- func (o *GetSnapshotsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
- type GetSnapshotsParams
- type GetSnapshotsURL
- func (o *GetSnapshotsURL) Build() (*url.URL, error)
- func (o *GetSnapshotsURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *GetSnapshotsURL) Must(u *url.URL, err error) *url.URL
- func (o *GetSnapshotsURL) SetBasePath(bp string)
- func (o *GetSnapshotsURL) String() string
- func (o *GetSnapshotsURL) StringFull(scheme, host string) string
- func (o *GetSnapshotsURL) WithBasePath(bp string) *GetSnapshotsURL
- type TezTrackerAPI
- func (o *TezTrackerAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *TezTrackerAPI) Authorizer() runtime.Authorizer
- func (o *TezTrackerAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *TezTrackerAPI) Context() *middleware.Context
- func (o *TezTrackerAPI) DefaultConsumes() string
- func (o *TezTrackerAPI) DefaultProduces() string
- func (o *TezTrackerAPI) Formats() strfmt.Registry
- func (o *TezTrackerAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *TezTrackerAPI) Init()
- func (o *TezTrackerAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *TezTrackerAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)
- func (o *TezTrackerAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *TezTrackerAPI) RegisterProducer(mediaType string, producer runtime.Producer)
- func (o *TezTrackerAPI) Serve(builder middleware.Builder) http.Handler
- func (o *TezTrackerAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *TezTrackerAPI) SetDefaultConsumes(mediaType string)
- func (o *TezTrackerAPI) SetDefaultProduces(mediaType string)
- func (o *TezTrackerAPI) SetSpec(spec *loads.Document)
- func (o *TezTrackerAPI) Validate() error
Constants ¶
const GetSnapshotsBadRequestCode int = 400
GetSnapshotsBadRequestCode is the HTTP code returned for type GetSnapshotsBadRequest
const GetSnapshotsNotFoundCode int = 404
GetSnapshotsNotFoundCode is the HTTP code returned for type GetSnapshotsNotFound
const GetSnapshotsOKCode int = 200
GetSnapshotsOKCode is the HTTP code returned for type GetSnapshotsOK
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetSnapshots ¶
type GetSnapshots struct { Context *middleware.Context Handler GetSnapshotsHandler }
GetSnapshots swagger:route GET /v2/data/{platform}/{network}/snapshots getSnapshots
GetSnapshots get snapshots API
func NewGetSnapshots ¶
func NewGetSnapshots(ctx *middleware.Context, handler GetSnapshotsHandler) *GetSnapshots
NewGetSnapshots creates a new http.Handler for the get snapshots operation
func (*GetSnapshots) ServeHTTP ¶
func (o *GetSnapshots) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type GetSnapshotsBadRequest ¶
type GetSnapshotsBadRequest struct { }
GetSnapshotsBadRequest Bad request
swagger:response getSnapshotsBadRequest
func NewGetSnapshotsBadRequest ¶
func NewGetSnapshotsBadRequest() *GetSnapshotsBadRequest
NewGetSnapshotsBadRequest creates GetSnapshotsBadRequest with default headers values
func (*GetSnapshotsBadRequest) WriteResponse ¶
func (o *GetSnapshotsBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetSnapshotsHandler ¶
type GetSnapshotsHandler interface {
Handle(GetSnapshotsParams) middleware.Responder
}
GetSnapshotsHandler interface for that can handle valid get snapshots params
type GetSnapshotsHandlerFunc ¶
type GetSnapshotsHandlerFunc func(GetSnapshotsParams) middleware.Responder
GetSnapshotsHandlerFunc turns a function with the right signature into a get snapshots handler
func (GetSnapshotsHandlerFunc) Handle ¶
func (fn GetSnapshotsHandlerFunc) Handle(params GetSnapshotsParams) middleware.Responder
Handle executing the request and returning a response
type GetSnapshotsNotFound ¶
type GetSnapshotsNotFound struct { }
GetSnapshotsNotFound Not Found
swagger:response getSnapshotsNotFound
func NewGetSnapshotsNotFound ¶
func NewGetSnapshotsNotFound() *GetSnapshotsNotFound
NewGetSnapshotsNotFound creates GetSnapshotsNotFound with default headers values
func (*GetSnapshotsNotFound) WriteResponse ¶
func (o *GetSnapshotsNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetSnapshotsOK ¶
type GetSnapshotsOK struct { /*The total number of data entries. */ XTotalCount int64 `json:"X-Total-Count"` /* In: Body */ Payload []*models.Snapshots `json:"body,omitempty"` }
GetSnapshotsOK Endpoint for snapshots
swagger:response getSnapshotsOK
func NewGetSnapshotsOK ¶
func NewGetSnapshotsOK() *GetSnapshotsOK
NewGetSnapshotsOK creates GetSnapshotsOK with default headers values
func (*GetSnapshotsOK) SetPayload ¶
func (o *GetSnapshotsOK) SetPayload(payload []*models.Snapshots)
SetPayload sets the payload to the get snapshots o k response
func (*GetSnapshotsOK) SetXTotalCount ¶
func (o *GetSnapshotsOK) SetXTotalCount(xTotalCount int64)
SetXTotalCount sets the xTotalCount to the get snapshots o k response
func (*GetSnapshotsOK) WithPayload ¶
func (o *GetSnapshotsOK) WithPayload(payload []*models.Snapshots) *GetSnapshotsOK
WithPayload adds the payload to the get snapshots o k response
func (*GetSnapshotsOK) WithXTotalCount ¶
func (o *GetSnapshotsOK) WithXTotalCount(xTotalCount int64) *GetSnapshotsOK
WithXTotalCount adds the xTotalCount to the get snapshots o k response
func (*GetSnapshotsOK) WriteResponse ¶
func (o *GetSnapshotsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetSnapshotsParams ¶
type GetSnapshotsParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /* Maximum: 500 Minimum: 1 In: query Default: 20 */ Limit *int64 /*Not used Required: true In: path */ Network string /*Offset Minimum: 0 In: query Default: 0 */ Offset *int64 /*Not used Required: true In: path */ Platform string }
GetSnapshotsParams contains all the bound params for the get snapshots operation typically these are obtained from a http.Request
swagger:parameters getSnapshots
func NewGetSnapshotsParams ¶
func NewGetSnapshotsParams() GetSnapshotsParams
NewGetSnapshotsParams creates a new GetSnapshotsParams object with the default values initialized.
func (*GetSnapshotsParams) BindRequest ¶
func (o *GetSnapshotsParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error
BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.
To ensure default values, the struct must have been initialized with NewGetSnapshotsParams() beforehand.
type GetSnapshotsURL ¶
type GetSnapshotsURL struct { Network string Platform string Limit *int64 Offset *int64 // contains filtered or unexported fields }
GetSnapshotsURL generates an URL for the get snapshots operation
func (*GetSnapshotsURL) Build ¶
func (o *GetSnapshotsURL) Build() (*url.URL, error)
Build a url path and query string
func (*GetSnapshotsURL) BuildFull ¶
func (o *GetSnapshotsURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*GetSnapshotsURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*GetSnapshotsURL) SetBasePath ¶
func (o *GetSnapshotsURL) SetBasePath(bp string)
SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string
func (*GetSnapshotsURL) String ¶
func (o *GetSnapshotsURL) String() string
String returns the string representation of the path with query string
func (*GetSnapshotsURL) StringFull ¶
func (o *GetSnapshotsURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*GetSnapshotsURL) WithBasePath ¶
func (o *GetSnapshotsURL) WithBasePath(bp string) *GetSnapshotsURL
WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string
type TezTrackerAPI ¶
type TezTrackerAPI struct { Middleware func(middleware.Builder) http.Handler // BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function. // It has a default implementation in the security package, however you can replace it for your particular usage. BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator // APIKeyAuthenticator generates a runtime.Authenticator from the supplied token auth function. // It has a default implementation in the security package, however you can replace it for your particular usage. APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator // BearerAuthenticator generates a runtime.Authenticator from the supplied bearer token auth function. // It has a default implementation in the security package, however you can replace it for your particular usage. BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator // JSONConsumer registers a consumer for a "application/json" mime type JSONConsumer runtime.Consumer // JSONProducer registers a producer for a "application/json" mime type JSONProducer runtime.Producer // AccountsGetAccountHandler sets the operation handler for the get account operation AccountsGetAccountHandler accounts.GetAccountHandler // AccountsGetAccountDelegatorsHandler sets the operation handler for the get account delegators operation AccountsGetAccountDelegatorsHandler accounts.GetAccountDelegatorsHandler // AccountsGetAccountsListHandler sets the operation handler for the get accounts list operation AccountsGetAccountsListHandler accounts.GetAccountsListHandler // FeesGetAvgFeesHandler sets the operation handler for the get avg fees operation FeesGetAvgFeesHandler fees.GetAvgFeesHandler // AccountsGetBakersListHandler sets the operation handler for the get bakers list operation AccountsGetBakersListHandler accounts.GetBakersListHandler // BlocksGetBakingRightsHandler sets the operation handler for the get baking rights operation BlocksGetBakingRightsHandler blocks.GetBakingRightsHandler // BlocksGetBlockHandler sets the operation handler for the get block operation BlocksGetBlockHandler blocks.GetBlockHandler // BlocksGetBlockBakingRightsHandler sets the operation handler for the get block baking rights operation BlocksGetBlockBakingRightsHandler blocks.GetBlockBakingRightsHandler // BlocksGetBlockEndorsementsHandler sets the operation handler for the get block endorsements operation BlocksGetBlockEndorsementsHandler blocks.GetBlockEndorsementsHandler // BlocksGetBlocksHeadHandler sets the operation handler for the get blocks head operation BlocksGetBlocksHeadHandler blocks.GetBlocksHeadHandler // BlocksGetBlocksListHandler sets the operation handler for the get blocks list operation BlocksGetBlocksListHandler blocks.GetBlocksListHandler // AccountsGetContractsListHandler sets the operation handler for the get contracts list operation AccountsGetContractsListHandler accounts.GetContractsListHandler // OperationsListGetDoubleBakingsListHandler sets the operation handler for the get double bakings list operation OperationsListGetDoubleBakingsListHandler operations_list.GetDoubleBakingsListHandler // BlocksGetFutureBakingRightsHandler sets the operation handler for the get future baking rights operation BlocksGetFutureBakingRightsHandler blocks.GetFutureBakingRightsHandler // AppInfoGetInfoHandler sets the operation handler for the get info operation AppInfoGetInfoHandler app_info.GetInfoHandler // OperationGroupsGetOperationGroupHandler sets the operation handler for the get operation group operation OperationGroupsGetOperationGroupHandler operation_groups.GetOperationGroupHandler // OperationGroupsGetOperationGroupsHandler sets the operation handler for the get operation groups operation OperationGroupsGetOperationGroupsHandler operation_groups.GetOperationGroupsHandler // OperationsListGetOperationsListHandler sets the operation handler for the get operations list operation OperationsListGetOperationsListHandler operations_list.GetOperationsListHandler // GetSnapshotsHandler sets the operation handler for the get snapshots operation GetSnapshotsHandler GetSnapshotsHandler // ServeError is called when an error is received, there is a default handler // but you can set your own with this ServeError func(http.ResponseWriter, *http.Request, error) // ServerShutdown is called when the HTTP(S) server is shut down and done // handling all active connections and does not accept connections any more ServerShutdown func() // Custom command line argument groups with their descriptions CommandLineOptionsGroups []swag.CommandLineOptionsGroup // User defined logger function. Logger func(string, ...interface{}) // contains filtered or unexported fields }
TezTrackerAPI the tez tracker API
func NewTezTrackerAPI ¶
func NewTezTrackerAPI(spec *loads.Document) *TezTrackerAPI
NewTezTrackerAPI creates a new TezTracker instance
func (*TezTrackerAPI) AuthenticatorsFor ¶
func (o *TezTrackerAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*TezTrackerAPI) Authorizer ¶
func (o *TezTrackerAPI) Authorizer() runtime.Authorizer
Authorizer returns the registered authorizer
func (*TezTrackerAPI) ConsumersFor ¶
func (o *TezTrackerAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
ConsumersFor gets the consumers for the specified media types
func (*TezTrackerAPI) Context ¶
func (o *TezTrackerAPI) Context() *middleware.Context
Context returns the middleware context for the tez tracker API
func (*TezTrackerAPI) DefaultConsumes ¶
func (o *TezTrackerAPI) DefaultConsumes() string
DefaultConsumes returns the default consumes media type
func (*TezTrackerAPI) DefaultProduces ¶
func (o *TezTrackerAPI) DefaultProduces() string
DefaultProduces returns the default produces media type
func (*TezTrackerAPI) Formats ¶
func (o *TezTrackerAPI) Formats() strfmt.Registry
Formats returns the registered string formats
func (*TezTrackerAPI) HandlerFor ¶
func (o *TezTrackerAPI) HandlerFor(method, path string) (http.Handler, bool)
HandlerFor gets a http.Handler for the provided operation method and path
func (*TezTrackerAPI) Init ¶
func (o *TezTrackerAPI) Init()
Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit
func (*TezTrackerAPI) ProducersFor ¶
func (o *TezTrackerAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
ProducersFor gets the producers for the specified media types
func (*TezTrackerAPI) RegisterConsumer ¶
func (o *TezTrackerAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)
RegisterConsumer allows you to add (or override) a consumer for a media type.
func (*TezTrackerAPI) RegisterFormat ¶
func (o *TezTrackerAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
RegisterFormat registers a custom format validator
func (*TezTrackerAPI) RegisterProducer ¶
func (o *TezTrackerAPI) RegisterProducer(mediaType string, producer runtime.Producer)
RegisterProducer allows you to add (or override) a producer for a media type.
func (*TezTrackerAPI) Serve ¶
func (o *TezTrackerAPI) Serve(builder middleware.Builder) http.Handler
Serve creates a http handler to serve the API over HTTP can be used directly in http.ListenAndServe(":8000", api.Serve(nil))
func (*TezTrackerAPI) ServeErrorFor ¶
func (o *TezTrackerAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
ServeErrorFor gets a error handler for a given operation id
func (*TezTrackerAPI) SetDefaultConsumes ¶
func (o *TezTrackerAPI) SetDefaultConsumes(mediaType string)
SetDefaultConsumes returns the default consumes media type
func (*TezTrackerAPI) SetDefaultProduces ¶
func (o *TezTrackerAPI) SetDefaultProduces(mediaType string)
SetDefaultProduces sets the default produces media type
func (*TezTrackerAPI) SetSpec ¶
func (o *TezTrackerAPI) SetSpec(spec *loads.Document)
SetSpec sets a spec that will be served for the clients.
func (*TezTrackerAPI) Validate ¶
func (o *TezTrackerAPI) Validate() error
Validate validates the registrations in the TezTrackerAPI