Skip to content

Bucket versioning#183

Draft
krisis wants to merge 2 commits into
minio:masterfrom
krisis:bucket-versioning
Draft

Bucket versioning#183
krisis wants to merge 2 commits into
minio:masterfrom
krisis:bucket-versioning

Conversation

@krisis

@krisis krisis commented Nov 3, 2022

Copy link
Copy Markdown
Member

No description provided.

Comment thread src/Network/Minio/Data.hs

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

Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread src/Network/Minio/Data.hs

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

Copy link
Copy Markdown
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

Comment thread src/Network/Minio/Data.hs

data BucketVersioningConfig = BVConfig
{ vcVersioning :: BucketVersioning,
vcMFADelete :: MFADelete

Copy link
Copy Markdown
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