Skip to main content

Crate mountos_admin_sdk

Crate mountos_admin_sdk 

Source
Expand description

Rust SDK for the mountOS provider API.

Wraps the appserv provider API (/api/v1/*) with ED25519 JWT authentication. Construct a Client from a Config and call typed methods grouped by resource, e.g. client.accounts.list(..).

use mountos_admin_sdk::{Client, Config};

let client = Client::new(Config {
    base_url: "https://appserv.example.com".into(),
    private_key: "<base64 ED25519 key>".into(),
    ..Default::default()
})?;

let account = client.accounts.get(1).await?;
println!("{}", account.name);

The private_key is a base64-encoded ED25519 key - either a 32-byte seed or a 64-byte seed+public-key. JWT tokens are signed locally and cached for ~55 minutes (1h TTL with a 5-minute refresh margin).

Re-exports§

pub use serde_json;

Structs§

Account
AccountListOptions
AccountsService
Operations on the Accounts resource.
AddUserRequest
AlertCountResponse
AlertListOptions
AlertsService
Operations on the Alerts resource.
AuditLog
AuditLogListOptions
AuditLogsService
Operations on the AuditLogs resource.
BackfillFailure
BackfillFingerprintsStorageResponse
BlockMember
BlockVolume
BulkUserRequest
BulkUserResponse
CancelDrainStorageResponse
Client
mountOS Admin API client. Construct with Client::new.
ClientSession
ClientSessionListOptions
ClientSessionsService
Operations on the ClientSessions resource.
ClusterListOptions
ClustersService
Operations on the Clusters resource.
CompatibleStorage
CompatibleVolume
Config
Client configuration.
CreateAccountRequest
CreateRegionClusterRequest
CreateRegionRequest
CreateStorageRequest
CreateStorageResponse
CreateVolumeForkRequest
CreateVolumeRequest
CreateVolumeResponse
CursorPaginatedResponse
Cursor-based list response.
DashboardService
Operations on the Dashboard resource.
DashboardStats
DashboardUser
DeactivateVolumeRequest
DeleteForkVolumeResponse
DeleteVolumeForkRequest
DiscoverEndpoint
DiscoverMetaResponse
DiscoverService
Operations on the Discover resource.
DrainPairStorageResponse
EditAccountRequest
EditRegionClusterRequest
EditRegionRequest
EditStorageRequest
EditUserRequest
EditVolumeRequest
Fork
ForkEntryDetail
ForkEntryVersion
ForkTreeEntry
ForkTreeMatch
GCWorkerEvent
GCWorkerEventBucket
GCWorkerEventGoalsResponse
GCWorkerEventHistogramResponse
GCWorkerEventListOptions
GCWorkerEventsService
Operations on the GCWorkerEvents resource.
GenerateAPIKeysVolumeResponse
GenerateMetricTokenRequest
GenerateSttKeyVolumeResponse
GenerateVolumeAPIKeysRequest
GenerateVolumeSttKeyRequest
GetConfigStorageResponse
IdResponse
Identifier returned by create/edit/toggle endpoints.
LicenseDetails
LicenseList
LicenseLoadResult
LicenseQuota
LicenseRecord
LicenseService
Operations on the License resource.
LicenseTerms
ListAPIKeysVolumeResponse
ListCompatibleStorageResponse
ListOptions
Page-based pagination options.
LoadLicenseRequest
MetricsService
Operations on the Metrics resource.
MetricsTarget
MetricsTokenResponse
MoveClusterVolumeResponse
MoveStorageVolumesRequest
MoveVolumeClusterRequest
MoveVolumeFailure
MoveVolumesStorageResponse
NodeStatsSample
NodesService
Operations on the Nodes resource.
PaginatedResponse
Page-based list response.
PaginationMeta
Pagination metadata returned by page-based list endpoints.
Pair
PoolMember
Ref
Region
RegionAlert
RegionAlertListOptions
RegionAlertsService
Operations on the RegionAlerts resource.
RegionAuditLogListOptions
RegionAuditLogsService
Operations on the RegionAuditLogs resource.
RegionCluster
RegionClusterListOptions
RegionClustersService
Operations on the RegionClusters resource.
RegionListOptions
RegionVolumeMetrics
RegionsService
Operations on the Regions resource.
RegisterStorageMemberRequest
ResolveAlertResponse
ResolveRegionAlertResponse
RestoreVolumeForkRequest
RetentionPolicy
RevokeVolumeAPIKeyRequest
RevokeVolumeAPIKeysByUserRequest
ServiceAlert
ServiceNode
ServiceNodesService
Operations on the ServiceNodes resource.
SessionSummary
SessionSummaryFacet
SessionSummaryStatusEntry
SetReadyRegionClusterResponse
SetRegionClusterReadyRequest
SizeHistoryVolumeResponse
StatsHistoryServiceNodeResponse
StatsVolumeResponse
Storage
StorageListOptions
StoragesService
Operations on the Storages resource.
TestNewBucketStorageResponse
TestStorageBucketStorageResponse
TestStorageNewBucketRequest
UpdateAccountQuotaRequest
UpdateConfigResult
UpdateStorageConfigRequest
UpdateVolumeQuotaRequest
User
UserListOptions
UserLite
UsersService
Operations on the Users resource.
VaultService
Operations on the Vault resource.
Volume
VolumeApiKey
VolumeForkEntriesService
Operations on the VolumeForkEntries resource.
VolumeForkEntryListOptions
VolumeForkSearchListOptions
VolumeForkSearchesService
Operations on the VolumeForkSearches resource.
VolumeForkTreeListOptions
VolumeForkTreesService
Operations on the VolumeForkTrees resource.
VolumeListOptions
VolumeRef
VolumeRetentionPolicy
VolumeSizePoint
VolumeVersioningPolicy
VolumesService
Operations on the Volumes resource.

Enums§

ClientSessionStatus
ClientSessionStatus values accepted/returned on the wire. UnknownValue preserves a value this SDK does not recognize yet, for forward compatibility with a server that has introduced a new ClientSessionStatus value.
Error
An error from the mountOS Admin API or the transport beneath it.
LicenseQuotaState
LicenseQuotaState values accepted/returned on the wire. Unknown preserves a value this SDK does not recognize yet, for forward compatibility with a server that has introduced a new LicenseQuotaState value.
LicenseStatus
LicenseStatus values accepted/returned on the wire. Unknown preserves a value this SDK does not recognize yet, for forward compatibility with a server that has introduced a new LicenseStatus value.
PairState
PairState values accepted/returned on the wire. Unknown preserves a value this SDK does not recognize yet, for forward compatibility with a server that has introduced a new PairState value.

Constants§

PROVIDER_TYPE_AZURE
PROVIDER_TYPE_BACKBLAZE
PROVIDER_TYPE_CLOUDFLARE
PROVIDER_TYPE_DIGITAL_OCEAN
PROVIDER_TYPE_IBM_CLOUD
PROVIDER_TYPE_IMPOSSIBLE_CLOUD
PROVIDER_TYPE_LYVE
PROVIDER_TYPE_MOUNTOS
PROVIDER_TYPE_S3
PROVIDER_TYPE_S3_COMPATIBLE
PROVIDER_TYPE_WASABI

Functions§

sign_dashboard_user
Produces the signed X-MountOS-Dashboard-User header value, stamping exp at now + 10 minutes. hmac_secret is the dedicated dashboard-user HMAC secret shared with appserv (DASHBOARD_USER_HMAC_KEY), never the public verification key.