Documentation
¶
Index ¶
- type Client
- type ClientOption
- type ClientService
- type GetVersionOK
- func (o *GetVersionOK) Code() int
- func (o *GetVersionOK) Error() string
- func (o *GetVersionOK) GetPayload() *models.VersionInfo
- func (o *GetVersionOK) IsClientError() bool
- func (o *GetVersionOK) IsCode(code int) bool
- func (o *GetVersionOK) IsRedirect() bool
- func (o *GetVersionOK) IsServerError() bool
- func (o *GetVersionOK) IsSuccess() bool
- func (o *GetVersionOK) String() string
- type GetVersionParams
- func (o *GetVersionParams) SetContext(ctx context.Context)deprecated
- func (o *GetVersionParams) SetDefaults()
- func (o *GetVersionParams) SetHTTPClient(client *http.Client)
- func (o *GetVersionParams) SetTimeout(timeout time.Duration)
- func (o *GetVersionParams) WithContext(ctx context.Context) *GetVersionParamsdeprecated
- func (o *GetVersionParams) WithDefaults() *GetVersionParams
- func (o *GetVersionParams) WithHTTPClient(client *http.Client) *GetVersionParams
- func (o *GetVersionParams) WithTimeout(timeout time.Duration) *GetVersionParams
- func (o *GetVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type GetVersionReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for version API.
func (*Client) GetVersion ¶
func (a *Client) GetVersion(params *GetVersionParams, opts ...ClientOption) (*GetVersionOK, error)
GetVersion gets the build this server is running.
Reports the scorecard-infra release and commit this server was built from, and the workflow parser that verifies uploads. Cached by the CDN for the TTL in the response's Surrogate-Control header..
This method does not support injected context. However, timeout and opentracing contexts are honored whenever enabled.
If you need to pass a specific context, use Client.GetVersionContext instead.
func (*Client) GetVersionContext ¶
func (a *Client) GetVersionContext(ctx context.Context, params *GetVersionParams, opts ...ClientOption) (*GetVersionOK, error)
GetVersionContext gets the build this server is running.
Reports the scorecard-infra release and commit this server was built from, and the workflow parser that verifies uploads. Cached by the CDN for the TTL in the response's Surrogate-Control header..
Do not use the deprecated [GetVersionParams.Context] with this method: it would be ignored.
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ContextualTransport)
SetTransport changes the transport on the client
type ClientOption ¶
type ClientOption func(*runtime.ClientOperation)
ClientOption may be used to customize the behavior of Client methods.
type ClientService ¶
type ClientService interface {
// GetVersion get the build this server is running.
GetVersion(params *GetVersionParams, opts ...ClientOption) (*GetVersionOK, error)
// GetVersionContext get the build this server is running.
GetVersionContext(ctx context.Context, params *GetVersionParams, opts ...ClientOption) (*GetVersionOK, error)
SetTransport(transport runtime.ContextualTransport)
}
ClientService is the interface for Client methods.
func New ¶
func New(transport runtime.ContextualTransport, formats strfmt.Registry) ClientService
New creates a new version API client.
func NewClientWithBasicAuth ¶
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService
New creates a new version API client with basic auth credentials.
It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - user: user for basic authentication header. - password: password for basic authentication header.
func NewClientWithBearerToken ¶
func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService
New creates a new version API client with a bearer token for authentication.
It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - bearerToken: bearer token for Bearer authentication header.
type GetVersionOK ¶
type GetVersionOK struct {
// TTL for browser caching. Example: max-age=3600
CacheControl string
// TTL for Fastly CDN caching. Example: max-age=3600
SurrogateControl string
// Surrogate key for Fastly CDN purging.
SurrogateKey string
Payload *models.VersionInfo
}
GetVersionOK describes a response with status code 200, with default header values.
The server's build information
func NewGetVersionOK ¶
func NewGetVersionOK() *GetVersionOK
NewGetVersionOK creates a GetVersionOK with default headers values
func (*GetVersionOK) Code ¶
func (o *GetVersionOK) Code() int
Code gets the status code for the get version o k response
func (*GetVersionOK) Error ¶
func (o *GetVersionOK) Error() string
func (*GetVersionOK) GetPayload ¶
func (o *GetVersionOK) GetPayload() *models.VersionInfo
func (*GetVersionOK) IsClientError ¶
func (o *GetVersionOK) IsClientError() bool
IsClientError returns true when this get version o k response has a 4xx status code
func (*GetVersionOK) IsCode ¶
func (o *GetVersionOK) IsCode(code int) bool
IsCode returns true when this get version o k response a status code equal to that given
func (*GetVersionOK) IsRedirect ¶
func (o *GetVersionOK) IsRedirect() bool
IsRedirect returns true when this get version o k response has a 3xx status code
func (*GetVersionOK) IsServerError ¶
func (o *GetVersionOK) IsServerError() bool
IsServerError returns true when this get version o k response has a 5xx status code
func (*GetVersionOK) IsSuccess ¶
func (o *GetVersionOK) IsSuccess() bool
IsSuccess returns true when this get version o k response has a 2xx status code
func (*GetVersionOK) String ¶
func (o *GetVersionOK) String() string
type GetVersionParams ¶
GetVersionParams contains all the parameters to send to the API endpoint
for the get version operation. Typically these are written to a http.Request.
func NewGetVersionParams ¶
func NewGetVersionParams() *GetVersionParams
NewGetVersionParams creates a new GetVersionParams object, with the default timeout for this client.
Default values are not hydrated, since defaults are normally applied by the API server side.
To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewGetVersionParamsWithContext
deprecated
func NewGetVersionParamsWithContext(ctx context.Context) *GetVersionParams
NewGetVersionParamsWithContext creates a new GetVersionParams object with the ability to set a context for a request.
Deprecated: use the operation call with context to pass the context instead of GetVersionParams.
func NewGetVersionParamsWithHTTPClient ¶
func NewGetVersionParamsWithHTTPClient(client *http.Client) *GetVersionParams
NewGetVersionParamsWithHTTPClient creates a new GetVersionParams object with the ability to set a custom HTTPClient for a request.
func NewGetVersionParamsWithTimeout ¶
func NewGetVersionParamsWithTimeout(timeout time.Duration) *GetVersionParams
NewGetVersionParamsWithTimeout creates a new GetVersionParams object with the ability to set a timeout on a request.
func (*GetVersionParams) SetContext
deprecated
func (o *GetVersionParams) SetContext(ctx context.Context)
SetContext adds the context to the get version params.
Deprecated: use the operation call with context to pass the context instead of GetVersionParams.
func (*GetVersionParams) SetDefaults ¶
func (o *GetVersionParams) SetDefaults()
SetDefaults hydrates default values in the get version params (not the query body).
All values with no default are reset to their zero value.
func (*GetVersionParams) SetHTTPClient ¶
func (o *GetVersionParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the get version params.
func (*GetVersionParams) SetTimeout ¶
func (o *GetVersionParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the get version params.
func (*GetVersionParams) WithContext
deprecated
func (o *GetVersionParams) WithContext(ctx context.Context) *GetVersionParams
WithContext adds the context to the get version params.
Deprecated: use the operation call with context to pass the context instead of GetVersionParams.
func (*GetVersionParams) WithDefaults ¶
func (o *GetVersionParams) WithDefaults() *GetVersionParams
WithDefaults hydrates default values in the get version params (not the query body).
All values with no default are reset to their zero value.
func (*GetVersionParams) WithHTTPClient ¶
func (o *GetVersionParams) WithHTTPClient(client *http.Client) *GetVersionParams
WithHTTPClient adds the HTTPClient to the get version params.
func (*GetVersionParams) WithTimeout ¶
func (o *GetVersionParams) WithTimeout(timeout time.Duration) *GetVersionParams
WithTimeout adds the timeout to the get version params.
func (*GetVersionParams) WriteToRequest ¶
func (o *GetVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a runtime.ClientRequest.
type GetVersionReader ¶
type GetVersionReader struct {
// contains filtered or unexported fields
}
GetVersionReader is a Reader for the GetVersion structure.
func (*GetVersionReader) ReadResponse ¶
func (o *GetVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error)
ReadResponse reads a server response into the received o.