-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for object storage services gen2 (#649)
- Loading branch information
1 parent
7b7ba1d
commit 9193012
Showing
30 changed files
with
1,954 additions
and
918 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package linodego | ||
|
||
import "context" | ||
|
||
// NotificationType constants start with Notification and include all known Linode API Notification Types. | ||
type ObjectStorageEndpointType string | ||
|
||
// NotificationType constants represent the actions that cause a Notification. New types may be added in the future. | ||
const ( | ||
ObjectStorageEndpointE0 ObjectStorageEndpointType = "E0" | ||
ObjectStorageEndpointE1 ObjectStorageEndpointType = "E1" | ||
ObjectStorageEndpointE2 ObjectStorageEndpointType = "E2" | ||
ObjectStorageEndpointE3 ObjectStorageEndpointType = "E3" | ||
) | ||
|
||
// ObjectStorageEndpoint represents a linode object storage endpoint object | ||
type ObjectStorageEndpoint struct { | ||
Region string `json:"region"` | ||
S3Endpoint *string `json:"s3_endpoint"` | ||
EndpointType ObjectStorageEndpointType `json:"endpoint_type"` | ||
} | ||
|
||
// ListObjectStorageEndpoints lists all endpoints in all regions | ||
func (c *Client) ListObjectStorageEndpoints(ctx context.Context, opts *ListOptions) ([]ObjectStorageEndpoint, error) { | ||
return getPaginatedResults[ObjectStorageEndpoint](ctx, c, "object-storage/endpoints", opts) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.