operations

package
v0.0.0-...-71505b4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2019 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const GetSnapshotsBadRequestCode int = 400

GetSnapshotsBadRequestCode is the HTTP code returned for type GetSnapshotsBadRequest

View Source
const GetSnapshotsNotFoundCode int = 404

GetSnapshotsNotFoundCode is the HTTP code returned for type GetSnapshotsNotFound

View Source
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

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

func (o *GetSnapshotsURL) Must(u *url.URL, err error) *url.URL

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL