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

feat: allow to pass a custom fs #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

feat: allow to pass a custom fs #27

wants to merge 1 commit into from

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Feb 3, 2025

Unfortunately we need more than the simple fs.FS interface, so I created an interface with everything we need.

This resulting interface is quite big, though, not sure if worth it.

Callers would have to implement this beefy interface to have it create keys in memory (doing nothing in some methods like chmod, mkdir, etc).

Maybe another approach could be to make another function public, having only the key type switch and returning private pem block and public key bytes?

refs #17

@caarlos0 caarlos0 self-assigned this Feb 3, 2025
@aymanbagabas
Copy link
Member

@caarlos0 The New method generates an in-memory keypair when path is empty

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