{"modulePath":"github.com/w3security/policy-engine","version":"v0.24.3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cloudapi\n\n## Variables\n\n```go\nvar ErrEncodingResourcesQuery = errors.New(\"failed to encode resources query\")\n```\n\n```go\nvar ErrFetchingResources = errors.New(\"failed to fetch resources\")\n```\n\n```go\nvar ErrInitializingResourcesRequest = errors.New(\"failed to initialize resources request\")\n```\n\n```go\nvar ErrInvalidURL = errors.New(\"invalid URL\")\n```\n\n```go\nvar ErrMissingToken = errors.New(\"no API token provided\")\n```\n\n## Types\n\n```go\ntype Client struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewClient(config ClientConfig) (*Client, error)\n```\n\n```go\nfunc NewClientFromEnv() (*Client, error)\n```\n\n```go\nfunc (c *Client) Do(req *http.Request) (*http.Response, error)\n```\n\n```go\nfunc (c *Client) Resources(ctx context.Context, orgID string, params ResourcesParameters) (resources []ResourceObject, e error)\n```\n\n```go\ntype ClientConfig struct {\n\tHTTPClient *http.Client\n\tURL        string\n\tToken      string\n\tVersion    string\n}\n```\n\n```go\ntype CollectionDocumentRes struct {\n\tData  []ResourceObject `json:\"data\"`\n\tLinks Links\n}\n```\n\n```go\ntype Links struct {\n\tNext string `json:\"next\"`\n}\n```\n\n```go\ntype ResourceAttributes struct {\n\tNamespace    string                 `json:\"namespace\"`\n\tResourceType string                 `json:\"resource_type\"`\n\tResourceID   string                 `json:\"resource_id\"`\n\tState        map[string]interface{} `json:\"state\"`\n\tTags         map[string]interface{} `json:\"tags\"`\n}\n```\n\n```go\ntype ResourceObject struct {\n\tID         string             `json:\"id,omitempty\"`\n\tType       string             `json:\"type\"`\n\tAttributes ResourceAttributes `json:\"attributes,omitempty\"`\n}\n```\n\n```go\ntype ResourcesParameters struct {\n\tEnvironmentID []string `url:\"environment_id,omitempty\"`\n\tResourceType  []string `url:\"resource_type,omitempty\"`\n\tResourceID    []string `url:\"resource_id,omitempty\"`\n\tNativeID      []string `url:\"native_id,omitempty\"`\n\tID            []string `url:\"id,omitempty\"`\n\tPlatform      []string `url:\"platform,omitempty\"`\n\tName          []string `url:\"name,omitempty\"`\n\tLocation      []string `url:\"location,omitempty\"`\n}\n```\n\n","path":"github.com/w3security/policy-engine/pkg/input/cloudapi","name":"cloudapi","synopsis":"","isRedistributable":true}
