mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
Update documentation for Accounting API (#9909)
This commit is contained in:
parent
91817d0d1a
commit
90f36c1389
@ -43,11 +43,11 @@ func main() {
|
||||
|
||||
```
|
||||
|
||||
| Service operations | Info operations | Healing operations | Config operations |
|
||||
|:------------------------------------|:------------------------------|:-------------------|:--------------------------|
|
||||
| [`ServiceTrace`](#ServiceTrace) | [`ServerInfo`](#ServerInfo) | [`Heal`](#Heal) | [`GetConfig`](#GetConfig) |
|
||||
| [`ServiceStop`](#ServiceStop) | [`StorageInfo`](#StorageInfo) | | [`SetConfig`](#SetConfig) |
|
||||
| [`ServiceRestart`](#ServiceRestart) | | | |
|
||||
| Service operations | Info operations | Healing operations | Config operations |
|
||||
|:------------------------------------|:-----------------------------------------|:-------------------|:--------------------------|
|
||||
| [`ServiceTrace`](#ServiceTrace) | [`ServerInfo`](#ServerInfo) | [`Heal`](#Heal) | [`GetConfig`](#GetConfig) |
|
||||
| [`ServiceStop`](#ServiceStop) | [`StorageInfo`](#StorageInfo) | | [`SetConfig`](#SetConfig) |
|
||||
| [`ServiceRestart`](#ServiceRestart) | [`AccountUsageInfo`](#AccountUsageInfo) | | |
|
||||
|
||||
|
||||
|
||||
@ -251,6 +251,47 @@ __Example__
|
||||
|
||||
```
|
||||
|
||||
<a name="AccountUsageInfo"></a>
|
||||
|
||||
### AccountUsageInfo(ctx context.Context) (AccountUsageInfo, error)
|
||||
|
||||
Fetches accounting usage information for the current authenticated user
|
||||
|
||||
| Param | Type | Description |
|
||||
|--------------------------------|----------------------|-------------------------|
|
||||
| `AccountUsageInfo.AccountName` | _string_ | Account name. |
|
||||
| `AccountUsageInfo.Buckets` | _[]BucketUsageInfo_ | Bucket usage info. |
|
||||
|
||||
|
||||
| Param | Type | Description |
|
||||
|----------------------------|-----------------|-----------------------------------------|
|
||||
| `BucketUsageInfo.Name` | _string_ | The name of the current bucket
|
||||
| `BucketUsageInfo.Size` | _uint64_ | The total size of the current bucket
|
||||
| `BucketUsageInfo.Created` | _time.Time_ | Bucket creation time
|
||||
| `BucketUsageInfo.Access` | _AccountAccess_ | Type of access of the current account
|
||||
|
||||
|
||||
| Param | Type | Description |
|
||||
|------------------------|---------|------------------------------------------------------------------|
|
||||
| `AccountAccess.Read` | _bool_ | Indicate if the bucket is readable by the current account name. |
|
||||
| `AccountAccess.Write` | _bool_ | Indocate if the bucket is writable by the current account name. |
|
||||
|
||||
|
||||
__Example__
|
||||
|
||||
```go
|
||||
|
||||
accountUsageInfo, err := madmClnt.AccountUsageInfo(context.Background())
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
log.Println(accountUsageInfo)
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 5. Heal operations
|
||||
|
||||
<a name="Heal"></a>
|
||||
|
@ -37,10 +37,10 @@ func main() {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
accountingUsageInfo, err := madmClnt.AccountingUsageInfo(context.Background())
|
||||
accountUsageInfo, err := madmClnt.AccountUsageInfo(context.Background())
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
log.Println(accountingUsageInfo)
|
||||
log.Println(accountUsageInfo)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user