Commit Graph

10 Commits

Author SHA1 Message Date
Dirkjan Ochtman d34c94ee9f Make Transaction trait more flexible
Instead of separate types implementing the `Transaction` trait,
here we implement `Transaction` for a command type.

The definition of the `Transaction` trait ensures that:

* Implementations for commands with a particular extension
  must be explicitly defined (that is, you can't just call
  `transact()` with a random combination of a command type
  and an extension type).
* The combination of the command type and the extension type
  (via the `Transaction` impl) defines the response type
  (both the command response and the extension response).

This definition means that:

* `Transaction` implementations for commands defined within
  the epp-client crate that want to use an extension defined
  within the crate must have an impl local to the crate.
* `Transaction` impls defined for commands foreign to the
  epp-client crate as well as impls defined with extensions
  foreign to the crate can have an impl in their defining crate.
2021-12-13 00:19:03 +08:00
Dirkjan Ochtman 50c21a7037 Rename EppRequest to Transaction 2021-12-13 00:19:03 +08:00
Dirkjan Ochtman ce30f1599f Use different type wrappers instead of single EppObject 2021-12-09 17:05:06 +08:00
Nicholas Rempel 0b42579484 Remove credentials from Client and Connection and remove login, logout, and generate_client_tr_id 2021-12-04 02:13:09 +08:00
Dirkjan Ochtman edb2a2627d Remove Hello and Greeting type aliases 2021-12-03 12:11:22 +08:00
Dirkjan Ochtman 37feb5c2c4 Remove EppObject wrapper where unnecessary
This was being used in a few places where it was unnecessary.
Interestingly, it seemed that the deserialization logic in
`Request::deserialize_response()` was nesting `EppObject`s without
actually causing an error.
2021-12-03 12:11:22 +08:00
Dirkjan Ochtman 627b7d3e23 Rename ResponseWithExtension to just Response
Since there is no longer a different type that has no extension.
2021-12-03 12:11:22 +08:00
Dirkjan Ochtman 340cc9c90a Remove Command prefix from Response types 2021-12-03 12:11:22 +08:00
Dirkjan Ochtman 609c327a95 Rename EppClientConnection to RegistryConfig
This type represents configuration to build a connection for a
particular registry, so this seems like a better name.
2021-12-02 19:18:22 +08:00
Dirkjan Ochtman ac50679071 Hoist client and registry modules up to top level 2021-12-02 19:18:22 +08:00