pub struct InstanceAddress {
pub hostname: String,
pub port: u16,
pub secure: bool,
pub user_agent: String,
pub endpoint_graphql: String,
pub endpoint_dynamic_graph: String,
pub endpoint_runtime: String,
pub endpoint_plugin: String,
pub bearer: Option<String>,
pub danger_accept_invalid_certs: Option<bool>,
pub danger_accept_invalid_hostnames: Option<bool>,
}
Fields§
§hostname: String
The hostname of the GraphQL server.
port: u16
The port of the GraphQL server.
secure: bool
If true, HTTPS will be used.
user_agent: String
The user agent.
endpoint_graphql: String
The relative URL of the GraphQL endpoint, by default “/graphql”.
endpoint_dynamic_graph: String
The relative URL of the GraphQL endpoint, by default “/graphql”.
endpoint_runtime: String
The relative URL of the GraphQL endpoint, by default “/graphql”.
endpoint_plugin: String
The relative URL of the GraphQL endpoint, by default “/graphql”.
bearer: Option<String>
The authentication token.
danger_accept_invalid_certs: Option<bool>
Controls the use of certificate validation.
Defaults to false
.
Warning: You should think very carefully before using this method. If invalid certificates are trusted, any certificate for any site will be trusted for use. This includes expired certificates. This introduces significant vulnerabilities, and should only be used as a last resort.
danger_accept_invalid_hostnames: Option<bool>
Controls the use of hostname verification.
Defaults to false
.
Warning: You should think very carefully before you use this method. If hostname verification is not used, any valid certificate for any site will be trusted for use from any other. This introduces a significant vulnerability to man-in-the-middle attacks.
Implementations§
Source§impl InstanceAddress
impl InstanceAddress
Sourcepub fn builder() -> InstanceAddressBuilder<((), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> InstanceAddressBuilder<((), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building InstanceAddress
.
On the builder, call .hostname(...)
(optional), .port(...)
(optional), .secure(...)
(optional), .user_agent(...)
(optional), .endpoint_graphql(...)
(optional), .endpoint_dynamic_graph(...)
(optional), .endpoint_runtime(...)
(optional), .endpoint_plugin(...)
(optional), .bearer(...)
(optional), .danger_accept_invalid_certs(...)
(optional), .danger_accept_invalid_hostnames(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of InstanceAddress
.
Source§impl InstanceAddress
impl InstanceAddress
pub fn new(hostname: String, port: u16, secure: bool) -> InstanceAddress
pub fn protocol(&self) -> String
pub fn base_url(&self) -> String
pub fn url_reactive_graph(&self) -> String
pub fn url_dynamic_graph(&self) -> String
pub fn url_reactive_graph_runtime(&self) -> String
pub fn url_reactive_graph_plugins(&self) -> String
Trait Implementations§
Source§impl Clone for InstanceAddress
impl Clone for InstanceAddress
Source§fn clone(&self) -> InstanceAddress
fn clone(&self) -> InstanceAddress
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more