highlevel-api 0.2.1

Unofficial Rust SDK for the GoHighLevel (HighLevel) API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
pub mod memory;

use crate::{auth::token::TokenData, error::Result};
use async_trait::async_trait;

/// Pluggable token persistence layer. Implement this trait to store session
/// tokens in any backend (Redis, PostgreSQL, DynamoDB, etc.).
#[async_trait]
pub trait SessionStorage: Send + Sync {
    async fn get(&self, key: &str) -> Result<Option<TokenData>>;
    async fn set(&self, key: &str, token: TokenData) -> Result<()>;
    async fn delete(&self, key: &str) -> Result<()>;
}