Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // GetDoFunc - mock client's `Do` func GetDoFunc func(req *http.Request) (*http.Response, error) // CheckConnection - mock client's `CheckConnection` func CheckConnection func() error // GetDescriptions - mock client's `RequestDescriptions` func GetDescriptions func(descriptionIDs []string) (map[string]model.CISDescriptions, error) // CheckVersion mock client's `CheckLatestVersion` func CheckVersion func(version string) (genModel.Version, error) )
Functions ¶
This section is empty.
Types ¶
type MockDecriptionsClient ¶
type MockDecriptionsClient struct {
RequestDescriptionsFunc func(descriptionIDs []string) (map[string]model.CISDescriptions, error)
}
MockDecriptionsClient - the mock CIS descriptions client
func (*MockDecriptionsClient) CheckConnection ¶
func (m *MockDecriptionsClient) CheckConnection() error
CheckConnection - mock CIS descriptions client check connection function
func (*MockDecriptionsClient) CheckLatestVersion ¶ added in v1.4.6
func (m *MockDecriptionsClient) CheckLatestVersion(version string) (genModel.Version, error)
CheckLatestVersion - mock client request version function
func (*MockDecriptionsClient) RequestDescriptions ¶
func (m *MockDecriptionsClient) RequestDescriptions(descriptionIDs []string) (map[string]model.CISDescriptions, error)
RequestDescriptions - mock descriptions client request descriptions function
type MockHTTPClient ¶
MockHTTPClient - the mock http client
type MockRequestBody ¶
type MockRequestBody struct {
Descriptions []string `json:"descriptions"`
}
MockRequestBody - mock request body
type MockResponseBody ¶
MockResponseBody - mock response body
Click to show internal directories.
Click to hide internal directories.