Documentation
¶
Index ¶
- func ParseGetDirectionQueryParameterType(v string) (any, error)
- func ParseGetSeverityQueryParameterType(v string) (any, error)
- func ParseGetSortQueryParameterType(v string) (any, error)
- func ParseGetTypeQueryParameterType(v string) (any, error)
- func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string
- func SerializeGetSeverityQueryParameterType(values []GetSeverityQueryParameterType) []string
- func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string
- func SerializeGetTypeQueryParameterType(values []GetTypeQueryParameterType) []string
- type AdvisoriesRequestBuilder
- func (m *AdvisoriesRequestBuilder) ByGhsa_id(ghsa_id string) *WithGhsa_ItemRequestBuilder
- func (m *AdvisoriesRequestBuilder) Get(ctx context.Context, ...) (...)
- func (m *AdvisoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, ...) (...)
- func (m *AdvisoriesRequestBuilder) WithUrl(rawUrl string) *AdvisoriesRequestBuilder
- type AdvisoriesRequestBuilderGetQueryParameters
- type GetDirectionQueryParameterType
- type GetSeverityQueryParameterType
- type GetSortQueryParameterType
- type GetTypeQueryParameterType
- type WithGhsa_ItemRequestBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SerializeGetDirectionQueryParameterType ¶
func SerializeGetDirectionQueryParameterType(values []GetDirectionQueryParameterType) []string
func SerializeGetSeverityQueryParameterType ¶
func SerializeGetSeverityQueryParameterType(values []GetSeverityQueryParameterType) []string
func SerializeGetSortQueryParameterType ¶
func SerializeGetSortQueryParameterType(values []GetSortQueryParameterType) []string
func SerializeGetTypeQueryParameterType ¶
func SerializeGetTypeQueryParameterType(values []GetTypeQueryParameterType) []string
Types ¶
type AdvisoriesRequestBuilder ¶
type AdvisoriesRequestBuilder struct {
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder
}
AdvisoriesRequestBuilder builds and executes requests for operations under \advisories
func NewAdvisoriesRequestBuilder ¶
func NewAdvisoriesRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *AdvisoriesRequestBuilder
NewAdvisoriesRequestBuilder instantiates a new AdvisoriesRequestBuilder and sets the default values.
func NewAdvisoriesRequestBuilderInternal ¶
func NewAdvisoriesRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *AdvisoriesRequestBuilder
NewAdvisoriesRequestBuilderInternal instantiates a new AdvisoriesRequestBuilder and sets the default values.
func (*AdvisoriesRequestBuilder) ByGhsa_id ¶
func (m *AdvisoriesRequestBuilder) ByGhsa_id(ghsa_id string) *WithGhsa_ItemRequestBuilder
ByGhsa_id gets an item from the github.com/octokit/go-sdk/pkg/github.advisories.item collection returns a *WithGhsa_ItemRequestBuilder when successful
func (*AdvisoriesRequestBuilder) Get ¶
func (m *AdvisoriesRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[AdvisoriesRequestBuilderGetQueryParameters]) ([]i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.GlobalAdvisoryable, error)
Get lists all global security advisories that match the specified parameters. If no other parameters are defined, the request will return only GitHub-reviewed advisories that are not malware.By default, all responses will exclude advisories for malware, because malware are not standard vulnerabilities. To list advisories for malware, you must include the `type` parameter in your request, with the value `malware`. For more information about the different types of security advisories, see "[About the GitHub Advisory database](https://docs.github.com/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories)." returns a []GlobalAdvisoryable when successful returns a ValidationErrorSimple error when the service returns a 422 status code returns a BasicError error when the service returns a 429 status code API method documentation
func (*AdvisoriesRequestBuilder) ToGetRequestInformation ¶
func (m *AdvisoriesRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[AdvisoriesRequestBuilderGetQueryParameters]) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error)
ToGetRequestInformation lists all global security advisories that match the specified parameters. If no other parameters are defined, the request will return only GitHub-reviewed advisories that are not malware.By default, all responses will exclude advisories for malware, because malware are not standard vulnerabilities. To list advisories for malware, you must include the `type` parameter in your request, with the value `malware`. For more information about the different types of security advisories, see "[About the GitHub Advisory database](https://docs.github.com/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories)." returns a *RequestInformation when successful
func (*AdvisoriesRequestBuilder) WithUrl ¶
func (m *AdvisoriesRequestBuilder) WithUrl(rawUrl string) *AdvisoriesRequestBuilder
WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. returns a *AdvisoriesRequestBuilder when successful
type AdvisoriesRequestBuilderGetQueryParameters ¶
type AdvisoriesRequestBuilderGetQueryParameters struct { // If specified, only return advisories that affect any of `package` or `package@version`. A maximum of 1000 packages can be specified.If the query parameter causes the URL to exceed the maximum URL length supported by your client, you must specify fewer packages.Example: `affects=package1,package2@1.0.0,package3@^2.0.0` or `affects[]=package1&affects[]=package2@1.0.0` Affects *string `uriparametername:"affects"` // A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." After *string `uriparametername:"after"` // A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Before *string `uriparametername:"before"` // If specified, only advisories with this CVE (Common Vulnerabilities and Exposures) identifier will be returned. Cve_id *string `uriparametername:"cve_id"` // If specified, only advisories with these Common Weakness Enumerations (CWEs) will be returned.Example: `cwes=79,284,22` or `cwes[]=79&cwes[]=284&cwes[]=22` Cwes *string `uriparametername:"cwes"` // The direction to sort the results by. Direction *GetDirectionQueryParameterType `uriparametername:"direction"` // If specified, only advisories for these ecosystems will be returned. Ecosystem *i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.SecurityAdvisoryEcosystems `uriparametername:"ecosystem"` // If specified, only return advisories that have an EPSS percentage score that matches the provided value.The EPSS percentage represents the likelihood of a CVE being exploited. Epss_percentage *string `uriparametername:"epss_percentage"` // If specified, only return advisories that have an EPSS percentile score that matches the provided value.The EPSS percentile represents the relative rank of the CVE's likelihood of being exploited compared to other CVEs. Epss_percentile *string `uriparametername:"epss_percentile"` // If specified, only advisories with this GHSA (GitHub Security Advisory) identifier will be returned. Ghsa_id *string `uriparametername:"ghsa_id"` // Whether to only return advisories that have been withdrawn. Is_withdrawn *bool `uriparametername:"is_withdrawn"` // If specified, only show advisories that were updated or published on a date or date range.For more information on the syntax of the date range, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." Modified *string `uriparametername:"modified"` // The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." Per_page *int32 `uriparametername:"per_page"` // If specified, only return advisories that were published on a date or date range.For more information on the syntax of the date range, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." Published *string `uriparametername:"published"` // If specified, only advisories with these severities will be returned. Severity *GetSeverityQueryParameterType `uriparametername:"severity"` // The property to sort the results by. Sort *GetSortQueryParameterType `uriparametername:"sort"` // If specified, only advisories of this type will be returned. By default, a request with no other parameters defined will only return reviewed advisories that are not malware. Type *GetTypeQueryParameterType `uriparametername:"type"` // If specified, only return advisories that were updated on a date or date range.For more information on the syntax of the date range, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." Updated *string `uriparametername:"updated"` }
AdvisoriesRequestBuilderGetQueryParameters lists all global security advisories that match the specified parameters. If no other parameters are defined, the request will return only GitHub-reviewed advisories that are not malware.By default, all responses will exclude advisories for malware, because malware are not standard vulnerabilities. To list advisories for malware, you must include the `type` parameter in your request, with the value `malware`. For more information about the different types of security advisories, see "[About the GitHub Advisory database](https://docs.github.com/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories)."
type GetDirectionQueryParameterType ¶
type GetDirectionQueryParameterType int
const ( ASC_GETDIRECTIONQUERYPARAMETERTYPE GetDirectionQueryParameterType = iota DESC_GETDIRECTIONQUERYPARAMETERTYPE )
func (GetDirectionQueryParameterType) String ¶
func (i GetDirectionQueryParameterType) String() string
type GetSeverityQueryParameterType ¶
type GetSeverityQueryParameterType int
const ( UNKNOWN_GETSEVERITYQUERYPARAMETERTYPE GetSeverityQueryParameterType = iota LOW_GETSEVERITYQUERYPARAMETERTYPE MEDIUM_GETSEVERITYQUERYPARAMETERTYPE HIGH_GETSEVERITYQUERYPARAMETERTYPE CRITICAL_GETSEVERITYQUERYPARAMETERTYPE )
func (GetSeverityQueryParameterType) String ¶
func (i GetSeverityQueryParameterType) String() string
type GetSortQueryParameterType ¶
type GetSortQueryParameterType int
const ( UPDATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota PUBLISHED_GETSORTQUERYPARAMETERTYPE EPSS_PERCENTAGE_GETSORTQUERYPARAMETERTYPE EPSS_PERCENTILE_GETSORTQUERYPARAMETERTYPE )
func (GetSortQueryParameterType) String ¶
func (i GetSortQueryParameterType) String() string
type GetTypeQueryParameterType ¶
type GetTypeQueryParameterType int
const ( REVIEWED_GETTYPEQUERYPARAMETERTYPE GetTypeQueryParameterType = iota MALWARE_GETTYPEQUERYPARAMETERTYPE UNREVIEWED_GETTYPEQUERYPARAMETERTYPE )
func (GetTypeQueryParameterType) String ¶
func (i GetTypeQueryParameterType) String() string
type WithGhsa_ItemRequestBuilder ¶
type WithGhsa_ItemRequestBuilder struct {
i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.BaseRequestBuilder
}
WithGhsa_ItemRequestBuilder builds and executes requests for operations under \advisories\{ghsa_id}
func NewWithGhsa_ItemRequestBuilder ¶
func NewWithGhsa_ItemRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *WithGhsa_ItemRequestBuilder
NewWithGhsa_ItemRequestBuilder instantiates a new WithGhsa_ItemRequestBuilder and sets the default values.
func NewWithGhsa_ItemRequestBuilderInternal ¶
func NewWithGhsa_ItemRequestBuilderInternal(pathParameters map[string]string, requestAdapter i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestAdapter) *WithGhsa_ItemRequestBuilder
NewWithGhsa_ItemRequestBuilderInternal instantiates a new WithGhsa_ItemRequestBuilder and sets the default values.
func (*WithGhsa_ItemRequestBuilder) Get ¶
func (m *WithGhsa_ItemRequestBuilder) Get(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters]) (i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.GlobalAdvisoryable, error)
Get gets a global security advisory using its GitHub Security Advisory (GHSA) identifier. returns a GlobalAdvisoryable when successful returns a BasicError error when the service returns a 404 status code API method documentation
func (*WithGhsa_ItemRequestBuilder) ToGetRequestInformation ¶
func (m *WithGhsa_ItemRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters]) (*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error)
ToGetRequestInformation gets a global security advisory using its GitHub Security Advisory (GHSA) identifier. returns a *RequestInformation when successful
func (*WithGhsa_ItemRequestBuilder) WithUrl ¶
func (m *WithGhsa_ItemRequestBuilder) WithUrl(rawUrl string) *WithGhsa_ItemRequestBuilder
WithUrl returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. returns a *WithGhsa_ItemRequestBuilder when successful