com.github.bjoernpetersen.jmusicbot.config.ConfigStorageAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of musicbot Show documentation
Show all versions of musicbot Show documentation
Core library of MusicBot, which plays music from various providers.
package com.github.bjoernpetersen.jmusicbot.config;
import java.util.Map;
import javax.annotation.Nonnull;
/**
* An adapter for loading and storing config entries and secrets.
*/
public interface ConfigStorageAdapter {
@Nonnull
Map loadPlaintext();
/**
* Persistently stores config entries. These can be stored in plaintext.
*
* This method is likely to be called often, so it should be fast and should not need user
* interaction.
*
* @param plain a map of config entries
*/
void storePlaintext(@Nonnull Map plain);
@Nonnull
Map loadSecrets();
/**
* Stores the secrets in a secure manner.
*
* This method is likely to be called often, so it should be fast and should not need user
* interaction.
*
* @param secrets a map of config entries with secret values
*/
void storeSecrets(@Nonnull Map secrets);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy