C# Класс Minio.MinioClient

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
CalculatePartSize long
CompleteMultipartUpload void
GetListParts List>.Tuple
GetMultipartUploadsList List>.Tuple
GetObjectList List>.Tuple
ListParts IEnumerable
NewMultipartUpload string
ParseError Minio.Errors.ClientException
PutObject string
ReadFull byte[]
RemoveUpload void
StripXmlnsXsi string
UrlEncode string
isValidEndpoint bool
listIncompleteUploads IEnumerable

Открытые методы

Метод Описание
BucketExists ( string bucketName ) : bool

Returns true if the specified bucketName exists, otherwise returns false.

GetObject ( string bucketName, string objectName, Action callback ) : void

Get an object. The object will be streamed to the callback given by the user.

GetPartialObject ( string bucketName, string objectName, ulong offset, Action callback ) : void

Get an object starting with the byte specified in offset. The object will be streamed to the callback given by the user

GetPartialObject ( string bucketName, string objectName, ulong offset, ulong length, Action callback ) : void

Get a byte range of an object given by the offset and length. The object will be streamed to the callback given by the user

ListBuckets ( ) : List

Lists all buckets owned by the user

ListIncompleteUploads ( string bucketName ) : IEnumerable

Lists all incomplete uploads in a given bucket

ListIncompleteUploads ( string bucketName, string prefix ) : IEnumerable

Lists all incomplete uploads in a given bucket and prefix

ListIncompleteUploads ( string bucketName, string prefix, bool recursive ) : IEnumerable

Lists all incomplete uploads in a given bucket and prefix recursively

ListObjects ( string bucketName ) : IEnumerable

List all objects in a bucket

ListObjects ( string bucketName, string prefix ) : IEnumerable

List all objects in a bucket with a given prefix

ListObjects ( string bucketName, string prefix, bool recursive ) : IEnumerable

List all objects non-recursively in a bucket with a given prefix, optionally emulating a directory

MakeBucket ( string bucketName ) : void

Create a private bucket with a give name.

MakeBucket ( string bucketName, string location ) : void

Create a bucket with a given name and location.

MinioClient ( Uri uri ) : System

Creates and returns an Cloud Storage client.

MinioClient ( Uri uri, string accessKey, string secretKey ) : System
MinioClient ( string endpoint ) : System

Creates and returns an Cloud Storage client

MinioClient ( string endpoint, int port, string accessKey, string secretKey ) : System
MinioClient ( string endpoint, int port, string accessKey, string secretKey, bool secure ) : System

Creates and returns an Cloud Storage client

MinioClient ( string url, string accessKey, string secretKey ) : System

Creates and returns an Cloud Storage client

MinioClient ( string endpoint, string accessKey, string secretKey, bool secure ) : System
PresignedGetObject ( string bucketName, string objectName, int expiresInt ) : string

Presigned Get url.

PresignedPostPolicy ( PostPolicy policy ) : string>.Dictionary

Presigned post policy

PresignedPutObject ( string bucketName, string objectName, int expiresInt ) : string

Presigned Put url.

PutObject ( string bucketName, string objectName, Stream data, long size, string contentType ) : void

Creates an object

RemoveBucket ( string bucketName ) : void

Remove a bucket

RemoveIncompleteUpload ( string bucketName, string objectName ) : void

Remove incomplete uploads from a given bucket and objectName

RemoveObject ( string bucketName, string objectName ) : void

Remove an object

SetAppInfo ( string appName, string appVersion ) : void
StatObject ( string bucketName, string objectName ) : ObjectStat

Tests the object's existence and returns metadata about existing objects.

Приватные методы

