Skip to content

Split Cloud API client operations and conversions by domain #375

Description

@sdairs

Parent: #317

Stack position: 2 of 7. Starts after the analyzer module-tree change.

Goal

Split the non-model portions of clickhouse-cloud-api by product domain while preserving every public method, conversion, and crate-root export.

Scope

  • Keep client.rs as a facade containing Client, authentication, constructors, shared HTTP helpers, and Query API helpers.
  • Move OpenAPI operation methods into private domain modules for organizations, API keys, services, backups, Postgres, ClickPipes, ClickStack, activity, and UDFs.
  • Keep convert.rs as a facade containing MissingRequiredFields and re-exports.
  • Move ClickStack, Postgres, service, and shared write-back conversions into private domain modules.
  • Preserve existing public paths through facade re-exports; do not expose the domain modules themselves.

Acceptance

  • All existing Client method names, signatures, and behavior are unchanged.
  • MissingRequiredFields and all From/TryFrom implementations remain available at their existing paths.
  • The analyzer inventories the same OpenAPI operation set after the move.
  • Existing client, query, conversion, and model tests pass unchanged in behavior.
  • cargo check --workspace --all-features, focused tests, clippy, and rustfmt pass.

Out of scope

  • Moving declarations out of models.rs.
  • Renaming methods or models, changing request/response shapes, or adding API operations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrustPull requests that update rust code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions