LCOV - code coverage report
Current view: top level - libs/compute_api/src - requests.rs (source / functions) Coverage Total Hit
Test: 6df3fc19ec669bcfbbf9aba41d1338898d24eaa0.info Lines: 0.0 % 3 0
Test Date: 2025-03-12 18:28:53 Functions: 0.0 % 24 0

            Line data    Source code
       1              : //! Structs representing the JSON formats used in the compute_ctl's HTTP API.
       2              : use serde::{Deserialize, Serialize};
       3              : 
       4              : use crate::privilege::Privilege;
       5              : use crate::responses::ComputeCtlConfig;
       6              : use crate::spec::{ComputeSpec, ExtVersion, PgIdent};
       7              : 
       8              : /// Request of the /configure API
       9              : ///
      10              : /// We now pass only `spec` in the configuration request, but later we can
      11              : /// extend it and something like `restart: bool` or something else. So put
      12              : /// `spec` into a struct initially to be more flexible in the future.
      13            0 : #[derive(Debug, Deserialize, Serialize)]
      14              : pub struct ConfigurationRequest {
      15              :     pub spec: ComputeSpec,
      16              :     pub compute_ctl_config: ComputeCtlConfig,
      17              : }
      18              : 
      19            0 : #[derive(Deserialize, Debug)]
      20              : pub struct ExtensionInstallRequest {
      21              :     pub extension: PgIdent,
      22              :     pub database: PgIdent,
      23              :     pub version: ExtVersion,
      24              : }
      25              : 
      26            0 : #[derive(Deserialize, Debug)]
      27              : pub struct SetRoleGrantsRequest {
      28              :     pub database: PgIdent,
      29              :     pub schema: PgIdent,
      30              :     pub privileges: Vec<Privilege>,
      31              :     pub role: PgIdent,
      32              : }
        

Generated by: LCOV version 2.1-beta