Метод Описание
CalculatePartSize ( long size ) : long
CompleteMultipartUpload ( string bucketName, string objectName, string uploadId, string>.Dictionary etags ) : void
GetListParts ( string bucketName, string objectName, string uploadId, int partNumberMarker ) : List>.Tuple
GetMultipartUploadsList ( string bucketName, string prefix, string keyMarker, string uploadIdMarker, string delimiter ) : List>.Tuple
GetObjectList ( string bucketName, string prefix, bool recursive, string marker ) : List>.Tuple
ListParts ( string bucketName, string objectName, string uploadId ) : IEnumerable
NewMultipartUpload ( string bucketName, string objectName, string contentType ) : string
ParseError ( IRestResponse response ) : ClientException
PutObject ( string bucketName, string objectName, string uploadId, int partNumber, byte data, string contentType ) : string
ReadFull ( Stream data, int currentPartSize ) : byte[]
RemoveUpload ( string bucketName, string objectName, string uploadId ) : void
StripXmlnsXsi ( string input ) : string
UrlEncode ( string input ) : string
isValidEndpoint ( string endpoint ) : bool
listIncompleteUploads ( string bucketName, string prefix, string delimiter ) : IEnumerable

Lists all or delimited incomplete uploads in a given bucket with a given objectName

Описание методов

BucketExists() публичный Метод

Returns true if the specified bucketName exists, otherwise returns false.
public BucketExists ( string bucketName ) : bool
bucketName string Bucket to test existence of
Результат bool

GetObject() публичный Метод

Get an object. The object will be streamed to the callback given by the user.
public GetObject ( string bucketName, string objectName, Action callback ) : void
bucketName string Bucket to retrieve object from
objectName string Name of object to retrieve
callback Action A stream will be passed to the callback
Результат void

GetPartialObject() публичный Метод

Get an object starting with the byte specified in offset. The object will be streamed to the callback given by the user
public GetPartialObject ( string bucketName, string objectName, ulong offset, Action callback ) : void
bucketName string Bucket to retrieve object from
objectName string Name of object to retrieve
offset ulong Number of bytes to skip
callback Action A stream will be passed to the callback
Результат void

GetPartialObject() публичный Метод

Get a byte range of an object given by the offset and length. The object will be streamed to the callback given by the user
public GetPartialObject ( string bucketName, string objectName, ulong offset, ulong length, Action callback ) : void
bucketName string Bucket to retrieve object from
objectName string Key of object to retrieve
offset ulong Number of bytes to skip
length ulong Length of requested byte range
callback Action A stream will be passed to the callback
Результат void

ListBuckets() публичный Метод

Lists all buckets owned by the user
public ListBuckets ( ) : List
Результат List

ListIncompleteUploads() публичный Метод

Lists all incomplete uploads in a given bucket
public ListIncompleteUploads ( string bucketName ) : IEnumerable
bucketName string Bucket to list all incomplepte uploads from
Результат IEnumerable

ListIncompleteUploads() публичный Метод

Lists all incomplete uploads in a given bucket and prefix
public ListIncompleteUploads ( string bucketName, string prefix ) : IEnumerable
bucketName string Bucket to list all incomplepte uploads from
prefix string prefix to list all incomplepte uploads
Результат IEnumerable

ListIncompleteUploads() публичный Метод

Lists all incomplete uploads in a given bucket and prefix recursively
public ListIncompleteUploads ( string bucketName, string prefix, bool recursive ) : IEnumerable
bucketName string Bucket to list all incomplepte uploads from
prefix string prefix to list all incomplepte uploads
recursive bool option to list incomplete uploads recursively
Результат IEnumerable

ListObjects() публичный Метод

List all objects in a bucket
public ListObjects ( string bucketName ) : IEnumerable
bucketName string Bucket to list objects from
Результат IEnumerable

ListObjects() публичный Метод

List all objects in a bucket with a given prefix
public ListObjects ( string bucketName, string prefix ) : IEnumerable
bucketName string Bucket to list objects from
prefix string Filters all objects not beginning with a given prefix
Результат IEnumerable

ListObjects() публичный Метод

List all objects non-recursively in a bucket with a given prefix, optionally emulating a directory
public ListObjects ( string bucketName, string prefix, bool recursive ) : IEnumerable
bucketName string Bucket to list objects from
prefix string Filters all objects not beginning with a given prefix
recursive bool Set to false to emulate a directory
Результат IEnumerable

MakeBucket() публичный Метод

