Bump to sdk aws go v2 at release v0.26.0...

Bump dependancies
Refactor / Fix aws to work with sdk-aws-go-v2 at release v0.26.0...
This commit is contained in:
Nicolas JUHEL
2020-09-30 13:04:47 +02:00
parent 47dc7f34ae
commit 94f90d7e22
38 changed files with 706 additions and 749 deletions

View File

@@ -4,6 +4,7 @@ import (
"context"
"github.com/aws/aws-sdk-go-v2/service/iam"
"github.com/aws/aws-sdk-go-v2/service/iam/types"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/nabbar/golib/aws/helper"
"github.com/nabbar/golib/errors"
@@ -16,7 +17,7 @@ type client struct {
}
type Role interface {
List() ([]iam.Role, errors.Error)
List() ([]*types.Role, errors.Error)
Check(name string) (string, errors.Error)
Add(name, role string) (string, errors.Error)
Delete(roleName string) errors.Error
@@ -24,7 +25,7 @@ type Role interface {
PolicyAttach(policyARN, roleName string) errors.Error
PolicyDetach(policyARN, roleName string) errors.Error
PolicyListAttached(roleName string) ([]iam.AttachedPolicy, errors.Error)
PolicyListAttached(roleName string) ([]*types.AttachedPolicy, errors.Error)
}
func New(ctx context.Context, bucket string, iam *iam.Client, s3 *s3.Client) Role {