Documentation
¶
Overview ¶
Package pkgsiteapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.2 DO NOT EDIT.
Index ¶
- func NewGetImportedByRequest(server string, path string, params *GetImportedByParams) (*http.Request, error)
- func NewGetModuleRequest(server string, path string, params *GetModuleParams) (*http.Request, error)
- func NewGetPackageRequest(server string, path string, params *GetPackageParams) (*http.Request, error)
- func NewGetPackagesRequest(server string, path string, params *GetPackagesParams) (*http.Request, error)
- func NewGetSearchRequest(server string, params *GetSearchParams) (*http.Request, error)
- func NewGetSymbolsRequest(server string, path string, params *GetSymbolsParams) (*http.Request, error)
- func NewGetVersionsRequest(server string, path string, params *GetVersionsParams) (*http.Request, error)
- func NewGetVulnsRequest(server string, path string, params *GetVulnsParams) (*http.Request, error)
- type Candidate
- type Client
- func (c *Client) GetImportedBy(ctx context.Context, path string, params *GetImportedByParams, ...) (*http.Response, error)
- func (c *Client) GetModule(ctx context.Context, path string, params *GetModuleParams, ...) (*http.Response, error)
- func (c *Client) GetPackage(ctx context.Context, path string, params *GetPackageParams, ...) (*http.Response, error)
- func (c *Client) GetPackages(ctx context.Context, path string, params *GetPackagesParams, ...) (*http.Response, error)
- func (c *Client) GetSearch(ctx context.Context, params *GetSearchParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetSymbols(ctx context.Context, path string, params *GetSymbolsParams, ...) (*http.Response, error)
- func (c *Client) GetVersions(ctx context.Context, path string, params *GetVersionsParams, ...) (*http.Response, error)
- func (c *Client) GetVulns(ctx context.Context, path string, params *GetVulnsParams, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetImportedByWithResponse(ctx context.Context, path string, params *GetImportedByParams, ...) (*GetImportedByResponse, error)
- func (c *ClientWithResponses) GetModuleWithResponse(ctx context.Context, path string, params *GetModuleParams, ...) (*GetModuleResponse, error)
- func (c *ClientWithResponses) GetPackageWithResponse(ctx context.Context, path string, params *GetPackageParams, ...) (*GetPackageResponse, error)
- func (c *ClientWithResponses) GetPackagesWithResponse(ctx context.Context, path string, params *GetPackagesParams, ...) (*GetPackagesResponse, error)
- func (c *ClientWithResponses) GetSearchWithResponse(ctx context.Context, params *GetSearchParams, reqEditors ...RequestEditorFn) (*GetSearchResponse, error)
- func (c *ClientWithResponses) GetSymbolsWithResponse(ctx context.Context, path string, params *GetSymbolsParams, ...) (*GetSymbolsResponse, error)
- func (c *ClientWithResponses) GetVersionsWithResponse(ctx context.Context, path string, params *GetVersionsParams, ...) (*GetVersionsResponse, error)
- func (c *ClientWithResponses) GetVulnsWithResponse(ctx context.Context, path string, params *GetVulnsParams, ...) (*GetVulnsResponse, error)
- type ClientWithResponsesInterface
- type Error
- type GetImportedByParams
- type GetImportedByResponse
- type GetModuleParams
- type GetModuleResponse
- type GetPackageParams
- type GetPackageResponse
- type GetPackagesParams
- type GetPackagesResponse
- type GetSearchParams
- type GetSearchResponse
- type GetSymbolsParams
- type GetSymbolsResponse
- type GetVersionsParams
- type GetVersionsResponse
- type GetVulnsParams
- type GetVulnsResponse
- type HttpRequestDoer
- type License
- type Module
- type ModuleVersion
- type Package
- type PackageImportedBy
- type PackageInfo
- type PackageSymbols
- type PackagesResponse
- type PaginatedResponseModuleVersion
- type PaginatedResponsePackageInfo
- type PaginatedResponseSearchResult
- type PaginatedResponseString
- type PaginatedResponseSymbol
- type PaginatedResponseVulnerability
- type Readme
- type RequestEditorFn
- type SearchResult
- type SearchResultData
- type Symbol
- type SymbolResult
- type VersionResult
- type Vulnerability
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGetImportedByRequest ¶
func NewGetImportedByRequest(server string, path string, params *GetImportedByParams) (*http.Request, error)
NewGetImportedByRequest generates requests for GetImportedBy
func NewGetModuleRequest ¶
func NewGetModuleRequest(server string, path string, params *GetModuleParams) (*http.Request, error)
NewGetModuleRequest generates requests for GetModule
func NewGetPackageRequest ¶
func NewGetPackageRequest(server string, path string, params *GetPackageParams) (*http.Request, error)
NewGetPackageRequest generates requests for GetPackage
func NewGetPackagesRequest ¶
func NewGetPackagesRequest(server string, path string, params *GetPackagesParams) (*http.Request, error)
NewGetPackagesRequest generates requests for GetPackages
func NewGetSearchRequest ¶
func NewGetSearchRequest(server string, params *GetSearchParams) (*http.Request, error)
NewGetSearchRequest generates requests for GetSearch
func NewGetSymbolsRequest ¶
func NewGetSymbolsRequest(server string, path string, params *GetSymbolsParams) (*http.Request, error)
NewGetSymbolsRequest generates requests for GetSymbols
func NewGetVersionsRequest ¶
func NewGetVersionsRequest(server string, path string, params *GetVersionsParams) (*http.Request, error)
NewGetVersionsRequest generates requests for GetVersions
func NewGetVulnsRequest ¶
NewGetVulnsRequest generates requests for GetVulns
Types ¶
type Candidate ¶
type Candidate struct {
ModulePath *string `json:"modulePath,omitempty"`
PackagePath *string `json:"packagePath,omitempty"`
}
Candidate defines model for Candidate.
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) GetImportedBy ¶
func (c *Client) GetImportedBy(ctx context.Context, path string, params *GetImportedByParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetModule ¶
func (c *Client) GetModule(ctx context.Context, path string, params *GetModuleParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetPackage ¶
func (c *Client) GetPackage(ctx context.Context, path string, params *GetPackageParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetPackages ¶
func (c *Client) GetPackages(ctx context.Context, path string, params *GetPackagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetSearch ¶
func (c *Client) GetSearch(ctx context.Context, params *GetSearchParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetSymbols ¶
func (c *Client) GetSymbols(ctx context.Context, path string, params *GetSymbolsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetVersions ¶
func (c *Client) GetVersions(ctx context.Context, path string, params *GetVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// GetImportedBy request
GetImportedBy(ctx context.Context, path string, params *GetImportedByParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetModule request
GetModule(ctx context.Context, path string, params *GetModuleParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetPackage request
GetPackage(ctx context.Context, path string, params *GetPackageParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetPackages request
GetPackages(ctx context.Context, path string, params *GetPackagesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSearch request
GetSearch(ctx context.Context, params *GetSearchParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSymbols request
GetSymbols(ctx context.Context, path string, params *GetSymbolsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetVersions request
GetVersions(ctx context.Context, path string, params *GetVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetVulns request
GetVulns(ctx context.Context, path string, params *GetVulnsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) GetImportedByWithResponse ¶
func (c *ClientWithResponses) GetImportedByWithResponse(ctx context.Context, path string, params *GetImportedByParams, reqEditors ...RequestEditorFn) (*GetImportedByResponse, error)
GetImportedByWithResponse request returning *GetImportedByResponse
func (*ClientWithResponses) GetModuleWithResponse ¶
func (c *ClientWithResponses) GetModuleWithResponse(ctx context.Context, path string, params *GetModuleParams, reqEditors ...RequestEditorFn) (*GetModuleResponse, error)
GetModuleWithResponse request returning *GetModuleResponse
func (*ClientWithResponses) GetPackageWithResponse ¶
func (c *ClientWithResponses) GetPackageWithResponse(ctx context.Context, path string, params *GetPackageParams, reqEditors ...RequestEditorFn) (*GetPackageResponse, error)
GetPackageWithResponse request returning *GetPackageResponse
func (*ClientWithResponses) GetPackagesWithResponse ¶
func (c *ClientWithResponses) GetPackagesWithResponse(ctx context.Context, path string, params *GetPackagesParams, reqEditors ...RequestEditorFn) (*GetPackagesResponse, error)
GetPackagesWithResponse request returning *GetPackagesResponse
func (*ClientWithResponses) GetSearchWithResponse ¶
func (c *ClientWithResponses) GetSearchWithResponse(ctx context.Context, params *GetSearchParams, reqEditors ...RequestEditorFn) (*GetSearchResponse, error)
GetSearchWithResponse request returning *GetSearchResponse
func (*ClientWithResponses) GetSymbolsWithResponse ¶
func (c *ClientWithResponses) GetSymbolsWithResponse(ctx context.Context, path string, params *GetSymbolsParams, reqEditors ...RequestEditorFn) (*GetSymbolsResponse, error)
GetSymbolsWithResponse request returning *GetSymbolsResponse
func (*ClientWithResponses) GetVersionsWithResponse ¶
func (c *ClientWithResponses) GetVersionsWithResponse(ctx context.Context, path string, params *GetVersionsParams, reqEditors ...RequestEditorFn) (*GetVersionsResponse, error)
GetVersionsWithResponse request returning *GetVersionsResponse
func (*ClientWithResponses) GetVulnsWithResponse ¶
func (c *ClientWithResponses) GetVulnsWithResponse(ctx context.Context, path string, params *GetVulnsParams, reqEditors ...RequestEditorFn) (*GetVulnsResponse, error)
GetVulnsWithResponse request returning *GetVulnsResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetImportedByWithResponse request
GetImportedByWithResponse(ctx context.Context, path string, params *GetImportedByParams, reqEditors ...RequestEditorFn) (*GetImportedByResponse, error)
// GetModuleWithResponse request
GetModuleWithResponse(ctx context.Context, path string, params *GetModuleParams, reqEditors ...RequestEditorFn) (*GetModuleResponse, error)
// GetPackageWithResponse request
GetPackageWithResponse(ctx context.Context, path string, params *GetPackageParams, reqEditors ...RequestEditorFn) (*GetPackageResponse, error)
// GetPackagesWithResponse request
GetPackagesWithResponse(ctx context.Context, path string, params *GetPackagesParams, reqEditors ...RequestEditorFn) (*GetPackagesResponse, error)
// GetSearchWithResponse request
GetSearchWithResponse(ctx context.Context, params *GetSearchParams, reqEditors ...RequestEditorFn) (*GetSearchResponse, error)
// GetSymbolsWithResponse request
GetSymbolsWithResponse(ctx context.Context, path string, params *GetSymbolsParams, reqEditors ...RequestEditorFn) (*GetSymbolsResponse, error)
// GetVersionsWithResponse request
GetVersionsWithResponse(ctx context.Context, path string, params *GetVersionsParams, reqEditors ...RequestEditorFn) (*GetVersionsResponse, error)
// GetVulnsWithResponse request
GetVulnsWithResponse(ctx context.Context, path string, params *GetVulnsParams, reqEditors ...RequestEditorFn) (*GetVulnsResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type Error ¶
type Error struct {
Candidates *[]Candidate `json:"candidates,omitempty"`
// Code Code is the HTTP status code.
Code *int `json:"code,omitempty"`
// Fixes Fixes are suggestions for how to fix.
Fixes *[]string `json:"fixes,omitempty"`
Message *string `json:"message,omitempty"`
}
Error defines model for Error.
type GetImportedByParams ¶
type GetImportedByParams struct {
// Module Module path.
Module *string `form:"module,omitempty" json:"module,omitempty"`
// Version Module version: semantic version, 'latest', or default branches 'master' or 'main'.
// (Latest if empty).
Version *string `form:"version,omitempty" json:"version,omitempty"`
// Limit Max number of items to return.
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
// Token Where to resume listing.
Token *string `form:"token,omitempty" json:"token,omitempty"`
// Filter Include only items matching the regular expression filter.
Filter *string `form:"filter,omitempty" json:"filter,omitempty"`
}
GetImportedByParams defines parameters for GetImportedBy.
type GetImportedByResponse ¶
type GetImportedByResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *PackageImportedBy
JSONDefault *Error
}
func ParseGetImportedByResponse ¶
func ParseGetImportedByResponse(rsp *http.Response) (*GetImportedByResponse, error)
ParseGetImportedByResponse parses an HTTP response from a GetImportedByWithResponse call
func (GetImportedByResponse) ContentType ¶
func (r GetImportedByResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetImportedByResponse) Status ¶
func (r GetImportedByResponse) Status() string
Status returns HTTPResponse.Status
func (GetImportedByResponse) StatusCode ¶
func (r GetImportedByResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetModuleParams ¶
type GetModuleParams struct {
// Version Module version: semantic version, 'latest', or default branches 'master' or 'main'.
// (Latest if empty).
Version *string `form:"version,omitempty" json:"version,omitempty"`
// Licenses Whether to include licenses in the result.
Licenses *bool `form:"licenses,omitempty" json:"licenses,omitempty"`
// Readme Whether to include the README in the result.
Readme *bool `form:"readme,omitempty" json:"readme,omitempty"`
}
GetModuleParams defines parameters for GetModule.
type GetModuleResponse ¶
type GetModuleResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Module
JSONDefault *Error
}
func ParseGetModuleResponse ¶
func ParseGetModuleResponse(rsp *http.Response) (*GetModuleResponse, error)
ParseGetModuleResponse parses an HTTP response from a GetModuleWithResponse call
func (GetModuleResponse) ContentType ¶
func (r GetModuleResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetModuleResponse) Status ¶
func (r GetModuleResponse) Status() string
Status returns HTTPResponse.Status
func (GetModuleResponse) StatusCode ¶
func (r GetModuleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPackageParams ¶
type GetPackageParams struct {
// Module Module path.
Module *string `form:"module,omitempty" json:"module,omitempty"`
// Version Module version: semantic version, 'latest', or default branches 'master' or 'main'.
// (Latest if empty).
Version *string `form:"version,omitempty" json:"version,omitempty"`
// Goos GOOS of documentation build context.
Goos *string `form:"goos,omitempty" json:"goos,omitempty"`
// Goarch GOARCH of documentation build context.
Goarch *string `form:"goarch,omitempty" json:"goarch,omitempty"`
// Doc Documentation format: text, html, md or markdown.
// If omitted, documentation is not returned.
Doc *string `form:"doc,omitempty" json:"doc,omitempty"`
// Examples Whether to include examples with the returned documentation.
Examples *bool `form:"examples,omitempty" json:"examples,omitempty"`
// Imports Whether to include the packages that this one imports.
Imports *bool `form:"imports,omitempty" json:"imports,omitempty"`
// Licenses Whether to include licenses in the result.
Licenses *bool `form:"licenses,omitempty" json:"licenses,omitempty"`
}
GetPackageParams defines parameters for GetPackage.
type GetPackageResponse ¶
type GetPackageResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Package
JSONDefault *Error
}
func ParseGetPackageResponse ¶
func ParseGetPackageResponse(rsp *http.Response) (*GetPackageResponse, error)
ParseGetPackageResponse parses an HTTP response from a GetPackageWithResponse call
func (GetPackageResponse) ContentType ¶
func (r GetPackageResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetPackageResponse) Status ¶
func (r GetPackageResponse) Status() string
Status returns HTTPResponse.Status
func (GetPackageResponse) StatusCode ¶
func (r GetPackageResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetPackagesParams ¶
type GetPackagesParams struct {
// Version Module version: semantic version, 'latest', or default branches 'master' or 'main'.
// (Latest if empty).
Version *string `form:"version,omitempty" json:"version,omitempty"`
// Limit Max number of items to return.
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
// Token Where to resume listing.
Token *string `form:"token,omitempty" json:"token,omitempty"`
// Filter Include only items matching the regular expression filter.
Filter *string `form:"filter,omitempty" json:"filter,omitempty"`
}
GetPackagesParams defines parameters for GetPackages.
type GetPackagesResponse ¶
type GetPackagesResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *PackagesResponse
JSONDefault *Error
}
func ParseGetPackagesResponse ¶
func ParseGetPackagesResponse(rsp *http.Response) (*GetPackagesResponse, error)
ParseGetPackagesResponse parses an HTTP response from a GetPackagesWithResponse call
func (GetPackagesResponse) ContentType ¶
func (r GetPackagesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetPackagesResponse) Status ¶
func (r GetPackagesResponse) Status() string
Status returns HTTPResponse.Status
func (GetPackagesResponse) StatusCode ¶
func (r GetPackagesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSearchParams ¶
type GetSearchParams struct {
// Q Find packages matching this query.
Q *string `form:"q,omitempty" json:"q,omitempty"`
// Symbol If non-empty, find symbols matching this string.
// The query further restricts the search to matching packages.
Symbol *string `form:"symbol,omitempty" json:"symbol,omitempty"`
// Limit Max number of items to return.
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
// Token Where to resume listing.
Token *string `form:"token,omitempty" json:"token,omitempty"`
// Filter Include only items matching the regular expression filter.
Filter *string `form:"filter,omitempty" json:"filter,omitempty"`
}
GetSearchParams defines parameters for GetSearch.
type GetSearchResponse ¶
type GetSearchResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *PaginatedResponseSearchResult
JSONDefault *Error
}
func ParseGetSearchResponse ¶
func ParseGetSearchResponse(rsp *http.Response) (*GetSearchResponse, error)
ParseGetSearchResponse parses an HTTP response from a GetSearchWithResponse call
func (GetSearchResponse) ContentType ¶
func (r GetSearchResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetSearchResponse) Status ¶
func (r GetSearchResponse) Status() string
Status returns HTTPResponse.Status
func (GetSearchResponse) StatusCode ¶
func (r GetSearchResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSymbolsParams ¶
type GetSymbolsParams struct {
// Module Module path.
Module *string `form:"module,omitempty" json:"module,omitempty"`
// Version Module version: semantic version, 'latest', or default branches 'master' or 'main'.
// (Latest if empty).
Version *string `form:"version,omitempty" json:"version,omitempty"`
// Goos GOOS of documentation build context.
Goos *string `form:"goos,omitempty" json:"goos,omitempty"`
// Goarch GOARCH of documentation build context.
Goarch *string `form:"goarch,omitempty" json:"goarch,omitempty"`
// Limit Max number of items to return.
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
// Token Where to resume listing.
Token *string `form:"token,omitempty" json:"token,omitempty"`
// Filter Include only items matching the regular expression filter.
Filter *string `form:"filter,omitempty" json:"filter,omitempty"`
}
GetSymbolsParams defines parameters for GetSymbols.
type GetSymbolsResponse ¶
type GetSymbolsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *PackageSymbols
JSONDefault *Error
}
func ParseGetSymbolsResponse ¶
func ParseGetSymbolsResponse(rsp *http.Response) (*GetSymbolsResponse, error)
ParseGetSymbolsResponse parses an HTTP response from a GetSymbolsWithResponse call
func (GetSymbolsResponse) ContentType ¶
func (r GetSymbolsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetSymbolsResponse) Status ¶
func (r GetSymbolsResponse) Status() string
Status returns HTTPResponse.Status
func (GetSymbolsResponse) StatusCode ¶
func (r GetSymbolsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetVersionsParams ¶
type GetVersionsParams struct {
// Limit Max number of items to return.
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
// Token Where to resume listing.
Token *string `form:"token,omitempty" json:"token,omitempty"`
// Filter Include only items matching the regular expression filter.
Filter *string `form:"filter,omitempty" json:"filter,omitempty"`
// Pseudo Whether to include pseudo-versions in the result.
Pseudo *bool `form:"pseudo,omitempty" json:"pseudo,omitempty"`
}
GetVersionsParams defines parameters for GetVersions.
type GetVersionsResponse ¶
type GetVersionsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *PaginatedResponseModuleVersion
JSONDefault *Error
}
func ParseGetVersionsResponse ¶
func ParseGetVersionsResponse(rsp *http.Response) (*GetVersionsResponse, error)
ParseGetVersionsResponse parses an HTTP response from a GetVersionsWithResponse call
func (GetVersionsResponse) ContentType ¶
func (r GetVersionsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetVersionsResponse) Status ¶
func (r GetVersionsResponse) Status() string
Status returns HTTPResponse.Status
func (GetVersionsResponse) StatusCode ¶
func (r GetVersionsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetVulnsParams ¶
type GetVulnsParams struct {
// Module Module path.
Module *string `form:"module,omitempty" json:"module,omitempty"`
// Version Module version: semantic version, 'latest', or default branches 'master' or 'main'.
// (Latest if empty).
Version *string `form:"version,omitempty" json:"version,omitempty"`
// Limit Max number of items to return.
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
// Token Where to resume listing.
Token *string `form:"token,omitempty" json:"token,omitempty"`
// Filter Include only items matching the regular expression filter.
Filter *string `form:"filter,omitempty" json:"filter,omitempty"`
}
GetVulnsParams defines parameters for GetVulns.
type GetVulnsResponse ¶
type GetVulnsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *PaginatedResponseVulnerability
JSONDefault *Error
}
func ParseGetVulnsResponse ¶
func ParseGetVulnsResponse(rsp *http.Response) (*GetVulnsResponse, error)
ParseGetVulnsResponse parses an HTTP response from a GetVulnsWithResponse call
func (GetVulnsResponse) ContentType ¶
func (r GetVulnsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetVulnsResponse) Status ¶
func (r GetVulnsResponse) Status() string
Status returns HTTPResponse.Status
func (GetVulnsResponse) StatusCode ¶
func (r GetVulnsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type License ¶
type License struct {
Contents *string `json:"contents,omitempty"`
FilePath *string `json:"filePath,omitempty"`
Types *[]string `json:"types,omitempty"`
}
License defines model for License.
type Module ¶
type Module struct {
// CommitTime CommitTime is the timestamp returned by the module proxy's .info endpoint,
// representing the time the version was created.
CommitTime *time.Time `json:"commitTime,omitempty"`
GoModContents *string `json:"goModContents,omitempty"`
HasGoMod *bool `json:"hasGoMod,omitempty"`
IsLatest *bool `json:"isLatest,omitempty"`
IsRedistributable *bool `json:"isRedistributable,omitempty"`
IsStandardLibrary *bool `json:"isStandardLibrary,omitempty"`
Licenses *[]License `json:"licenses,omitempty"`
Path *string `json:"path,omitempty"`
Readme *Readme `json:"readme,omitempty"`
RepoUrl *string `json:"repoUrl,omitempty"`
Version *string `json:"version,omitempty"`
}
Module defines model for Module.
type ModuleVersion ¶
type ModuleVersion struct {
CommitTime *time.Time `json:"commitTime,omitempty"`
Deprecated *bool `json:"deprecated,omitempty"`
DeprecationReason *string `json:"deprecationReason,omitempty"`
// HasGoMod HasGoMod is whether the module has a go.mod file.
HasGoMod *bool `json:"hasGoMod,omitempty"`
// IsRedistributable IsRedistributable is whether the license allows distribution.
IsRedistributable *bool `json:"isRedistributable,omitempty"`
// LatestVersion LatestVersion is the latest unretracted version.
LatestVersion *string `json:"latestVersion,omitempty"`
ModulePath *string `json:"modulePath,omitempty"`
Retracted *bool `json:"retracted,omitempty"`
RetractionReason *string `json:"retractionReason,omitempty"`
Version *string `json:"version,omitempty"`
}
ModuleVersion defines model for ModuleVersion.
type Package ¶
type Package struct {
Docs *string `json:"docs,omitempty"`
Goarch *string `json:"goarch,omitempty"`
Goos *string `json:"goos,omitempty"`
Imports *[]string `json:"imports,omitempty"`
IsLatest *bool `json:"isLatest,omitempty"`
// IsRedistributable IsRedistributable is whether the license allows distribution.
IsRedistributable *bool `json:"isRedistributable,omitempty"`
IsStandardLibrary *bool `json:"isStandardLibrary,omitempty"`
Licenses *[]License `json:"licenses,omitempty"`
ModulePath *string `json:"modulePath,omitempty"`
Name *string `json:"name,omitempty"`
Path *string `json:"path,omitempty"`
Synopsis *string `json:"synopsis,omitempty"`
Version *string `json:"version,omitempty"`
}
Package defines model for Package.
type PackageImportedBy ¶
type PackageImportedBy struct {
ImportedBy *PaginatedResponseString `json:"importedBy,omitempty"`
ModulePath *string `json:"modulePath,omitempty"`
Version *string `json:"version,omitempty"`
}
PackageImportedBy defines model for PackageImportedBy.
type PackageInfo ¶
type PackageInfo struct {
// IsRedistributable IsRedistributable is whether the license allows distribution.
IsRedistributable *bool `json:"isRedistributable,omitempty"`
Name *string `json:"name,omitempty"`
Path *string `json:"path,omitempty"`
Synopsis *string `json:"synopsis,omitempty"`
}
PackageInfo defines model for PackageInfo.
type PackageSymbols ¶
type PackageSymbols struct {
ModulePath *string `json:"modulePath,omitempty"`
Symbols *PaginatedResponseSymbol `json:"symbols,omitempty"`
Version *string `json:"version,omitempty"`
}
PackageSymbols defines model for PackageSymbols.
func (*PackageSymbols) SymbolResults ¶
func (p *PackageSymbols) SymbolResults() []SymbolResult
type PackagesResponse ¶
type PackagesResponse struct {
IsStandardLibrary *bool `json:"isStandardLibrary,omitempty"`
ModulePath *string `json:"modulePath,omitempty"`
Packages *PaginatedResponsePackageInfo `json:"packages,omitempty"`
Version *string `json:"version,omitempty"`
}
PackagesResponse defines model for PackagesResponse.
type PaginatedResponseModuleVersion ¶
type PaginatedResponseModuleVersion struct {
Items *[]ModuleVersion `json:"items,omitempty"`
NextPageToken *string `json:"nextPageToken,omitempty"`
Total *int `json:"total,omitempty"`
}
PaginatedResponseModuleVersion defines model for PaginatedResponse_ModuleVersion.
func (*PaginatedResponseModuleVersion) VersionResults ¶
func (p *PaginatedResponseModuleVersion) VersionResults() []VersionResult
type PaginatedResponsePackageInfo ¶
type PaginatedResponsePackageInfo struct {
Items *[]PackageInfo `json:"items,omitempty"`
NextPageToken *string `json:"nextPageToken,omitempty"`
Total *int `json:"total,omitempty"`
}
PaginatedResponsePackageInfo defines model for PaginatedResponse_PackageInfo.
type PaginatedResponseSearchResult ¶
type PaginatedResponseSearchResult struct {
Items *[]SearchResult `json:"items,omitempty"`
NextPageToken *string `json:"nextPageToken,omitempty"`
Total *int `json:"total,omitempty"`
}
PaginatedResponseSearchResult defines model for PaginatedResponse_SearchResult.
func (*PaginatedResponseSearchResult) SearchResults ¶
func (p *PaginatedResponseSearchResult) SearchResults() []SearchResultData
type PaginatedResponseString ¶
type PaginatedResponseString struct {
Items *[]string `json:"items,omitempty"`
NextPageToken *string `json:"nextPageToken,omitempty"`
Total *int `json:"total,omitempty"`
}
PaginatedResponseString defines model for PaginatedResponse_string.
type PaginatedResponseSymbol ¶
type PaginatedResponseSymbol struct {
Items *[]Symbol `json:"items,omitempty"`
NextPageToken *string `json:"nextPageToken,omitempty"`
Total *int `json:"total,omitempty"`
}
PaginatedResponseSymbol defines model for PaginatedResponse_Symbol.
func (*PaginatedResponseSymbol) SymbolResults ¶
func (p *PaginatedResponseSymbol) SymbolResults() []SymbolResult
type PaginatedResponseVulnerability ¶
type PaginatedResponseVulnerability struct {
Items *[]Vulnerability `json:"items,omitempty"`
NextPageToken *string `json:"nextPageToken,omitempty"`
Total *int `json:"total,omitempty"`
}
PaginatedResponseVulnerability defines model for PaginatedResponse_Vulnerability.
type Readme ¶
type Readme struct {
Contents *string `json:"contents,omitempty"`
Filepath *string `json:"filepath,omitempty"`
}
Readme defines model for Readme.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type SearchResult ¶
type SearchResult struct {
ModulePath *string `json:"modulePath,omitempty"`
PackagePath *string `json:"packagePath,omitempty"`
Synopsis *string `json:"synopsis,omitempty"`
Version *string `json:"version,omitempty"`
}
SearchResult defines model for SearchResult.
type SearchResultData ¶
type SearchResultData struct {
PackagePath string
ModulePath string
Version string
Synopsis string
}
SearchResultData is the UI-friendly representation of a search result.
type Symbol ¶
type Symbol struct {
// Kind Kind is one of "Constant", "Variable", "Function", "Type", "Field", or "Method".
Kind *string `json:"kind,omitempty"`
Name *string `json:"name,omitempty"`
Parent *string `json:"parent,omitempty"`
Synopsis *string `json:"synopsis,omitempty"`
}
Symbol defines model for Symbol.