Crate pattrick

source ·
Expand description

Pattrick

pattrick is a library to manage personal access tokens (PAT) for Azure DevOps. It allows you to easily create, list, get and delete PAT tokens.

Example


use pattrick::{PatTokenManager, PatTokenListRequest, DisplayFilterOption};
use pattrick::azure::get_ad_token_for_devops;

let pat_manager = PatTokenManager::new(get_ad_token_for_devops().await?);

let pat_tokens = pat_manager.list_pat_tokens(
    PatTokenListRequest {
        display_filter_option: DisplayFilterOption::All
    }
).await?;

Modules

Azure AD related functions

Structs

Response from the Azure DevOps API when listing PAT tokens
A Personal Access Token (PAT) for Azure DevOps
Request to create a PAT token
Request to revoke a PAT token
Request to get a PAT token
Request to list a PAT token
PatTokenManager is a struct that manages the creation, listing, getting and deletion of PAT tokens. It uses the Azure AD token to authenticate with Azure DevOps.
Result of a PAT token creation request

Enums

Display filter options for listing PAT tokens