Struct torrust_tracker_configuration::HttpApi 
source · pub struct HttpApi {
    pub enabled: bool,
    pub bind_address: String,
    pub ssl_enabled: bool,
    pub ssl_cert_path: Option<String>,
    pub ssl_key_path: Option<String>,
    pub access_tokens: HashMap<String, String>,
}Expand description
Configuration for the HTTP API.
Fields§
§enabled: boolWeather the HTTP API is enabled or not.
bind_address: StringThe address the tracker will bind to.
The format is ip:port, for example 0.0.0.0:6969. If you want to
listen to all interfaces, use 0.0.0.0. If you want the operating
system to choose a random port, use port 0.    
ssl_enabled: boolWeather the HTTP API will use SSL or not.
ssl_cert_path: Option<String>Path to the SSL certificate file. Only used if ssl_enabled is true.
ssl_key_path: Option<String>Path to the SSL key file. Only used if ssl_enabled is true.
access_tokens: HashMap<String, String>Access tokens for the HTTP API. The key is a label identifying the token and the value is the token itself. The token is used to authenticate the user. All tokens are valid for all endpoints and have the all permissions.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for HttpApi
 
impl<'de> Deserialize<'de> for HttpApi
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<HttpApi> for HttpApi
 
impl PartialEq<HttpApi> for HttpApi
impl Eq for HttpApi
impl StructuralEq for HttpApi
impl StructuralPartialEq for HttpApi
Auto Trait Implementations§
impl RefUnwindSafe for HttpApi
impl Send for HttpApi
impl Sync for HttpApi
impl Unpin for HttpApi
impl UnwindSafe for HttpApi
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Qwhere
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized,
 
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized,
 
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.