GitXplorerGitXplorer
Q

go-radosgw

public
58 stars
35 forks
0 issues

Commits

List of commits on branch master.
Verified
4699dc7248c7f0f685420e68e13c55486942aff6

Merge pull request #12 from OpenSource-THG/fix/unsuspending-user

QQuentinPerez committed 2 years ago
Unverified
94d8db6bd939eb25895b5a397f688ddbcb44d4fd

Add option for unsuspending user

eemilmaruszczak committed 2 years ago
Verified
be4ca6e14760d4284885c7cf58b987bdf36aa6df

Merge pull request #11 from mfatemipour/modify-Stats-struct

QQuentinPerez committed 3 years ago
Unverified
724abb4d8df7b5513536aee193bd467a6eab221c

Modify Status struct and add NumShards and PlacementRule fields

committed 3 years ago
Verified
ef2be6928c417bf2acef89c1d9ebaf6006bf7c12

Merge pull request #10 from neozocloud/fix-time-formatting

QQuentinPerez committed 3 years ago
Unverified
9bdee6a7a65ca22fe186fb31f18b3392bfd1db34

fix formatting for optional date for UsageConfig (needs two digits)

bbirnemeier committed 3 years ago

README

The README file for this repository.

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