Documentation ¶
Index ¶
- func Bool(v bool) *bool
- func CheckResponse(r *http.Response) error
- func Int(v int) *int
- func String(v string) *string
- func Time(v time.Time) *time.Time
- type BoolValue
- type Client
- type CreateGCPConnectorOptions
- type ErrorResponse
- type GCPConnector
- type GCPConnectorService
- func (s *GCPConnectorService) Create(opt *CreateGCPConnectorOptions) (*GCPConnector, *Response, error)
- func (s *GCPConnectorService) Delete(id string) (*Response, error)
- func (s *GCPConnectorService) Get(id string) (*GCPConnector, *Response, error)
- func (s *GCPConnectorService) List() ([]*GCPConnector, *Response, error)
- func (s *GCPConnectorService) Modify(id string, opt *ModifyGCPConnectorOptions) (*GCPConnector, *Response, error)
- type ISOTime
- type ListOptions
- type ModifyGCPConnectorOptions
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.
func CheckResponse ¶
CheckResponse checks the API response for errors, and returns them if present.
func Int ¶
Int is a helper routine that allocates a new int32 value to store v and returns a pointer to it, but unlike Int32 its argument value is an int.
Types ¶
type BoolValue ¶
type BoolValue bool
BoolValue is a boolean value with advanced json unmarshaling features.
func (*BoolValue) UnmarshalJSON ¶
UnmarshalJSON allows 1 and 0 to be considered as boolean values
type Client ¶
type Client struct { // User agent used when communicating with the API. UserAgent string // Services used for talking to different parts of the API. GCPConnector *GCPConnectorService // contains filtered or unexported fields }
A Client manages communication with the Qualys API.
func (*Client) Do ¶
Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response body will be written to v, without attempting to first decode it.
func (*Client) NewRequest ¶
NewRequest creates an API request. A relative URL path can be provided in urlStr, in which case it is resolved relative to the base URL of the Client. Relative URL paths should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.
func (*Client) SetBaseURL ¶
SetBaseURL sets the base URL for API requests to a custom endpoint. urlStr should always be specified with a trailing slash.
type CreateGCPConnectorOptions ¶
type CreateGCPConnectorOptions struct { Name *string `url:"name" json:"name"` Description *string `url:"description,omitempty" json:"description,omitempty"` ConfigFile *string `url:"configFile" json:"configFile"` }
CreateGCPConnectorOptions are options for creating a gcp connector.
type ErrorResponse ¶
An ErrorResponse reports one or more errors caused by an API request.
func (*ErrorResponse) Error ¶
func (e *ErrorResponse) Error() string
type GCPConnector ¶
type GCPConnector struct { ConnectorID string `json:"connectorId"` Project string `json:"projectId"` Description string `json:"description"` Name string `json:"name"` Provider string `json:"provider"` LastSyncedOn string `json:"lastSyncedOn"` State string `json:"state"` TotalAssets int `json:"totalAssets"` Groups []struct { Name string `json:"name"` UUID string `json:"uuid"` } `json:"groups"` }
GCPConnector represents a qualys cloudview gcp connector
type GCPConnectorService ¶
type GCPConnectorService struct {
// contains filtered or unexported fields
}
GCPConnectorService supports /cloudview-api/rest/v1/gcp/connectors
func (*GCPConnectorService) Create ¶
func (s *GCPConnectorService) Create(opt *CreateGCPConnectorOptions) (*GCPConnector, *Response, error)
Create creates a gcp connector.
func (*GCPConnectorService) Delete ¶
func (s *GCPConnectorService) Delete(id string) (*Response, error)
Delete deletes a gcp connector.
func (*GCPConnectorService) Get ¶
func (s *GCPConnectorService) Get(id string) (*GCPConnector, *Response, error)
Get gets a connector.
func (*GCPConnectorService) List ¶
func (s *GCPConnectorService) List() ([]*GCPConnector, *Response, error)
List list all gcp connectors.
func (*GCPConnectorService) Modify ¶
func (s *GCPConnectorService) Modify(id string, opt *ModifyGCPConnectorOptions) (*GCPConnector, *Response, error)
Modify updates a gcp connector.
type ISOTime ¶
ISOTime represents an ISO 8601 formatted date
func (ISOTime) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface
type ListOptions ¶
type ListOptions struct { // For paginated result sets, page of results to retrieve. Page int `url:"page,omitempty" json:"page,omitempty"` // For paginated result sets, the number of results to include per page. PerPage int `url:"per_page,omitempty" json:"per_page,omitempty"` }
ListOptions specifies the optional parameters to various List methods that support pagination.
type ModifyGCPConnectorOptions ¶
type ModifyGCPConnectorOptions struct { Name *string `url:"name,omitempty" json:"name,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"` ConfigFile *string `url:"configFile,omitempty" json:"configFile,omitempty"` }
ModifyGCPConnectorOptions are options for updating a gcp connector.
type Response ¶
type Response struct { *http.Response // These fields provide the page values for paginating through a set of // results. Any or all of these may be set to the zero value for // responses that are not part of a paginated set, or for which there // are no additional pages. TotalItems int TotalPages int ItemsPerPage int CurrentPage int NextPage int PreviousPage int }
Response is a GitLab API response. This wraps the standard http.Response returned from GitLab and provides convenient access to things like pagination links.