1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//!
//! # SC Api Keys
//!
//! Stores Api Keys supported by the SC.
//!

use kf_protocol::derive::Encode;
use kf_protocol::derive::Decode;

#[derive(Encode, Decode, PartialEq, Debug, Clone, Copy)]
#[repr(u16)]
pub enum ScApiKey {
    // Mixed
    ApiVersion = 18,

    // Kafka
    KfMetadata = 3,

    // Topics
    FlvCreateTopics = 2001,
    FlvDeleteTopics = 2002,
    FlvFetchTopics = 2003,
    FlvTopicComposition = 2004,

    // Custom SPUs
    FlvRegisterCustomSpus = 2005,
    FlvUnregisterCustomSpus = 2006,
    FlvFetchSpus = 2007,

    // SPU Groups
    FlvCreateSpuGroups = 2008,
    FlvDeleteSpuGroups = 2009,
    FlvFetchSpuGroups = 2010,
}

impl Default for ScApiKey {
    fn default() -> ScApiKey {
        ScApiKey::ApiVersion
    }
}