Create a private bucket with a give name.
public MakeBucket ( string bucketName ) : void
bucketName string Name of the new bucket
Результат void

MakeBucket() публичный Метод

Create a bucket with a given name and location.
public MakeBucket ( string bucketName, string location ) : void
bucketName string Name of the new bucket
location string Name of the location
Результат void

MinioClient() публичный Метод

Creates and returns an Cloud Storage client.
public MinioClient ( Uri uri ) : System
uri System.Uri Location of the server, supports HTTP and HTTPS.
Результат System

MinioClient() публичный Метод

public MinioClient ( Uri uri, string accessKey, string secretKey ) : System
uri System.Uri
accessKey string
secretKey string
Результат System

MinioClient() публичный Метод

Creates and returns an Cloud Storage client
public MinioClient ( string endpoint ) : System
endpoint string
Результат System

MinioClient() публичный Метод

public MinioClient ( string endpoint, int port, string accessKey, string secretKey ) : System
endpoint string
port int
accessKey string
secretKey string
Результат System

MinioClient() публичный Метод

Creates and returns an Cloud Storage client
public MinioClient ( string endpoint, int port, string accessKey, string secretKey, bool secure ) : System
endpoint string
port int
accessKey string Access Key for authenticated requests
secretKey string Secret Key for authenticated requests
secure bool Boolean value set to true/false makes the request HTTPS/HTTP respectively
Результат System

MinioClient() публичный Метод

Creates and returns an Cloud Storage client
public MinioClient ( string url, string accessKey, string secretKey ) : System
url string Location of the server, supports HTTP and HTTPS
accessKey string Access Key for authenticated requests
secretKey string Secret Key for authenticated requests
Результат System

MinioClient() публичный Метод

public MinioClient ( string endpoint, string accessKey, string secretKey, bool secure ) : System
endpoint string
accessKey string
secretKey string
secure bool
Результат System

PresignedGetObject() публичный Метод

Presigned Get url.
public PresignedGetObject ( string bucketName, string objectName, int expiresInt ) : string
bucketName string Bucket to retrieve object from
objectName string Key of object to retrieve
expiresInt int Expiration time in seconds
Результат string

PresignedPostPolicy() публичный Метод

Presigned post policy
public PresignedPostPolicy ( PostPolicy policy ) : string>.Dictionary
policy PostPolicy
Результат string>.Dictionary

PresignedPutObject() публичный Метод

Presigned Put url.
public PresignedPutObject ( string bucketName, string objectName, int expiresInt ) : string
bucketName string Bucket to retrieve object from
objectName string Key of object to retrieve
expiresInt int Expiration time in seconds
Результат string

PutObject() публичный Метод

Creates an object
public PutObject ( string bucketName, string objectName, Stream data, long size, string contentType ) : void
bucketName string Bucket to create object in
objectName string Key of the new object
data Stream Stream of bytes to send
size long Total size of bytes to be written, must match with data's length
contentType string Content type of the new object, null defaults to "application/octet-stream"
Результат void

RemoveBucket() публичный Метод

Remove a bucket
public RemoveBucket ( string bucketName ) : void
bucketName string Name of bucket to remove
Результат void

RemoveIncompleteUpload() публичный Метод

Remove incomplete uploads from a given bucket and objectName
public RemoveIncompleteUpload ( string bucketName, string objectName ) : void
bucketName string Bucket to remove incomplete uploads from
objectName string Key to remove incomplete uploads from
Результат void

RemoveObject() публичный Метод

Remove an object
public RemoveObject ( string bucketName, string objectName ) : void
bucketName string Name of bucket to remove
objectName string Name of object to remove
Результат void

SetAppInfo() публичный Метод

public SetAppInfo ( string appName, string appVersion ) : void
appName string
appVersion string
Результат void

StatObject() публичный Метод

Tests the object's existence and returns metadata about existing objects.
public StatObject ( string bucketName, string objectName ) : ObjectStat
bucketName string Bucket to test object in
objectName string Name of the object to stat
Результат ObjectStat