Documentation ¶
Index ¶
- type Client
- type ClientOption
- type ClientService
- type GetBadgeDefault
- func (o *GetBadgeDefault) Code() int
- func (o *GetBadgeDefault) Error() string
- func (o *GetBadgeDefault) GetPayload() *models.Error
- func (o *GetBadgeDefault) IsClientError() bool
- func (o *GetBadgeDefault) IsCode(code int) bool
- func (o *GetBadgeDefault) IsRedirect() bool
- func (o *GetBadgeDefault) IsServerError() bool
- func (o *GetBadgeDefault) IsSuccess() bool
- func (o *GetBadgeDefault) String() string
- type GetBadgeFound
- type GetBadgeParams
- func (o *GetBadgeParams) SetContext(ctx context.Context)
- func (o *GetBadgeParams) SetDefaults()
- func (o *GetBadgeParams) SetHTTPClient(client *http.Client)
- func (o *GetBadgeParams) SetOrg(org string)
- func (o *GetBadgeParams) SetPlatform(platform string)
- func (o *GetBadgeParams) SetRepo(repo string)
- func (o *GetBadgeParams) SetStyle(style *string)
- func (o *GetBadgeParams) SetTimeout(timeout time.Duration)
- func (o *GetBadgeParams) WithContext(ctx context.Context) *GetBadgeParams
- func (o *GetBadgeParams) WithDefaults() *GetBadgeParams
- func (o *GetBadgeParams) WithHTTPClient(client *http.Client) *GetBadgeParams
- func (o *GetBadgeParams) WithOrg(org string) *GetBadgeParams
- func (o *GetBadgeParams) WithPlatform(platform string) *GetBadgeParams
- func (o *GetBadgeParams) WithRepo(repo string) *GetBadgeParams
- func (o *GetBadgeParams) WithStyle(style *string) *GetBadgeParams
- func (o *GetBadgeParams) WithTimeout(timeout time.Duration) *GetBadgeParams
- func (o *GetBadgeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type GetBadgeReader
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 badge API
func (*Client) GetBadge ¶
func (a *Client) GetBadge(params *GetBadgeParams, opts ...ClientOption) error
GetBadge gets a repository s scorecard badge
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
type ClientOption ¶
type ClientOption func(*runtime.ClientOperation)
ClientOption is the option for Client methods
type ClientService ¶
type ClientService interface { GetBadge(params *GetBadgeParams, opts ...ClientOption) error SetTransport(transport runtime.ClientTransport) }
ClientService is the interface for Client methods
func New ¶
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService
New creates a new badge API client.
type GetBadgeDefault ¶
GetBadgeDefault describes a response with status code -1, with default header values.
There was an internal error in the server while processing the request
func NewGetBadgeDefault ¶
func NewGetBadgeDefault(code int) *GetBadgeDefault
NewGetBadgeDefault creates a GetBadgeDefault with default headers values
func (*GetBadgeDefault) Code ¶
func (o *GetBadgeDefault) Code() int
Code gets the status code for the get badge default response
func (*GetBadgeDefault) Error ¶
func (o *GetBadgeDefault) Error() string
func (*GetBadgeDefault) GetPayload ¶
func (o *GetBadgeDefault) GetPayload() *models.Error
func (*GetBadgeDefault) IsClientError ¶ added in v1.0.1
func (o *GetBadgeDefault) IsClientError() bool
IsClientError returns true when this get badge default response has a 4xx status code
func (*GetBadgeDefault) IsCode ¶ added in v1.0.1
func (o *GetBadgeDefault) IsCode(code int) bool
IsCode returns true when this get badge default response a status code equal to that given
func (*GetBadgeDefault) IsRedirect ¶ added in v1.0.1
func (o *GetBadgeDefault) IsRedirect() bool
IsRedirect returns true when this get badge default response has a 3xx status code
func (*GetBadgeDefault) IsServerError ¶ added in v1.0.1
func (o *GetBadgeDefault) IsServerError() bool
IsServerError returns true when this get badge default response has a 5xx status code
func (*GetBadgeDefault) IsSuccess ¶ added in v1.0.1
func (o *GetBadgeDefault) IsSuccess() bool
IsSuccess returns true when this get badge default response has a 2xx status code
func (*GetBadgeDefault) String ¶ added in v1.0.1
func (o *GetBadgeDefault) String() string
type GetBadgeFound ¶
type GetBadgeFound struct { }
GetBadgeFound describes a response with status code 302, with default header values.
Scorecard badge for the repository
func NewGetBadgeFound ¶
func NewGetBadgeFound() *GetBadgeFound
NewGetBadgeFound creates a GetBadgeFound with default headers values
func (*GetBadgeFound) Error ¶
func (o *GetBadgeFound) Error() string
func (*GetBadgeFound) IsClientError ¶ added in v1.0.1
func (o *GetBadgeFound) IsClientError() bool
IsClientError returns true when this get badge found response has a 4xx status code
func (*GetBadgeFound) IsCode ¶ added in v1.0.1
func (o *GetBadgeFound) IsCode(code int) bool
IsCode returns true when this get badge found response a status code equal to that given
func (*GetBadgeFound) IsRedirect ¶ added in v1.0.1
func (o *GetBadgeFound) IsRedirect() bool
IsRedirect returns true when this get badge found response has a 3xx status code
func (*GetBadgeFound) IsServerError ¶ added in v1.0.1
func (o *GetBadgeFound) IsServerError() bool
IsServerError returns true when this get badge found response has a 5xx status code
func (*GetBadgeFound) IsSuccess ¶ added in v1.0.1
func (o *GetBadgeFound) IsSuccess() bool
IsSuccess returns true when this get badge found response has a 2xx status code
func (*GetBadgeFound) String ¶ added in v1.0.1
func (o *GetBadgeFound) String() string
type GetBadgeParams ¶
type GetBadgeParams struct { /* Org. Name of the owner/organization of the repository */ Org string /* Platform. VCS platform. eg. github.com */ Platform string /* Repo. Name of the repository */ Repo string /* Style. Style to render the badge Default: "flat" */ Style *string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
GetBadgeParams contains all the parameters to send to the API endpoint
for the get badge operation. Typically these are written to a http.Request.
func NewGetBadgeParams ¶
func NewGetBadgeParams() *GetBadgeParams
NewGetBadgeParams creates a new GetBadgeParams 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 NewGetBadgeParamsWithContext ¶
func NewGetBadgeParamsWithContext(ctx context.Context) *GetBadgeParams
NewGetBadgeParamsWithContext creates a new GetBadgeParams object with the ability to set a context for a request.
func NewGetBadgeParamsWithHTTPClient ¶
func NewGetBadgeParamsWithHTTPClient(client *http.Client) *GetBadgeParams
NewGetBadgeParamsWithHTTPClient creates a new GetBadgeParams object with the ability to set a custom HTTPClient for a request.
func NewGetBadgeParamsWithTimeout ¶
func NewGetBadgeParamsWithTimeout(timeout time.Duration) *GetBadgeParams
NewGetBadgeParamsWithTimeout creates a new GetBadgeParams object with the ability to set a timeout on a request.
func (*GetBadgeParams) SetContext ¶
func (o *GetBadgeParams) SetContext(ctx context.Context)
SetContext adds the context to the get badge params
func (*GetBadgeParams) SetDefaults ¶
func (o *GetBadgeParams) SetDefaults()
SetDefaults hydrates default values in the get badge params (not the query body).
All values with no default are reset to their zero value.
func (*GetBadgeParams) SetHTTPClient ¶
func (o *GetBadgeParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the get badge params
func (*GetBadgeParams) SetOrg ¶
func (o *GetBadgeParams) SetOrg(org string)
SetOrg adds the org to the get badge params
func (*GetBadgeParams) SetPlatform ¶
func (o *GetBadgeParams) SetPlatform(platform string)
SetPlatform adds the platform to the get badge params
func (*GetBadgeParams) SetRepo ¶
func (o *GetBadgeParams) SetRepo(repo string)
SetRepo adds the repo to the get badge params
func (*GetBadgeParams) SetStyle ¶ added in v1.0.1
func (o *GetBadgeParams) SetStyle(style *string)
SetStyle adds the style to the get badge params
func (*GetBadgeParams) SetTimeout ¶
func (o *GetBadgeParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the get badge params
func (*GetBadgeParams) WithContext ¶
func (o *GetBadgeParams) WithContext(ctx context.Context) *GetBadgeParams
WithContext adds the context to the get badge params
func (*GetBadgeParams) WithDefaults ¶
func (o *GetBadgeParams) WithDefaults() *GetBadgeParams
WithDefaults hydrates default values in the get badge params (not the query body).
All values with no default are reset to their zero value.
func (*GetBadgeParams) WithHTTPClient ¶
func (o *GetBadgeParams) WithHTTPClient(client *http.Client) *GetBadgeParams
WithHTTPClient adds the HTTPClient to the get badge params
func (*GetBadgeParams) WithOrg ¶
func (o *GetBadgeParams) WithOrg(org string) *GetBadgeParams
WithOrg adds the org to the get badge params
func (*GetBadgeParams) WithPlatform ¶
func (o *GetBadgeParams) WithPlatform(platform string) *GetBadgeParams
WithPlatform adds the platform to the get badge params
func (*GetBadgeParams) WithRepo ¶
func (o *GetBadgeParams) WithRepo(repo string) *GetBadgeParams
WithRepo adds the repo to the get badge params
func (*GetBadgeParams) WithStyle ¶ added in v1.0.1
func (o *GetBadgeParams) WithStyle(style *string) *GetBadgeParams
WithStyle adds the style to the get badge params
func (*GetBadgeParams) WithTimeout ¶
func (o *GetBadgeParams) WithTimeout(timeout time.Duration) *GetBadgeParams
WithTimeout adds the timeout to the get badge params
func (*GetBadgeParams) WriteToRequest ¶
func (o *GetBadgeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type GetBadgeReader ¶
type GetBadgeReader struct {
// contains filtered or unexported fields
}
GetBadgeReader is a Reader for the GetBadge structure.
func (*GetBadgeReader) ReadResponse ¶
func (o *GetBadgeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.