Git Product home page Git Product logo

selectel's Introduction

Selectel

Selectel api

    Language  Files   Code  Comment  Blank  Total
          Go     12   2554      155    157   2866
    Markdown      1     82        0     25     98

  Assertions: ~747
  Integrational tests included

Build Status Coverage Status GoDoc Documentation Status Go Walker

Selectel Storage API

Installation

go get github.com/ernado/selectel/storage

Example

package main

import (
	"fmt"
	"github.com/ernado/selectel/storage"
	"log"
)

const (
	user = "123456"
	key  = "password"
)

func main() {
	api, err := storage.New(user, key)
	if err != nil {
		log.Fatal(err)
	}

	info := api.Info()
	fmt.Printf("Used %d bytes\n", info.BytesUsed)

	containers, _ := api.Containers()
	fmt.Printf("You have %d containers\n", len(containers))

	for _, container := range containers {
		objects, _ := container.Objects()
		fmt.Printf("Container %s has %d objects\n", container.Name(), len(objects))
	}
}

Selectel Storage console client

Installation

Gobuild Download

go get github.com/ernado/selectel/storage/selctl	

Usage

$ selctl -h

Usage:
  selctl [options...] <command> [arg...]

Selectel storage command line client

Options:
  --cache             # cache credentials in file (SELECTEL_CACHE)
  --cache.secure      # encrypt/decrypt token with user-key pair
  -c, --container=""  # default container (SELECTEL_CONTAINER)
  --debug             # debug mode
  -h, --help          # show help and exit
  -k, --key=""        # selectel storage key (SELECTEL_KEY)
  -u, --user=""       # selectel storage user (SELECTEL_USER)
  -v, --version       # show version and exit

Commands:
  upload       upload object to container
  download     download object from container
  create       create container
  remove       remove object or container
  info         print information about storage/container/object
  list         list objects in container/storage

$ selctl info cydev main.go
# {Size:304 ContentType:application/octet-stream Downloaded:0
# Hash:f9126007fe5ac982caa9b86ad06158a9 
# LastModifiedStr: LastModified:2014-09-21 00:39:25 +0000 GMT 
# Name:main.go}

selectel's People

Contributors

ernado avatar pelenthium avatar

Watchers

 avatar  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.