mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 12:40:24 +03:00
webrpc: Implement GetUIVersion json-rpc API.
This commit is contained in:
+48
-6
@@ -16,7 +16,11 @@
|
||||
|
||||
package main
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/minio/minio/pkg/disk"
|
||||
)
|
||||
|
||||
// MakeBucketArgs - make bucket args.
|
||||
type MakeBucketArgs struct {
|
||||
@@ -32,12 +36,30 @@ type ServerInfoArgs struct{}
|
||||
// ListBucketsArgs - list bucket args.
|
||||
type ListBucketsArgs struct{}
|
||||
|
||||
// DiskInfoRep - disk info reply.
|
||||
type DiskInfoRep struct {
|
||||
DiskInfo disk.Info `json:"diskInfo"`
|
||||
UIVersion string `json:"uiVersion"`
|
||||
}
|
||||
|
||||
// ListBucketsRep - list buckets response
|
||||
type ListBucketsRep struct {
|
||||
Buckets []BucketInfo `json:"buckets"`
|
||||
UIVersion string `json:"uiVersion"`
|
||||
}
|
||||
|
||||
// ListObjectsArgs - list object args.
|
||||
type ListObjectsArgs struct {
|
||||
BucketName string `json:"bucketName"`
|
||||
Prefix string `json:"prefix"`
|
||||
}
|
||||
|
||||
// ListObjectsRep - list objects response.
|
||||
type ListObjectsRep struct {
|
||||
Objects []ObjectInfo `json:"objects"`
|
||||
UIVersion string `json:"uiVersion"`
|
||||
}
|
||||
|
||||
// PutObjectURLArgs - args to generate url for upload access.
|
||||
type PutObjectURLArgs struct {
|
||||
TargetHost string `json:"targetHost"`
|
||||
@@ -45,6 +67,12 @@ type PutObjectURLArgs struct {
|
||||
ObjectName string `json:"objectName"`
|
||||
}
|
||||
|
||||
// PutObjectURLRep - reply for presigned upload url request.
|
||||
type PutObjectURLRep struct {
|
||||
URL string `json:"url"`
|
||||
UIVersion string `json:"uiVersion"`
|
||||
}
|
||||
|
||||
// GetObjectURLArgs - args to generate url for download access.
|
||||
type GetObjectURLArgs struct {
|
||||
TargetHost string `json:"targetHost"`
|
||||
@@ -52,6 +80,12 @@ type GetObjectURLArgs struct {
|
||||
ObjectName string `json:"objectName"`
|
||||
}
|
||||
|
||||
// GetObjectURLRep - reply for presigned download url request.
|
||||
type GetObjectURLRep struct {
|
||||
URL string `json:"url"`
|
||||
UIVersion string `json:"uiVersion"`
|
||||
}
|
||||
|
||||
// RemoveObjectArgs - args to remove an object
|
||||
type RemoveObjectArgs struct {
|
||||
TargetHost string `json:"targetHost"`
|
||||
@@ -59,6 +93,12 @@ type RemoveObjectArgs struct {
|
||||
ObjectName string `json:"objectName"`
|
||||
}
|
||||
|
||||
// GenericRep - reply structure for calls for which reply is success/failure
|
||||
// for ex. RemoveObject MakeBucket
|
||||
type GenericRep struct {
|
||||
UIVersion string `json:"uiVersion"`
|
||||
}
|
||||
|
||||
// BucketInfo container for list buckets metadata.
|
||||
type BucketInfo struct {
|
||||
// The name of the bucket.
|
||||
@@ -85,15 +125,17 @@ type LoginArgs struct {
|
||||
Password string `json:"password" form:"password"`
|
||||
}
|
||||
|
||||
// AuthToken - auth token reply.
|
||||
type AuthToken struct {
|
||||
Token string `json:"token" form:"token"`
|
||||
// LoginRep - login reply.
|
||||
type LoginRep struct {
|
||||
Token string `json:"token"`
|
||||
UIVersion string `json:"uiVersion"`
|
||||
}
|
||||
|
||||
// ServerInfo - server info reply.
|
||||
type ServerInfo struct {
|
||||
// ServerInfoRep - server info reply.
|
||||
type ServerInfoRep struct {
|
||||
MinioVersion string
|
||||
MinioMemory string
|
||||
MinioPlatform string
|
||||
MinioRuntime string
|
||||
UIVersion string `json:"uiVersion"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user