pub struct CreateApiKeyInput {
pub name: Option<String>,
pub expires_in: Option<i64>,
pub prefix: Option<String>,
pub metadata: Option<Value>,
pub remaining: Option<i64>,
pub refill_amount: Option<i64>,
pub refill_interval: Option<i64>,
pub rate_limit_time_window: Option<i64>,
pub rate_limit_max: Option<i64>,
pub rate_limit_enabled: Option<bool>,
pub permissions: Option<Permissions>,
pub user_id: Option<Id>,
}Expand description
The body of /api-key/create. Fields marked server-only answer SERVER_ONLY_PROPERTY
when they come from a client.
Fields§
§name: Option<String>§expires_in: Option<i64>Seconds until the key expires. Default: the plugin’s default_expires_in.
prefix: Option<String>Overrides the plugin’s default prefix: letters, digits, _ and -.
metadata: Option<Value>Requires enable_metadata; must be a JSON object.
remaining: Option<i64>Server-only. Verifications allowed before the key is used up.
refill_amount: Option<i64>Server-only, with refill_interval.
refill_interval: Option<i64>Server-only, milliseconds, with refill_amount.
rate_limit_time_window: Option<i64>Server-only, milliseconds.
rate_limit_max: Option<i64>Server-only.
rate_limit_enabled: Option<bool>Server-only.
permissions: Option<Permissions>Server-only.
user_id: Option<Id>Server-only: the owner when there is no session.
Trait Implementations§
Source§impl Clone for CreateApiKeyInput
impl Clone for CreateApiKeyInput
Source§impl Debug for CreateApiKeyInput
impl Debug for CreateApiKeyInput
Source§impl Default for CreateApiKeyInput
impl Default for CreateApiKeyInput
Source§impl<'de> Deserialize<'de> for CreateApiKeyInput
impl<'de> Deserialize<'de> for CreateApiKeyInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for CreateApiKeyInput
impl Freeze for CreateApiKeyInput
impl Move for CreateApiKeyInput
impl RefUnwindSafe for CreateApiKeyInput
impl Send for CreateApiKeyInput
impl Sync for CreateApiKeyInput
impl Unpin for CreateApiKeyInput
impl UnsafeUnpin for CreateApiKeyInput
impl UnwindSafe for CreateApiKeyInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more