Package-level declarations

Types

Link copied to clipboard
interface Data

This interface exists as a cudgel to beat Kotlin's type system into submission.

Link copied to clipboard
abstract class DataAdapter<ID : Any>

Abstract class representing a data adapter. In charge of caching, storing and loading data for extensions, plugins, and other parts of your bot.

Link copied to clipboard

Sealed class representing the two types of storage - configuration and data.

Link copied to clipboard
class StorageTypeSerializer : KSerializer<StorageType>

Simple serializer for the StorageType sealed class.

Link copied to clipboard
open class StorageUnit<T : Data>(val storageType: StorageType, val namespace: String, val identifier: String, val dataType: KClass<T>) : KordExKoinComponent

Class representing a storage unit. Storage units represent specific, single units of data, and explain how to store, retrieve and serialize that data.

Properties

Link copied to clipboard

For data adapters storing files, this is where those files should be placed. Default to the current working directory, but you can change this by providing the STORAGE_FILE_ROOT environment variable.

Functions

Link copied to clipboard
inline fun <T : Data> StorageUnit(storageType: StorageType, namespace: String, identifier: String): StorageUnit<T>

Convenience function allowing you to create a StorageUnit without passing a class manually.