Commit Graph

302 Commits

Author SHA1 Message Date
Ritesh Chitlangi 9b6522b8b2 fix doctest in consolidate.rs 2021-12-04 02:38:09 +08:00
Nicholas Rempel a620fc6598 Add tests for consolidate extension 2021-12-04 02:16:38 +08:00
Nicholas Rempel 9e0627dcc5 Add consolidate extension model 2021-12-04 02:16:38 +08:00
Nicholas Rempel cf446f58c7 Update Login::new to take ownership of Option ext_uris 2021-12-04 02:13:09 +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
Nicholas Rempel c9135754e5 Fix poll model 2021-12-03 12:26:18 +08:00
Dirkjan Ochtman edb2a2627d Remove Hello and Greeting type aliases 2021-12-03 12:11:22 +08:00
Dirkjan Ochtman 140f6830a9 Rename CommandWithExtension to Command 2021-12-03 12:11:22 +08:00
Dirkjan Ochtman 8f43800a3d Remove unused Command type 2021-12-03 12:11:22 +08:00
Dirkjan Ochtman 34828032ac Remove unnecessary type alias 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 91070576cd Remove EppCommandResponseError alias
This is a direct alias for EppCommandResponse. It is documented
as marking an error state, but type aliases aren't a great tool
for that because the type system doesn't distinguish aliased types;
if we want to do that seriously it should be a newtype wrapper.
2021-12-03 12:11:22 +08:00
Dirkjan Ochtman f6ec331227 Remove unused CommandResponse alias 2021-12-03 12:11:22 +08:00
Nicholas Rempel 0a0e6ac9d5 Add tests for namestore extension object 2021-12-03 11:52:54 +08:00
Nicholas Rempel 2e0165a839 Add namestore extension model 2021-12-03 11:52:54 +08:00
Nicholas Rempel 02cb2c1c26 Move rgp test xml into extensions directory 2021-12-03 11:52:54 +08:00
Nicholas Rempel f3e8447c0d Move rgp into extensions directory 2021-12-03 11:52:54 +08:00
Dirkjan Ochtman 716412bbcf Simplify XMLNS constant names to reduce stuttering
Since these are mostly used within the relevant modules, there is not
much point in having a name that replicates the module path.
2021-12-02 21:09:25 +08:00
Dirkjan Ochtman ef25041cce Use inline modules for intermediate layer
(Skip `connection` since it is dissolved in #29.)
2021-12-02 21:09:25 +08:00
Dirkjan Ochtman 9f41f4263e Use country type from celes 2021-12-02 21:01:44 +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
Dirkjan Ochtman b9efd46170 Inline trivial single-use function
Also avoids allocating an extra copy of the host String.
2021-12-02 19:18:22 +08:00
Dirkjan Ochtman d1cf43af46 Move client certificate setup into epp_connect() 2021-12-02 19:18:22 +08:00
Dirkjan Ochtman 7ff8547840 Inline extraction of certificate chain & private key
Since both are keying off of the `tls_files` fields, it seems
to make sense to handle both together.
2021-12-02 19:18:22 +08:00
Dirkjan Ochtman 8839eb4a11 Keep struct definitions and impl blocks together 2021-12-02 19:18:22 +08:00
Dirkjan Ochtman cbd9fd84aa Improve error handling in client certificate handling
Yield errors instead of panicking. Avoid unnecessary allocations/cloning.
2021-12-02 19:18:22 +08:00
Dirkjan Ochtman af7911cbc3 Inline single-use function
Reuse Vec buffer allocation for String return value.
2021-12-02 19:18:22 +08:00
Dirkjan Ochtman d8bcf690a4 Return error instead of panicking on unexpected EOF 2021-12-02 19:18:22 +08:00
Dirkjan Ochtman 48ec1e03ce Initialize buffer upfront to avoid unnecessary copies 2021-12-02 19:18:22 +08:00
Dirkjan Ochtman 59151df029 Use Vec instead of BytesMut
There doesn't seem to be any particular advantage to using BytesMut here.
2021-12-02 19:18:22 +08:00
Dirkjan Ochtman f30015ad06 Inline trivial single-use function 2021-12-02 19:18:22 +08:00
Dirkjan Ochtman 0ca42405b9 Stop splitting stream in halves
I'm not sure why this was done, but it doesn't seem to provide any
value in the current setup.
2021-12-02 19:18:22 +08:00
Ritesh Chitlangi df4f8c8c0a make cache specific to commit link 2021-12-02 18:34:13 +08:00
Nicholas Rempel c32c19ce98 Rename EppHello and EppGreeting 2021-12-02 15:48:37 +08:00
Nicholas Rempel 3978c426da Rename transact_new to transact 2021-12-02 15:48:37 +08:00
Nicholas Rempel 9e1d11f9f3 Migrate rgp extension to new API 2021-12-02 15:48:37 +08:00
Nicholas Rempel 31fc61f4b0 Migrate commands to new API 2021-12-02 15:48:37 +08:00
Nicholas Rempel aa54c14972 Rename EmptyTag to NoExtension 2021-12-02 15:48:37 +08:00
Nicholas Rempel 80c0040cd9 Add EppRequest trait with related transact_new method 2021-12-02 15:48:37 +08:00
Nicholas Rempel 8de5984e38 Refactor Logout into logout.rs 2021-11-30 21:24:39 +08:00
Nicholas Rempel 2745e2b1ca Refactor Login into login.rs 2021-11-30 21:24:39 +08:00
Nicholas Rempel 76f2ca5b16 Refactor Hello/Greeting into hello.rs 2021-11-30 21:24:39 +08:00
Nicholas Rempel 5a480317e5 Refactor xml into root and disperse const values to relevant modules 2021-11-27 22:24:00 +08:00
Nicholas Rempel 8babf770c6 Refactor request and response into root 2021-11-27 22:24:00 +08:00
Nicholas Rempel fce6c7a2eb Refactor object::data into common module 2021-11-27 22:24:00 +08:00
Nicholas Rempel 8bf0283b7e Refactor message poll models 2021-11-27 22:24:00 +08:00
Nicholas Rempel dd102fa2cf Refactor message ack models 2021-11-27 22:24:00 +08:00