2016-04-08 19:37:38 +02:00
|
|
|
/*
|
|
|
|
* Minio Cloud Storage, (C) 2016 Minio, Inc.
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2016-08-18 23:50:50 +02:00
|
|
|
package cmd
|
2016-04-08 19:37:38 +02:00
|
|
|
|
2016-08-11 06:09:31 +02:00
|
|
|
// GenericVolArgs - generic volume args.
|
|
|
|
type GenericVolArgs struct {
|
|
|
|
// Authentication token generated by Login.
|
2016-12-23 16:12:19 +01:00
|
|
|
AuthRPCArgs
|
2016-08-11 06:09:31 +02:00
|
|
|
|
|
|
|
// Name of the volume.
|
|
|
|
Vol string
|
|
|
|
}
|
|
|
|
|
2016-06-09 15:24:11 +02:00
|
|
|
// ListVolsReply represents list of vols RPC reply.
|
2016-04-08 19:37:38 +02:00
|
|
|
type ListVolsReply struct {
|
2016-06-09 15:24:11 +02:00
|
|
|
// List of volumes stat information.
|
2016-04-08 19:37:38 +02:00
|
|
|
Vols []VolInfo
|
|
|
|
}
|
|
|
|
|
2016-06-25 23:51:06 +02:00
|
|
|
// ReadAllArgs represents read all RPC arguments.
|
|
|
|
type ReadAllArgs struct {
|
2016-08-11 06:09:31 +02:00
|
|
|
// Authentication token generated by Login.
|
2016-12-23 16:12:19 +01:00
|
|
|
AuthRPCArgs
|
2016-08-24 04:19:24 +02:00
|
|
|
|
2016-06-25 23:51:06 +02:00
|
|
|
// Name of the volume.
|
|
|
|
Vol string
|
|
|
|
|
|
|
|
// Name of the path.
|
|
|
|
Path string
|
|
|
|
}
|
|
|
|
|
2016-06-09 15:24:11 +02:00
|
|
|
// ReadFileArgs represents read file RPC arguments.
|
2016-05-29 00:13:15 +02:00
|
|
|
type ReadFileArgs struct {
|
2016-08-11 06:09:31 +02:00
|
|
|
// Authentication token generated by Login.
|
2016-12-23 16:12:19 +01:00
|
|
|
AuthRPCArgs
|
2016-08-24 04:19:24 +02:00
|
|
|
|
2016-06-09 15:24:11 +02:00
|
|
|
// Name of the volume.
|
|
|
|
Vol string
|
|
|
|
|
|
|
|
// Name of the path.
|
|
|
|
Path string
|
|
|
|
|
|
|
|
// Starting offset to start reading into Buffer.
|
2016-05-29 00:13:15 +02:00
|
|
|
Offset int64
|
2016-06-09 15:24:11 +02:00
|
|
|
|
2016-12-09 05:35:07 +01:00
|
|
|
// Data buffer read from the path at offset.
|
|
|
|
Buffer []byte
|
2017-05-16 23:21:52 +02:00
|
|
|
|
|
|
|
// Algorithm used in bit-rot hash computation.
|
2017-08-15 03:08:42 +02:00
|
|
|
Algo BitrotAlgorithm
|
2017-05-16 23:21:52 +02:00
|
|
|
|
2017-08-15 03:08:42 +02:00
|
|
|
// Stored hash value used to compare with computed value.
|
|
|
|
ExpectedHash []byte
|
2017-09-25 20:32:56 +02:00
|
|
|
|
|
|
|
// Indicates whether the disk has already been verified
|
|
|
|
Verified bool
|
2017-05-16 23:21:52 +02:00
|
|
|
}
|
|
|
|
|
2016-10-29 21:44:44 +02:00
|
|
|
// PrepareFileArgs represents append file RPC arguments.
|
|
|
|
type PrepareFileArgs struct {
|
|
|
|
// Authentication token generated by Login.
|
2016-12-23 16:12:19 +01:00
|
|
|
AuthRPCArgs
|
2016-10-29 21:44:44 +02:00
|
|
|
|
|
|
|
// Name of the volume.
|
|
|
|
Vol string
|
|
|
|
|
|
|
|
// Name of the path.
|
|
|
|
Path string
|
|
|
|
|
|
|
|
// Size of the file to be prepared
|
|
|
|
Size int64
|
|
|
|
}
|
|
|
|
|
2016-06-09 15:24:11 +02:00
|
|
|
// AppendFileArgs represents append file RPC arguments.
|
2016-05-29 00:13:15 +02:00
|
|
|
type AppendFileArgs struct {
|
2016-08-11 06:09:31 +02:00
|
|
|
// Authentication token generated by Login.
|
2016-12-23 16:12:19 +01:00
|
|
|
AuthRPCArgs
|
2016-08-11 06:09:31 +02:00
|
|
|
|
2016-06-09 15:24:11 +02:00
|
|
|
// Name of the volume.
|
|
|
|
Vol string
|
|
|
|
|
|
|
|
// Name of the path.
|
|
|
|
Path string
|
|
|
|
|
|
|
|
// Data buffer to be saved at path.
|
2016-05-29 00:13:15 +02:00
|
|
|
Buffer []byte
|
|
|
|
}
|
|
|
|
|
2016-06-09 15:24:11 +02:00
|
|
|
// StatFileArgs represents stat file RPC arguments.
|
2016-04-08 19:37:38 +02:00
|
|
|
type StatFileArgs struct {
|
2016-08-11 06:09:31 +02:00
|
|
|
// Authentication token generated by Login.
|
2016-12-23 16:12:19 +01:00
|
|
|
AuthRPCArgs
|
2016-08-11 06:09:31 +02:00
|
|
|
|
2016-06-09 15:24:11 +02:00
|
|
|
// Name of the volume.
|
|
|
|
Vol string
|
|
|
|
|
|
|
|
// Name of the path.
|
2016-04-08 19:37:38 +02:00
|
|
|
Path string
|
|
|
|
}
|
|
|
|
|
2016-06-09 15:24:11 +02:00
|
|
|
// DeleteFileArgs represents delete file RPC arguments.
|
2016-04-08 19:37:38 +02:00
|
|
|
type DeleteFileArgs struct {
|
2016-08-11 06:09:31 +02:00
|
|
|
// Authentication token generated by Login.
|
2016-12-23 16:12:19 +01:00
|
|
|
AuthRPCArgs
|
2016-08-11 06:09:31 +02:00
|
|
|
|
2016-06-09 15:24:11 +02:00
|
|
|
// Name of the volume.
|
|
|
|
Vol string
|
|
|
|
|
|
|
|
// Name of the path.
|
2016-04-08 19:37:38 +02:00
|
|
|
Path string
|
|
|
|
}
|
2016-05-02 12:12:18 +02:00
|
|
|
|
2016-06-09 15:24:11 +02:00
|
|
|
// ListDirArgs represents list contents RPC arguments.
|
2016-05-05 21:51:56 +02:00
|
|
|
type ListDirArgs struct {
|
2016-08-11 06:09:31 +02:00
|
|
|
// Authentication token generated by Login.
|
2016-12-23 16:12:19 +01:00
|
|
|
AuthRPCArgs
|
2016-08-11 06:09:31 +02:00
|
|
|
|
2016-06-09 15:24:11 +02:00
|
|
|
// Name of the volume.
|
|
|
|
Vol string
|
|
|
|
|
|
|
|
// Name of the path.
|
2016-05-05 21:51:56 +02:00
|
|
|
Path string
|
|
|
|
}
|
|
|
|
|
2016-06-09 15:24:11 +02:00
|
|
|
// RenameFileArgs represents rename file RPC arguments.
|
2016-05-02 12:12:18 +02:00
|
|
|
type RenameFileArgs struct {
|
2016-08-11 06:09:31 +02:00
|
|
|
// Authentication token generated by Login.
|
2016-12-23 16:12:19 +01:00
|
|
|
AuthRPCArgs
|
2016-08-11 06:09:31 +02:00
|
|
|
|
2016-06-09 15:24:11 +02:00
|
|
|
// Name of source volume.
|
|
|
|
SrcVol string
|
|
|
|
|
|
|
|
// Source path to be renamed.
|
2016-05-02 12:12:18 +02:00
|
|
|
SrcPath string
|
2016-06-09 15:24:11 +02:00
|
|
|
|
|
|
|
// Name of destination volume.
|
|
|
|
DstVol string
|
|
|
|
|
|
|
|
// Destination path of renamed file.
|
2016-05-02 12:12:18 +02:00
|
|
|
DstPath string
|
|
|
|
}
|