Git Product home page Git Product logo

go-radosgw's Introduction

Overview

radosgw-admin is a RADOS gateway user administration utility.
It allows operations on user/bucket/quota/capability.

⚠️ This library has been tested with Jewel but it should work with Hammer too.

Operation Implemented Tests
User
Bucket
Capability
Quota

Setup

$> go get github.com/QuentinPerez/go-radosgw/pkg/api

How it works

Ensure you have cluster ceph with a radosgw.

api := radosAPI.New("http://192.168.42.40", "1ZZWD0G5IDP57I0751HE", "3ydvK64eWuWwup0FKtznmf9FDVXhB8jleEFRTH0D")

// create a new user named JohnDoe
user, err := api.CreateUser(radosAPI.UserConfig{
    UID:         "JohnDoe",
    DisplayName: "John Doe",
})
// ...
// remove JohnDoe
err = api.RemoveUser(radosAPI.UserConfig{
    UID: "JohnDoe",
})

API

// New returns an API object to intertact with Admin RadosGW
func New(host, accessKey, secretKey string, adminPrefix ...string) (*API, error) {}

// GetUsage requests bandwidth usage information.
func (api *API) GetUsage(conf UsageConfig) (*Usage, error) {}

// DeleteUsage removes usage information. With no dates specified, removes all usage information
func (api *API) DeleteUsage(conf UsageConfig) error {}

// GetUIDs gets all UIDs.
func (api *API) GetUIDs() ([]string, error) {}

// GetUser gets user information. If no user is specified returns the list of all users along with suspension information
func (api *API) GetUser(uid ...string) (*User, error) {}

// GetUsers get all user information.
func (api *API) GetUsers() ([]*User, error) {}

// CreateUser creates a new user. By Default, a S3 key pair will be created automatically and returned in the response.
func (api *API) CreateUser(conf UserConfig) (*User, error) {}

// UpdateUser modifies a user
func (api *API) UpdateUser(conf UserConfig) (*User, error) {}

// RemoveUser removes an existing user.
func (api *API) RemoveUser(conf UserConfig) error {}

// CreateSubUser creates a new subuser (primarily useful for clients using the Swift API).
func (api *API) CreateSubUser(conf SubUserConfig) (*SubUsers, error) {}

// UpdateSubUser modifies an existing subuser
func (api *API) UpdateSubUser(conf SubUserConfig) (*SubUsers, error) {}

// RemoveSubUser remove an existing subuser
func (api *API) RemoveSubUser(conf SubUserConfig) error {}

// CreateKey creates a new key. If a subuser is specified then by default created keys will be swift type.
func (api *API) CreateKey(conf KeyConfig) (*KeysDefinition, error) {}

// RemoveKey removes an existing key
func (api *API) RemoveKey(conf KeyConfig) error {}

// GetBucket gets information about a subset of the existing buckets.
func (api *API) GetBucket(conf BucketConfig) (Buckets, error) {}

// RemoveBucket removes an existing bucket.
func (api *API) RemoveBucket(conf BucketConfig) error {}

// UnlinkBucket unlinks a bucket from a specified user.
func (api *API) UnlinkBucket(conf BucketConfig) error {}

// CheckBucket checks the index of an existing bucket.
func (api *API) CheckBucket(conf BucketConfig) (string, error) {}

// LinkBucket links a bucket to a specified user, unlinking the bucket from any previous user.
func (api *API) LinkBucket(conf BucketConfig) error {}

// RemoveObject removes an existing object.
func (api *API) RemoveObject(conf BucketConfig) error {}

// GetBucketPolicy reads the bucket policy
func (api *API) GetBucketPolicy(conf BucketConfig) (*Policy, error) {}

// GetObjectPolicy reads the object policy
func (api *API) GetObjectPolicy(conf BucketConfig) (*Policy, error) {}

// GetQuotas returns user's quotas
func (api *API) GetQuotas(conf QuotaConfig) (*Quotas, error) {}

// UpdateQuota updates user's quotas
func (api *API) UpdateQuota(conf QuotaConfig) error {}

// AddCapability returns user's quotas
func (api *API) AddCapability(conf CapConfig) ([]Capability, error) {}

// DelCapability returns user's quotas
func (api *API) DelCapability(conf CapConfig) ([]Capability, error) {}

Changelog

master (unreleased)


Development

Feel free to contribute 😃🍻

Links

License

MIT

go-radosgw's People

Contributors

quentinperez avatar shiningrush avatar antoniohs avatar birnemeier avatar mgorniew avatar mfatemipour avatar bsdelf 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.