-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inomurko/iam #70
Inomurko/iam #70
Conversation
iam and static auth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - the changes are pretty lightweight. Left some comments but all knits 🙏🏻
server/config.go
Outdated
func toS3CredentialType(s string) store.S3CredentialType { | ||
if s == string(store.S3CredentialStatic) { | ||
return store.S3CredentialStatic | ||
} else if s == string(store.S3CredentialIAM) { | ||
return store.S3CredentialIAM | ||
} | ||
return store.S3CredentialUnknown | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
knit - switch
might be more idiomatic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also it might make more sense for this function to live in store/s3.go
} | ||
|
||
type S3Store struct { | ||
cfg S3Config | ||
client *minio.Client | ||
stats *Stats | ||
stats *Stats | ||
} | ||
|
||
func NewS3(cfg S3Config) (*S3Store, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
knit - this function could be refactored to support less duplication if we were to add a receiver to S3 config for generating the client credentials func (cfg *Config) Credentials() minio.credentials
and only have a single instillation of the client in the s3 constructor
Pull Request Template
Fixes Issue
#69
Fixes #
Changes proposed
Screenshots (Optional)
Note to reviewers