Skip to content
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

Bucket versioning #183

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Bucket versioning #183

wants to merge 2 commits into from

Conversation

krisis
Copy link
Member

@krisis krisis commented Nov 3, 2022

No description provided.


newtype MFAToken = MFAToken {unMfaToken :: Text}
deriving stock (Eq, Show)
deriving (IsString) via Text
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mfatoken is just a text, so we can use newtype deriving here:

  deriving stock (Show)
  deriving newtype (Eq, IsString)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually looks like MFAToken is just a sort of Boolean - https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html

we can just do:

data MFADelete = MFADeleteEnabled | MFADeleteDisabled


newtype MFAToken = MFAToken {unMfaToken :: Text}
deriving stock (Eq, Show)
deriving (IsString) via Text
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually looks like MFAToken is just a sort of Boolean - https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html

we can just do:

data MFADelete = MFADeleteEnabled | MFADeleteDisabled


data BucketVersioningConfig = BVConfig
{ vcVersioning :: BucketVersioning,
vcMFADelete :: MFADelete
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
vcMFADelete :: MFADelete
vcMFADelete :: Maybe MFADelete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants