-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add initial equalized deploy command
- Loading branch information
1 parent
ac64ff4
commit 3829a99
Showing
7 changed files
with
177 additions
and
361 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package storage | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/aziontech/azion-cli/pkg/logger" | ||
"github.com/aziontech/azion-cli/utils" | ||
sdk "github.com/aziontech/azionapi-go-sdk/storage" | ||
"go.uber.org/zap" | ||
) | ||
|
||
type RequestCredentials struct { | ||
sdk.S3CredentialCreate | ||
} | ||
|
||
func (c *Client) CreateCredentials(ctx context.Context, request RequestCredentials) (*sdk.ResponseS3Credential, error) { | ||
logger.Debug("Creating s3 credentials ", zap.Any("name", request.Name)) | ||
req := c.apiClient.StorageAPI.StorageApiS3CredentialsCreate(ctx).S3CredentialCreate(request.S3CredentialCreate) | ||
// req := c.apiClient.StorageAPI.StorageApiBucketsCreate(ctx).BucketCreate(request.BucketCreate) | ||
resp, httpResp, err := req.Execute() | ||
if err != nil { | ||
logger.Debug("Error while creating the user's s3 credentials", zap.Error(err)) | ||
return nil, utils.ErrorPerStatusCode(httpResp, err) | ||
} | ||
return resp, nil | ||
} |
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.