Documentation ¶
Index ¶
- Constants
- type GetResult
- type GetResultBadRequest
- type GetResultDefault
- func (o *GetResultDefault) SetPayload(payload *models.Error)
- func (o *GetResultDefault) SetStatusCode(code int)
- func (o *GetResultDefault) WithPayload(payload *models.Error) *GetResultDefault
- func (o *GetResultDefault) WithStatusCode(code int) *GetResultDefault
- func (o *GetResultDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
- type GetResultHandler
- type GetResultHandlerFunc
- type GetResultNotFound
- type GetResultOK
- type GetResultParams
- type GetResultURL
- func (o *GetResultURL) Build() (*url.URL, error)
- func (o *GetResultURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *GetResultURL) Must(u *url.URL, err error) *url.URL
- func (o *GetResultURL) SetBasePath(bp string)
- func (o *GetResultURL) String() string
- func (o *GetResultURL) StringFull(scheme, host string) string
- func (o *GetResultURL) WithBasePath(bp string) *GetResultURL
- type PostResult
- type PostResultBadRequest
- type PostResultCreated
- type PostResultDefault
- func (o *PostResultDefault) SetPayload(payload *models.Error)
- func (o *PostResultDefault) SetStatusCode(code int)
- func (o *PostResultDefault) WithPayload(payload *models.Error) *PostResultDefault
- func (o *PostResultDefault) WithStatusCode(code int) *PostResultDefault
- func (o *PostResultDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
- type PostResultHandler
- type PostResultHandlerFunc
- type PostResultParams
- type PostResultURL
- func (o *PostResultURL) Build() (*url.URL, error)
- func (o *PostResultURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *PostResultURL) Must(u *url.URL, err error) *url.URL
- func (o *PostResultURL) SetBasePath(bp string)
- func (o *PostResultURL) String() string
- func (o *PostResultURL) StringFull(scheme, host string) string
- func (o *PostResultURL) WithBasePath(bp string) *PostResultURL
Constants ¶
const GetResultBadRequestCode int = 400
GetResultBadRequestCode is the HTTP code returned for type GetResultBadRequest
const GetResultNotFoundCode int = 404
GetResultNotFoundCode is the HTTP code returned for type GetResultNotFound
const GetResultOKCode int = 200
GetResultOKCode is the HTTP code returned for type GetResultOK
const PostResultBadRequestCode int = 400
PostResultBadRequestCode is the HTTP code returned for type PostResultBadRequest
const PostResultCreatedCode int = 201
PostResultCreatedCode is the HTTP code returned for type PostResultCreated
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetResult ¶
type GetResult struct { Context *middleware.Context Handler GetResultHandler }
GetResult swagger:route GET /projects/{platform}/{org}/{repo} results getResult
Get a repository's ScorecardResult
func NewGetResult ¶
func NewGetResult(ctx *middleware.Context, handler GetResultHandler) *GetResult
NewGetResult creates a new http.Handler for the get result operation
type GetResultBadRequest ¶
GetResultBadRequest The request provided to the server was invalid
swagger:response getResultBadRequest
func NewGetResultBadRequest ¶
func NewGetResultBadRequest() *GetResultBadRequest
NewGetResultBadRequest creates GetResultBadRequest with default headers values
func (*GetResultBadRequest) SetPayload ¶
func (o *GetResultBadRequest) SetPayload(payload *models.Error)
SetPayload sets the payload to the get result bad request response
func (*GetResultBadRequest) WithPayload ¶
func (o *GetResultBadRequest) WithPayload(payload *models.Error) *GetResultBadRequest
WithPayload adds the payload to the get result bad request response
func (*GetResultBadRequest) WriteResponse ¶
func (o *GetResultBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetResultDefault ¶
type GetResultDefault struct { /* In: Body */ Payload *models.Error `json:"body,omitempty"` // contains filtered or unexported fields }
GetResultDefault There was an internal error in the server while processing the request
swagger:response getResultDefault
func NewGetResultDefault ¶
func NewGetResultDefault(code int) *GetResultDefault
NewGetResultDefault creates GetResultDefault with default headers values
func (*GetResultDefault) SetPayload ¶
func (o *GetResultDefault) SetPayload(payload *models.Error)
SetPayload sets the payload to the get result default response
func (*GetResultDefault) SetStatusCode ¶
func (o *GetResultDefault) SetStatusCode(code int)
SetStatusCode sets the status to the get result default response
func (*GetResultDefault) WithPayload ¶
func (o *GetResultDefault) WithPayload(payload *models.Error) *GetResultDefault
WithPayload adds the payload to the get result default response
func (*GetResultDefault) WithStatusCode ¶
func (o *GetResultDefault) WithStatusCode(code int) *GetResultDefault
WithStatusCode adds the status to the get result default response
func (*GetResultDefault) WriteResponse ¶
func (o *GetResultDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetResultHandler ¶
type GetResultHandler interface {
Handle(GetResultParams) middleware.Responder
}
GetResultHandler interface for that can handle valid get result params
type GetResultHandlerFunc ¶
type GetResultHandlerFunc func(GetResultParams) middleware.Responder
GetResultHandlerFunc turns a function with the right signature into a get result handler
func (GetResultHandlerFunc) Handle ¶
func (fn GetResultHandlerFunc) Handle(params GetResultParams) middleware.Responder
Handle executing the request and returning a response
type GetResultNotFound ¶
type GetResultNotFound struct { }
GetResultNotFound The content requested could not be found
swagger:response getResultNotFound
func NewGetResultNotFound ¶
func NewGetResultNotFound() *GetResultNotFound
NewGetResultNotFound creates GetResultNotFound with default headers values
func (*GetResultNotFound) WriteResponse ¶
func (o *GetResultNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetResultOK ¶
type GetResultOK struct { /* In: Body */ Payload *models.ScorecardResult `json:"body,omitempty"` }
GetResultOK A JSON object of the repository's ScorecardResult
swagger:response getResultOK
func NewGetResultOK ¶
func NewGetResultOK() *GetResultOK
NewGetResultOK creates GetResultOK with default headers values
func (*GetResultOK) SetPayload ¶
func (o *GetResultOK) SetPayload(payload *models.ScorecardResult)
SetPayload sets the payload to the get result o k response
func (*GetResultOK) WithPayload ¶
func (o *GetResultOK) WithPayload(payload *models.ScorecardResult) *GetResultOK
WithPayload adds the payload to the get result o k response
func (*GetResultOK) WriteResponse ¶
func (o *GetResultOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetResultParams ¶
type GetResultParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /*SHA1 commit hash expressed in hexadecimal format Pattern: ^[0-9a-fA-F]{40}$ In: query */ Commit *string /*Name of the owner/organization of the repository Required: true In: path */ Org string /*VCS platform. eg. github.com Required: true In: path */ Platform string /*Name of the repository Required: true In: path */ Repo string }
GetResultParams contains all the bound params for the get result operation typically these are obtained from a http.Request
swagger:parameters getResult
func NewGetResultParams ¶
func NewGetResultParams() GetResultParams
NewGetResultParams creates a new GetResultParams object
There are no default values defined in the spec.
func (*GetResultParams) BindRequest ¶
func (o *GetResultParams) 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 NewGetResultParams() beforehand.
type GetResultURL ¶
type GetResultURL struct { Org string Platform string Repo string Commit *string // contains filtered or unexported fields }
GetResultURL generates an URL for the get result operation
func (*GetResultURL) Build ¶
func (o *GetResultURL) Build() (*url.URL, error)
Build a url path and query string
func (*GetResultURL) BuildFull ¶
func (o *GetResultURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*GetResultURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*GetResultURL) SetBasePath ¶
func (o *GetResultURL) 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 (*GetResultURL) String ¶
func (o *GetResultURL) String() string
String returns the string representation of the path with query string
func (*GetResultURL) StringFull ¶
func (o *GetResultURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*GetResultURL) WithBasePath ¶
func (o *GetResultURL) WithBasePath(bp string) *GetResultURL
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 PostResult ¶
type PostResult struct { Context *middleware.Context Handler PostResultHandler }
PostResult swagger:route POST /projects/{platform}/{org}/{repo} results postResult
Publish a repository's OIDC verified ScorecardResult
func NewPostResult ¶
func NewPostResult(ctx *middleware.Context, handler PostResultHandler) *PostResult
NewPostResult creates a new http.Handler for the post result operation
func (*PostResult) ServeHTTP ¶
func (o *PostResult) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type PostResultBadRequest ¶
PostResultBadRequest The request provided to the server was invalid
swagger:response postResultBadRequest
func NewPostResultBadRequest ¶
func NewPostResultBadRequest() *PostResultBadRequest
NewPostResultBadRequest creates PostResultBadRequest with default headers values
func (*PostResultBadRequest) SetPayload ¶
func (o *PostResultBadRequest) SetPayload(payload *models.Error)
SetPayload sets the payload to the post result bad request response
func (*PostResultBadRequest) WithPayload ¶
func (o *PostResultBadRequest) WithPayload(payload *models.Error) *PostResultBadRequest
WithPayload adds the payload to the post result bad request response
func (*PostResultBadRequest) WriteResponse ¶
func (o *PostResultBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type PostResultCreated ¶
type PostResultCreated struct { /* In: Body */ Payload string `json:"body,omitempty"` }
PostResultCreated Successfully updated ScorecardResult
swagger:response postResultCreated
func NewPostResultCreated ¶
func NewPostResultCreated() *PostResultCreated
NewPostResultCreated creates PostResultCreated with default headers values
func (*PostResultCreated) SetPayload ¶
func (o *PostResultCreated) SetPayload(payload string)
SetPayload sets the payload to the post result created response
func (*PostResultCreated) WithPayload ¶
func (o *PostResultCreated) WithPayload(payload string) *PostResultCreated
WithPayload adds the payload to the post result created response
func (*PostResultCreated) WriteResponse ¶
func (o *PostResultCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type PostResultDefault ¶
type PostResultDefault struct { /* In: Body */ Payload *models.Error `json:"body,omitempty"` // contains filtered or unexported fields }
PostResultDefault There was an internal error in the server while processing the request
swagger:response postResultDefault
func NewPostResultDefault ¶
func NewPostResultDefault(code int) *PostResultDefault
NewPostResultDefault creates PostResultDefault with default headers values
func (*PostResultDefault) SetPayload ¶
func (o *PostResultDefault) SetPayload(payload *models.Error)
SetPayload sets the payload to the post result default response
func (*PostResultDefault) SetStatusCode ¶
func (o *PostResultDefault) SetStatusCode(code int)
SetStatusCode sets the status to the post result default response
func (*PostResultDefault) WithPayload ¶
func (o *PostResultDefault) WithPayload(payload *models.Error) *PostResultDefault
WithPayload adds the payload to the post result default response
func (*PostResultDefault) WithStatusCode ¶
func (o *PostResultDefault) WithStatusCode(code int) *PostResultDefault
WithStatusCode adds the status to the post result default response
func (*PostResultDefault) WriteResponse ¶
func (o *PostResultDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type PostResultHandler ¶
type PostResultHandler interface {
Handle(PostResultParams) middleware.Responder
}
PostResultHandler interface for that can handle valid post result params
type PostResultHandlerFunc ¶
type PostResultHandlerFunc func(PostResultParams) middleware.Responder
PostResultHandlerFunc turns a function with the right signature into a post result handler
func (PostResultHandlerFunc) Handle ¶
func (fn PostResultHandlerFunc) Handle(params PostResultParams) middleware.Responder
Handle executing the request and returning a response
type PostResultParams ¶
type PostResultParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /*Name of the owner/organization of the repository Required: true In: path */ Org string /*VCS platform. eg. github.com Required: true In: path */ Platform string /* Required: true In: body */ Publish *models.VerifiedScorecardResult /*Name of the repository Required: true In: path */ Repo string }
PostResultParams contains all the bound params for the post result operation typically these are obtained from a http.Request
swagger:parameters postResult
func NewPostResultParams ¶
func NewPostResultParams() PostResultParams
NewPostResultParams creates a new PostResultParams object
There are no default values defined in the spec.
func (*PostResultParams) BindRequest ¶
func (o *PostResultParams) 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 NewPostResultParams() beforehand.
type PostResultURL ¶
type PostResultURL struct { Org string Platform string Repo string // contains filtered or unexported fields }
PostResultURL generates an URL for the post result operation
func (*PostResultURL) Build ¶
func (o *PostResultURL) Build() (*url.URL, error)
Build a url path and query string
func (*PostResultURL) BuildFull ¶
func (o *PostResultURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*PostResultURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*PostResultURL) SetBasePath ¶
func (o *PostResultURL) 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 (*PostResultURL) String ¶
func (o *PostResultURL) String() string
String returns the string representation of the path with query string
func (*PostResultURL) StringFull ¶
func (o *PostResultURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*PostResultURL) WithBasePath ¶
func (o *PostResultURL) WithBasePath(bp string) *PostResultURL
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