Documentation ¶
Index ¶
Constants ¶
View Source
const (
SastEnabledOperation = "sastEnabled"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeApiClient ¶
type FakeApiClient struct { Calls map[string][][]any CodeEnabled bool LocalCodeEngine LocalCodeEngine AutofixEnabled bool ApiError *KhulnasoftApiError }
func (*FakeApiClient) Clear ¶
func (f *FakeApiClient) Clear()
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)
type KhulnasoftApiClient ¶
type KhulnasoftApiClient interface {
SastSettings() (SastResponse, error)
}
func NewKhulnasoftApiClient ¶
func NewKhulnasoftApiClient(client func() *http.Client) KhulnasoftApiClient
type KhulnasoftApiClientImpl ¶
type KhulnasoftApiClientImpl struct {
// contains filtered or unexported fields
}
func (*KhulnasoftApiClientImpl) SastSettings ¶
func (s *KhulnasoftApiClientImpl) SastSettings() (SastResponse, error)
type KhulnasoftApiError ¶
type KhulnasoftApiError struct {
// contains filtered or unexported fields
}
func NewKhulnasoftApiError ¶
func NewKhulnasoftApiError(msg string, statusCode int) *KhulnasoftApiError
func (*KhulnasoftApiError) Error ¶
func (e *KhulnasoftApiError) Error() string
func (*KhulnasoftApiError) StatusCode ¶
func (e *KhulnasoftApiError) StatusCode() int
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"` }
Click to show internal directories.
Click to hide internal directories.