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

Use CLOS for configuration #2

Open
PuercoPop opened this issue Oct 7, 2020 · 0 comments
Open

Use CLOS for configuration #2

PuercoPop opened this issue Oct 7, 2020 · 0 comments

Comments

@PuercoPop
Copy link

Just a suggestion to make easier to adapt cl-sendgrid to different deployment strategies. How sensitive information like API-keys is stored and provided to the application can vary. Environment variables and encrypted files being the most common. So having the config values be retrieved using a generic function makes it easier for the potential users of this library to configure the way they provide the api-key in a way it best suits their needs.

(defgeneric api-key (config)
  (:documentation "The Sendgrid private API key."))
(defgeneric default-sender (config)
  (:documentation "The default 'from' address."))

(defclass config ()
  ((api-key :initarg :api-key :initform (error "") :reader api-key)
   (default-sender :initarg :default-sender :reader default-sender)))
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

No branches or pull requests

1 participant