Mari
cc08819fdc
Allow changing passwords
2022-09-07 06:03:16 +08:00
Dirkjan Ochtman
14ffc8db01
Change MessageAck message_id to be a &str
...
While all the examples in RFC 5730 use numbers, there is nothing
normative in section 2.9.2.3 that constrains msgID to be a number.
And if we look at the XML Schema, we find that msgID is defined
to be of type `token`, which seems to be defined as a string
that does not contain line feeds, carriage returns, tabs, leading
or trailing spaces or multiple spaces.
While we might define a more specific token type in the future,
for now sticking with just &str seems reasonable and this also
matches the type for `MessageQueue::id`.
2022-08-05 02:22:54 +08:00
Ritesh Chitlangi
20ab056dcf
update doc and release 0.4
2022-07-26 14:49:37 +08:00
Dirkjan Ochtman
ca19e545fd
Flatten XML abstraction
2022-03-22 16:47:12 +08:00
Dirkjan Ochtman
3f91647370
Move response deserialization into client
2022-03-22 16:47:12 +08:00
Dirkjan Ochtman
dd5fbc60ce
Simplify response tests with a helper
2022-03-22 16:47:12 +08:00
Dirkjan Ochtman
5dce8501d5
Let callers create CommandDocument directly
2022-03-22 16:47:12 +08:00
Dirkjan Ochtman
dd07ecc4b8
Externalize handling of command serialization
2022-03-22 16:47:12 +08:00
Nicholas Rempel
dd3c60f50e
Move request/response debug logging to client
2022-03-14 23:41:41 +08:00
Dirkjan Ochtman
ae4c9869ab
Improve robustness against dropping futures
2022-03-14 23:41:41 +08:00
Dirkjan Ochtman
478e686f24
Add more logging around reconnects
2022-03-14 23:41:41 +08:00
Dirkjan Ochtman
aa589197a1
Track connection state and reconnect on invalid state
...
The external client/connection interface expects that to complete
full request/response cycles. However, at await points the stack
could simply be dropped, meaning the connection is left in an
inconsistent state. One relatively likely scenario is that a
transaction might be dropped while waiting for a response from the
server. For example, this might happen if the connection was
initiated by a HTTP request which was canceled/aborted.
There are different failure modes which can result from similar
scenarios depending on during what await point the future was
dropped. Since it's relatively difficult to protect against
these scenarios and some of them might manifest in indirect ways
(for example, a deserialization error might happen because the
incoming response was for a different kind of request), this PR
takes the approach of tracking in the connection whether we're
(supposedly) at a point where the connection is ready to send
another request. If transact() is called while the connection is
not in such a state, the connection will transparently attempt
to reconnect to clean up any erroneous state.
2022-03-07 21:51:00 +01:00
Dirkjan Ochtman
7e0a51bebb
Use DateTime types where possible
2022-02-25 00:12:48 +08:00
Dirkjan Ochtman
f7d76adef3
Implement AsRef<str> for StringValue
2022-02-25 00:12:48 +08:00
Dirkjan Ochtman
cdbf0a2e65
Replace HostAddr with IpAddr in the public interface
2022-02-16 02:19:47 +08:00
Dirkjan Ochtman
1426312df0
Derive Debug for RequestData
2022-02-10 13:55:34 +08:00
Dirkjan Ochtman
af69f511b5
Generate error events for deserialization failures
2022-02-10 13:55:34 +08:00
Dirkjan Ochtman
53c240be21
Derive Copy on RequestData
2022-02-10 13:55:34 +08:00
Dirkjan Ochtman
386638b6ca
Offer API to reconnect an EppClient
2022-02-10 13:55:34 +08:00
Dirkjan Ochtman
36558c429c
Allow the Connection to connect itself
2022-02-10 13:55:34 +08:00
Dirkjan Ochtman
95b62891c9
Fix rustdoc warning
2022-02-04 11:39:13 +08:00
Dirkjan Ochtman
88eb9b9cab
Simplify/improve crate-level documentation
2022-02-04 11:39:13 +08:00
Dirkjan Ochtman
e482cc152b
Deduplicate client example code
2022-02-04 11:39:13 +08:00
Dirkjan Ochtman
dc3f10cae3
Wrap timeouts around network operations
2022-02-04 11:39:13 +08:00
Dirkjan Ochtman
f3aab578e7
Relax lifetime constraints on command + extension combinations
...
They should not be required to have the same lifetimes.
2022-01-31 14:05:52 +08:00
Dirkjan Ochtman
2639ec8c95
Make the Period type align with the standard
2022-01-31 14:05:16 +08:00
Dirkjan Ochtman
5fb32978bd
Improve check request API types by redirecting serialization
2022-01-31 14:04:48 +08:00
Dirkjan Ochtman
fdec3f29fc
Redirect CheckResponse deserialization to improve interface
2022-01-31 14:04:48 +08:00
Dirkjan Ochtman
a5d6643d6f
Share CheckResponse type with contacts
2022-01-31 14:04:48 +08:00
Dirkjan Ochtman
dd1c9c1e66
Share CheckResponse types for domain and host resources
2022-01-31 14:04:48 +08:00
Dirkjan Ochtman
999149ba31
Share the Available type across domain and host
2022-01-31 14:04:48 +08:00
Dirkjan Ochtman
a6dfe70361
Use bool for availability for contact/host resources as well
2022-01-31 14:04:48 +08:00
Dirkjan Ochtman
0c36d8add3
Use an enum for result codes
2022-01-27 17:10:28 +08:00
Dirkjan Ochtman
630c6b06e4
Change DomainAvailable::available to be a bool
...
From RFC 5731:
This element MUST contain an "avail" attribute whose value indicates
object availability (can it be provisioned or not) at the moment the
<check> command was completed. A value of "1" or "true" means that
the object can be provisioned. A value of "0" or "false" means that
the object can not be provisioned.
2022-01-24 16:34:33 +08:00
Dirkjan Ochtman
9acd9eac29
Take Login ext_uris values as a slice to allow caller to avoid allocation
...
In some cases the caller might be able to use a const slice for this.
2022-01-24 15:34:45 +08:00
Dirkjan Ochtman
58b72f9b0c
Make sure Error implements Send and Sync
2022-01-23 23:34:58 +08:00
Nicholas Rempel
4615d63b13
Make it possible to create hosts without addresses
2022-01-19 23:29:55 +08:00
Nicholas Rempel
c0ebbf6b52
Add test case for message only poll response
2022-01-06 19:22:20 +08:00
Nicholas Rempel
427db7a1eb
Add test case for empty queue poll response
2022-01-06 19:22:20 +08:00
Nicholas Rempel
569bd86bae
Add HostInfoResponseData to list of support message poll response types
2022-01-06 19:22:20 +08:00
Nicholas Rempel
4f112469ce
Re-use DomainTransferResponseData in message poll
2022-01-06 19:22:20 +08:00
Dirkjan Ochtman
24356a722a
Re-export command types for easier access
2022-01-03 10:29:58 +08:00
Dirkjan Ochtman
0cd3e28b22
Use get_epp_response() to read initial greeting
2022-01-03 10:22:20 +08:00
Dirkjan Ochtman
8efb206e43
Rename test directory to tests
2022-01-03 10:22:20 +08:00
Dirkjan Ochtman
70f3789098
Make tokio-rustls dependency optional
2022-01-03 10:22:20 +08:00
Dirkjan Ochtman
0db2c6d008
Abstract EppClient over stream type
2022-01-03 10:22:20 +08:00
Dirkjan Ochtman
44f3fbef53
Move responsibility for stream setup into client
2022-01-03 10:22:20 +08:00
Dirkjan Ochtman
d69439ff24
Abstract EppConnection over stream type
2022-01-03 10:22:20 +08:00
Dirkjan Ochtman
3d0c3166f3
More concise/consistent error messages
2021-12-27 15:29:09 +08:00
Dirkjan Ochtman
978e43a4c1
Consistently return Error type
2021-12-27 15:29:09 +08:00
Dirkjan Ochtman
abab1aca8c
Store richer Box<dyn StdError> in Error::Other
2021-12-27 15:29:09 +08:00
Dirkjan Ochtman
6d063804d3
Use consistent naming for error types
2021-12-27 15:29:09 +08:00
Dirkjan Ochtman
467ac03df7
Preserve quick-xml errors
2021-12-27 15:29:09 +08:00
Dirkjan Ochtman
78628cfc02
Rename Error variants to avoid stuttering
2021-12-27 15:29:09 +08:00
Dirkjan Ochtman
2193c10290
Remove unused impl
2021-12-27 15:29:09 +08:00
Dirkjan Ochtman
b7b6d0ae00
Remove unused type
2021-12-27 15:29:09 +08:00
Ritesh Chitlangi
d5d3a93141
fix impl lifetimes
2021-12-21 00:14:38 +08:00
Ritesh Chitlangi
537fe10bee
minor fixes
2021-12-21 00:05:12 +08:00
Nick Rempel
6445b63c62
Add sync namestore composite extension
2021-12-20 22:19:57 +08:00
Dirkjan Ochtman
17d5bd90e9
Use &str or Cow<'a, str> in place of String
2021-12-20 22:08:55 +08:00
Dirkjan Ochtman
99701608a2
Replace Vec with slice where possible
2021-12-20 22:08:55 +08:00
Dirkjan Ochtman
d4f4949cd8
Store a Cow<'a, str> in StringValue
...
And parametrize all serialize-only types with a lifetime such that
building requests no longer requires unnecessary allocations.
2021-12-20 22:08:55 +08:00
Dirkjan Ochtman
1efe19000e
Deduplicate DomainTransfer constructor methods
2021-12-20 22:08:55 +08:00
Dirkjan Ochtman
a5f57fa836
Use &'static str for namespace URLs in serialize types
2021-12-20 22:08:55 +08:00
Dirkjan Ochtman
b0595511e4
Remove unnecessary Deserialize/Serialize derives
2021-12-20 22:08:55 +08:00
Dirkjan Ochtman
5664276133
Remove serde aliases from types that don't implement Deserialize
2021-12-20 22:08:55 +08:00
Dirkjan Ochtman
3935413b70
Move contact-related types from common to contact
2021-12-15 23:40:56 +08:00
Dirkjan Ochtman
93f8e0e8c8
Remove type aliases for ContactStatus
2021-12-15 23:40:56 +08:00
Dirkjan Ochtman
95e21eb9ea
Reinstate contact module as a separate file
2021-12-15 23:40:56 +08:00
Dirkjan Ochtman
defd7cff9b
Move domain-related types from common to domain
2021-12-15 23:40:56 +08:00
Dirkjan Ochtman
2ac3a6398d
Remove unused type
2021-12-15 23:40:56 +08:00
Dirkjan Ochtman
ae0a6589a9
Reinstate domain module as a separate file
2021-12-15 23:40:56 +08:00
Nick Rempel
b8e47fce4b
exDate should always be optional
2021-12-14 23:20:19 +08:00
Dirkjan Ochtman
62645eec96
Minimize configuration interface API
2021-12-14 23:12:28 +08:00
Dirkjan Ochtman
375a151851
Use PathBuf type to clarify usage of paths
2021-12-14 23:12:28 +08:00
Dirkjan Ochtman
79c69dfd1f
Privatize EppConnection type
2021-12-14 23:12:28 +08:00
Dirkjan Ochtman
7772b302af
Add shutdown() method in EppClient interface
2021-12-14 23:12:28 +08:00
Dirkjan Ochtman
0ac766e848
Rename registry module to connection
2021-12-14 23:12:28 +08:00
Dirkjan Ochtman
4f111fa8fe
Make connection setup a part of EppConnection interface
2021-12-14 23:12:28 +08:00
Dirkjan Ochtman
6695a20a18
Remove now unnecessary workspace
2021-12-13 00:19:03 +08:00
Ritesh Chitlangi
fd72c80023
added macro for serializer element name for generic objects
2021-07-22 18:35:20 +08:00
Ritesh Chitlangi
b0da37bb1e
added contact check call
2021-07-21 00:43:13 +08:00
Ritesh Chitlangi
e879ce5d9a
more intuitive serialization and object structure, and domain check command added
2021-07-21 00:10:56 +08:00
Ritesh Chitlangi
4de42f1951
made deserialization in EppClient::transact() generic
2021-07-20 16:36:35 +08:00
Ritesh Chitlangi
89ed02c4d4
basic epp serialization/deserialization added
2021-07-20 16:13:28 +08:00
Ritesh Chitlangi
85ae3d601c
deserialization boilerplate
2021-07-20 15:45:01 +08:00
Ritesh Chitlangi
0ced95dee7
logout and login added to connection initialization
2021-07-20 02:17:57 +08:00
Ritesh Chitlangi
6f9f526385
clean up xml serialization
2021-07-20 01:56:10 +08:00
Ritesh Chitlangi
543378cb52
fixed message length bug
2021-07-20 00:52:02 +08:00
Ritesh Chitlangi
f503132d85
WIP initial commit with working greeting and login calls
2021-07-17 03:16:28 +08:00