Documentation ¶
Index ¶
- Constants
- type FFResponse
- type FakeApiClient
- func (f *FakeApiClient) Clear()
- func (f *FakeApiClient) FeatureFlagStatus(featureFlagType FeatureFlagType) (FFResponse, error)
- func (f *FakeApiClient) GetAllCalls(op string) [][]any
- func (f *FakeApiClient) GetCallParams(callNo int, op string) []any
- func (f *FakeApiClient) SastSettings() (SastResponse, error)
- func (f *FakeApiClient) SetResponse(method string, response any)
- type FeatureFlagType
- type LocalCodeEngine
- type SastResponse
- type SnykApiClient
- type SnykApiClientImpl
- type SnykApiError
Constants ¶
View Source
const (
SastEnabledOperation = "sastEnabled"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FFResponse ¶
type FakeApiClient ¶
type FakeApiClient struct { Calls map[string][][]any CodeEnabled bool LocalCodeEngine LocalCodeEngine AutofixEnabled bool ApiError *SnykApiError Responses map[string]any }
func (*FakeApiClient) Clear ¶
func (f *FakeApiClient) Clear()
func (*FakeApiClient) FeatureFlagStatus ¶
func (f *FakeApiClient) FeatureFlagStatus(featureFlagType FeatureFlagType) (FFResponse, error)
func (*FakeApiClient) GetAllCalls ¶
func (f *FakeApiClient) GetAllCalls(op string) [][]any
func (*FakeApiClient) GetCallParams ¶
func (f *FakeApiClient) GetCallParams(callNo int, op string) []any
func (*FakeApiClient) SastSettings ¶
func (f *FakeApiClient) SastSettings() (SastResponse, error)
func (*FakeApiClient) SetResponse ¶
func (f *FakeApiClient) SetResponse(method string, response any)
type FeatureFlagType ¶
type FeatureFlagType string
const (
FeatureFlagSnykCodeConsistentIgnores FeatureFlagType = "snykCodeConsistentIgnores"
)
type LocalCodeEngine ¶
type SastResponse ¶
type SastResponse struct { SastEnabled bool `json:"sastEnabled"` LocalCodeEngine LocalCodeEngine `json:"localCodeEngine"` Org string `json:"org"` SupportedLanguages []string `json:"supportedLanguages"` ReportFalsePositivesEnabled bool `json:"reportFalsePositivesEnabled"` AutofixEnabled bool `json:"autofixEnabled"` }
type SnykApiClient ¶
type SnykApiClient interface { SastSettings() (SastResponse, error) FeatureFlagStatus(featureFlagType FeatureFlagType) (FFResponse, error) }
func NewSnykApiClient ¶
func NewSnykApiClient(c *config.Config, client func() *http.Client) SnykApiClient
type SnykApiClientImpl ¶
type SnykApiClientImpl struct {
// contains filtered or unexported fields
}
func (*SnykApiClientImpl) FeatureFlagStatus ¶
func (s *SnykApiClientImpl) FeatureFlagStatus(featureFlagType FeatureFlagType) (FFResponse, error)
func (*SnykApiClientImpl) SastSettings ¶
func (s *SnykApiClientImpl) SastSettings() (SastResponse, error)
type SnykApiError ¶
type SnykApiError struct {
// contains filtered or unexported fields
}
func NewSnykApiError ¶
func NewSnykApiError(msg string, statusCode int) *SnykApiError
func (*SnykApiError) Error ¶
func (e *SnykApiError) Error() string
func (*SnykApiError) StatusCode ¶
func (e *SnykApiError) StatusCode() int
Click to show internal directories.
Click to hide internal directories.