FLUTTER ECOSYSTEM

nbspou/dospace

DigitalOcean Spaces API와 상호 작용하기 위한 Dart 클라이언트 라이브러리. Amazon AWS S3와 동일한 API.

dospace 프로젝트 이미지
Stars
13
Forks
52
최근 푸시(UTC)
2023. 9. 13.
프로젝트 상태
활성
Polyverse OÜ GitHub avatar
GITHUB Organization

Polyverse OÜ ↗

Useful libraries and tools we are creating and use in our projects. Maintenance forks of libraries we use.

언어Dart

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 6 개

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

DOSpace

Client library to interact with the DigitalOcean Spaces API.

Usage

A simple usage example:

import 'dart:async';
import 'package:dospace/dospace.dart' as dospace;

main() async {
  dospace.Spaces spaces = new dospace.Spaces(
    region: "nyc3",
    accessKey: "7Q7GAFJ4IXHQVLBRXSRX",
    secretKey: "2JLXa9RqPwpavBkC7dt1MHWUDfd6onaXTXTfSYc5eQ0",
  );
  for (String name in await spaces.listAllBuckets()) {
    print('bucket: ${name}');
    dospace.Bucket bucket = spaces.bucket(name);
    await for (dospace.BucketContent content in bucket.listContents(maxKeys: 3)) {
       print('key: ${content.key}');
    }
  }
  String etag = await spaces.bucket('example').uploadFile(
    'README.md', 'README.md', 'text/plain', dospace.Permissions.public);
  print('upload: $etag');
  await spaces.close();
}

References

  • https://developers.digitalocean.com/documentation/spaces/
  • https://github.com/agilord/aws_client
  • https://github.com/gjersvik/awsdart
  • https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
  • https://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html
  • https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html
  • https://docs.aws.amazon.com/general/latest/gr/signature-v4-test-suite.html