Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEncodingResourcesQuery = errors.New("failed to encode resources query")
View Source
var ErrFetchingResources = errors.New("failed to fetch resources")
View Source
var ErrInitializingResourcesRequest = errors.New("failed to initialize resources request")
View Source
var ErrInvalidURL = errors.New("invalid URL")
View Source
var ErrMissingToken = errors.New("no API token provided")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(config ClientConfig) (*Client, error)
func NewClientFromEnv ¶
func (*Client) Resources ¶
func (c *Client) Resources(ctx context.Context, orgID string, params ResourcesParameters) (resources []ResourceObject, e error)
type ClientConfig ¶
type CollectionDocumentRes ¶
type CollectionDocumentRes struct {
Data []ResourceObject `json:"data"`
Links Links
}
type ResourceAttributes ¶
type ResourceObject ¶
type ResourceObject struct {
ID string `json:"id,omitempty"`
Type string `json:"type"`
Attributes ResourceAttributes `json:"attributes,omitempty"`
}
type ResourcesParameters ¶
type ResourcesParameters struct {
EnvironmentID []string `url:"environment_id,omitempty"`
ResourceType []string `url:"resource_type,omitempty"`
ResourceID []string `url:"resource_id,omitempty"`
NativeID []string `url:"native_id,omitempty"`
ID []string `url:"id,omitempty"`
Platform []string `url:"platform,omitempty"`
Name []string `url:"name,omitempty"`
Location []string `url:"location,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.