Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Auth(ctx context.Context, opts ...option.ClientOption) error GetResources(projectID string, config *reaperconfig.ResourceConfig) ([]*resources.Resource, error) DeleteResource(projectID string, resource *resources.Resource) error }
A Client represents the interface between the Reaper and GCP. Each resource supported by the reaper will have its own client that implements the following interface:
- Auth authenticates the client. Passing options changes how authentication occurs. See https://pkg.go.dev/google.golang.org/api/option?tab=doc for more details.
- GetResources returns a list of Resources that are match the ResourceConfig.
- DeleteResource deletes the specified resource.
func NewClient ¶
func NewClient(resourceType reaperconfig.ResourceType) (Client, error)
NewClient is the factory method that returns the correct implementation of the GCP client based on the resource type.
Click to show internal directories.
Click to hide internal directories.