fluvio_sc_schema/
apis.rs

1//!
2//! # SC Api Keys
3//!
4//! Stores Api Keys supported by the SC.
5//!
6
7use fluvio_protocol::{Encoder, Decoder};
8
9// Make sure that the ApiVersion variant matches dataplane's API_VERSIONS_KEY
10static_assertions::const_assert_eq!(
11    fluvio_protocol::link::versions::VERSIONS_API_KEY,
12    AdminPublicApiKey::ApiVersion as u16,
13);
14
15/// API call from client to SPU
16#[repr(u16)]
17#[derive(Encoder, Decoder, Eq, PartialEq, Debug, Clone, Copy)]
18#[fluvio(encode_discriminant)]
19pub enum AdminPublicApiKey {
20    ApiVersion = 18, // VERSIONS_API_KEY
21    Create = 1001,
22    Delete = 1002,
23    List = 1003,
24    Watch = 1004,
25    Mirroring = 1005,
26    Update = 1006,
27}
28
29impl Default for AdminPublicApiKey {
30    fn default() -> Self {
31        Self::ApiVersion
32    }
33}