| 30 | |
| 31 | #[async_trait] |
| 32 | pub trait HttpHandler { |
| 33 | async fn server_sdk_toggles( |
| 34 | &self, |
| 35 | TypedHeader(SdkAuthorization(sdk_key)): TypedHeader<SdkAuthorization>, |
| 36 | ) -> Result<Response, FPServerError>; |
| 37 | |
| 38 | async fn client_sdk_toggles( |
| 39 | &self, |
| 40 | Query(params): Query<ClientParams>, |
| 41 | TypedHeader(SdkAuthorization(sdk_key)): TypedHeader<SdkAuthorization>, |
| 42 | ) -> Result<Response, FPServerError>; |
| 43 | |
| 44 | async fn client_sdk_events( |
| 45 | &self, |
| 46 | TypedHeader(SdkAuthorization(sdk_key)): TypedHeader<SdkAuthorization>, |
| 47 | ) -> Result<Response, FPServerError>; |
| 48 | |
| 49 | async fn update_toggles( |
| 50 | &self, |
| 51 | Json(params): Json<ToggleUpdateParams>, |
| 52 | ) -> Result<Response, FPServerError>; |
| 53 | |
| 54 | #[cfg(feature = "unstable")] |
| 55 | async fn update_segments( |
| 56 | &self, |
| 57 | Json(params): Json<SegmentUpdateParams>, |
| 58 | ) -> Result<Response, FPServerError>; |
| 59 | |
| 60 | #[cfg(feature = "unstable")] |
| 61 | async fn check_secrets( |
| 62 | &self, |
| 63 | Json(_params): Json<SecretsParams>, |
| 64 | ) -> Result<Json<HashMap<String, String>>, FPServerError>; |
| 65 | |
| 66 | async fn all_secrets(&self) -> Result<Json<HashMap<String, String>>, FPServerError>; |
| 67 | } |
| 68 | |
| 69 | #[derive(Clone)] |
| 70 | pub struct FpHttpHandler { |
nothing calls this directly
no outgoing calls
no test coverage detected