Crate lib

source · []
Expand description

Automattermostatus main components and helper functions used by main

Re-exports

pub use config::Args;
pub use config::SecretType;
pub use config::WifiStatusConfig;
pub use mattermost::BaseSession;
pub use mattermost::MMStatus;
pub use mattermost::Session;
pub use state::Cache;
pub use state::Location;
pub use state::State;
pub use wifiscan::WiFi;
pub use wifiscan::WifiInterface;

Modules

This module holds struct and helpers for parameters and configuration

This module exports Session and MMStatus

This module Provide the Off trait and OffDays struct

Implement persistant state for current location

Simple utilities functions

Implement wifi SSID scan for linux, windows and mac os.

Functions

Create Session according to args.secret_type.

Return a Cache used to persist state.

Main application loop, looking for a known SSID and updating mattermost custom status accordingly.

Prepare a dictionnary of MMStatus ready to be send to mattermost server depending upon the location being found.

Setup logging to stdout (Tracing is a bit more involving to set up but will provide much more feature if needed)