grafana / certmagic-gcs

GCS storage for Certmagic
GNU Affero General Public License v3.0
10 stars 5 forks source link

refactor: Separate storage into its own package #151

Closed shrink closed 1 year ago

shrink commented 1 year ago

Closes #150

I do not believe this is a breaking change because the Caddy module will continue to execute via the init entrypoint which now relies on the storage package.

I tested this branch in my non-Caddy CertMagic project using replace and it worked as a drop-in replacement:

replace github.com/grafana/certmagic-gcs => github.com/shrink/certmagic-gcs v0.0.0-20230730155505-0a3798824df6

After merge, the package can be added to the CertMagic wik: https://github.com/caddyserver/certmagic/wiki/Storage-Implementations

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

shrink commented 1 year ago

@hairyhenderson re: the lint failure, I guess we have 3 options:

  1. Rename the storage package to something else
  2. Rename StorageConfig to Config
  3. Add a linting exclusion for stuttering on StorageConfig

I guess, on reflection, since Storage is now its own package, StorageConfig is redundant. As StorageConfig isn't exposed for Caddy consumers, renaming StorageConfig to Config would be backwards compatible -- I think!

That said, I don't have a particular preference -- happy to go with whatever approach is standard for this org.

hairyhenderson commented 1 year ago
  • Rename StorageConfig to Config

IMO that's the best approach - go ahead with that!

shrink commented 1 year ago

IMO that's the best approach - go ahead with that!

done! The golangci tool passed locally so it should be good to re-run the Workflows now 🤞