Skip to content

Go client for Conoha Object Storage Service (OpenStack Swift) API

License

Notifications You must be signed in to change notification settings

pdevty/conohaswift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

conohaswift GoDoc

Go client for the Conoha Object Storage Service (OpenStack Swift) API

Installation

execute:

$ go get github.com/pdevty/conohaswift

Usage

package main

import (
	"github.com/pdevty/conohaswift"
)

func main() {
	// new client
	client, err := conohaswift.NewClient("./conohaswift.tml")
	if err != nil {
		panic(err)
	}
	// account quota 100GB
	_, err := client.SetAccountQuota("100")
	if err != nil {
		panic(err)
	}
	// create container
	_, err := client.CreateContainer("container1")
	if err != nil {
		panic(err)
	}
	// object upload
	_, err := client.ObjectUpload("container1","object1")
	if err != nil {
		panic(err)
	}
}

Configuration

conohaswift.toml

user_name = "12345"
password = "*****"
tenant_id = "12345"
region   = "tyo1"

Refer to godoc for more infomation.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

Go client for Conoha Object Storage Service (OpenStack Swift) API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages