Giter Site home page Giter Site logo

kmamiya / sakura_object_storage_ruby Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 35 KB

The Ruby Plugin for Sakura Cloud Object Storage access.

Home Page: http://logicalrabbit.jp/sakura-object-storage

License: MIT License

Ruby 99.24% Shell 0.76%
sakura-cloud ruby

sakura_object_storage_ruby's Introduction

SakuraObjectStorage

The Ruby Plugin for Sakura Cloud Object Storage access.

  • Not Amazon S3 compartible, writing for only Sakura Cloud Object storage.
  • Support the following functions.
    1. get object list. (GET /)
    2. get an object. (GET with object_name)
    3. put an object. (PUT)
    4. delete an object. (DELETE)
    5. get only an object-information. (HEAD, get only ETag and LastModified.)
  • NOT support the following function.
    1. multipart uploading for large object (over 4GiB) ... It is need?? ( I don't need, maybe. )

Usage

  1. Create a bucket on your Sakura Cloud Object storage.
  2. Keep API-Key and API-Secret-Key.
require 'sakura_object_storage'

instance = SakuraObjectStorage::Storage.new( bucket_name, api_key, api_secret_key )

# Create an object.
body = 'object contents.'
instance.put_object('object name', body, body.size)

# Get list
list = instance.get_object_list()[:contents]

# Get an object 
obj = instance.get_object('object name')

# Get an information of object
info = instance.get_object_info('object name')
etag = info['etag']
last_modified = info['last-modified']

# Delete an object
instance.delete_object('object name')

Installation

Add this line to your application's Gemfile:

gem 'sakura_object_storage', git: 'https://github.com/kmamiya/sakura_object_storage_ruby.git'

And then execute:

$ bundle

Support page (Japanese)

http://logicalrabbit.jp/sakura-object-storage

License

The gem is available as open source under the terms of the MIT License.

sakura_object_storage_ruby's People

Contributors

kmamiya avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.