Documentation ¶
Index ¶
- func GetValues(i interface{}) url.Values
- type API
- func (api *API) CreateUser(user User) (*User, error)
- func (api *API) GetBucketPolicy(bucket string) (*Policy, error)
- func (api *API) GetQuota(quota Quota, param string) (*Quota, error)
- func (api *API) GetUsage(usage Usage) (*Usage, error)
- func (api *API) GetUser(user User) (*User, error)
- func (api *API) GetUsers() (*[]string, error)
- func (api *API) InfoBucket(bucket string) (*Bucket, error)
- func (api *API) ListBuckets() ([]string, error)
- func (api *API) ModifyUser(user User) (*User, error)
- func (api *API) Query(method, param string, args url.Values) (body []byte, err error)
- func (api *API) RemoveUser(user User) error
- func (api *API) SetQuota(quota Quota, param string) (*Quota, error)
- func (api *API) TrimUsage(usage Usage) error
- type Bucket
- type Cap
- type Key
- type Policy
- type Quota
- type Usage
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API struct for New Client
func (*API) CreateUser ¶
CreateUser - http://docs.ceph.com/docs/mimic/radosgw/adminops/#create-user
func (*API) GetBucketPolicy ¶
GetBucketPolicy - http://docs.ceph.com/docs/mimic/radosgw/adminops/#get-bucket-or-object-policy
func (*API) GetUsage ¶
GetUsage - http://docs.ceph.com/docs/mimic/radosgw/adminops/#get-usage
func (*API) GetUser ¶
GetUser - http://docs.ceph.com/docs/mimic/radosgw/adminops/#get-user-info
func (*API) InfoBucket ¶
InfoBucket - http://docs.ceph.com/docs/mimic/radosgw/adminops/#get-bucket-info
func (*API) ListBuckets ¶
ListBuckets - http://docs.ceph.com/docs/mimic/radosgw/adminops/#get-bucket-info
func (*API) ModifyUser ¶
ModifyUser - http://docs.ceph.com/docs/mimic/radosgw/adminops/#modify-user
func (*API) RemoveUser ¶
RemoveUser - http://docs.ceph.com/docs/mimic/radosgw/adminops/#remove-user
type Bucket ¶
type Bucket struct { Bucket string `json:"bucket" url:"bucket"` Zonegroup string `json:"zonegroup"` PlacementRule string `json:"placement_rule"` ExplicitPlacement struct { DataPool string `json:"data_pool"` DataExtraPool string `json:"data_extra_pool"` IndexPool string `json:"index_pool"` } `json:"explicit_placement"` ID string `json:"id"` Marker string `json:"marker"` IndexType string `json:"index_type"` Owner string `json:"owner"` Ver string `json:"ver"` MasterVer string `json:"master_ver"` Mtime string `json:"mtime"` MaxMarker string `json:"max_marker"` Usage struct { RgwMain struct { Size uint64 `json:"size"` SizeActual uint64 `json:"size_actual"` SizeUtilized uint64 `json:"size_utilized"` SizeKb uint64 `json:"size_kb"` SizeKbActual uint64 `json:"size_kb_actual"` SizeKbUtilized uint64 `json:"size_kb_utilized"` NumObjects uint64 `json:"num_objects"` } `json:"rgw.main"` RgwMultimeta struct { Size uint64 `json:"size"` SizeActual uint64 `json:"size_actual"` SizeUtilized uint64 `json:"size_utilized"` SizeKb uint64 `json:"size_kb"` SizeKbActual uint64 `json:"size_kb_actual"` SizeKbUtilized uint64 `json:"size_kb_utilized"` NumObjects uint64 `json:"num_objects"` } `json:"rgw.multimeta"` } `json:"usage"` BucketQuota struct { Enabled *bool `json:"enabled"` CheckOnRaw bool `json:"check_on_raw"` MaxSize *uint64 `json:"max_size"` MaxSizeKb *uint64 `json:"max_size_kb"` MaxObjects *uint64 `json:"max_objects"` } `json:"bucket_quota"` Police bool `url:"policy"` }
Bucket struct
type Key ¶
type Key struct { User string `json:"user"` AccessKey string `json:"access_key" url:"access-key"` SecretKey string `json:"secret_key" url:"secret-key"` }
Key struct
type Policy ¶
type Policy struct { ACL struct { ACLUserMap []struct { User string `json:"user"` ACL int `json:"acl"` } `json:"acl_user_map"` ACLGroupMap []interface{} `json:"acl_group_map"` GrantMap []struct { ID string `json:"id"` Grant struct { Type struct { Type int `json:"type"` } `json:"type"` ID string `json:"id"` Email string `json:"email"` Permission struct { Flags int `json:"flags"` } `json:"permission"` Name string `json:"name"` Group int `json:"group"` URLSpec string `json:"url_spec"` } `json:"grant"` } `json:"grant_map"` } `json:"acl"` Owner struct { ID string `json:"id"` DisplayName string `json:"display_name"` } `json:"owner"` }
Policy struct
type Quota ¶
type Quota struct { UID string `json:"user_id" url:"uid"` QuotaType string `url:"quota-type"` Enabled *bool `json:"enabled" url:"quota,enabled"` CheckOnRaw bool `json:"check_on_raw"` MaxSize *uint64 `json:"max_size" url:"max-size"` MaxSizeKb *uint64 `json:"max_size_kb" url:"max-size-kb"` MaxObjects *uint64 `json:"max_objects" url:"max-objects"` Bucket string `json:"bucket" url:"bucket"` }
Quota struct
type Usage ¶
type Usage struct { Entries []struct { User string `json:"user"` Buckets []struct { Bucket string `json:"bucket"` Time string `json:"time"` Epoch uint64 `json:"epoch"` Owner string `json:"owner"` Categories []struct { Category string `json:"category"` BytesSent uint64 `json:"bytes_sent"` BytesReceived uint64 `json:"bytes_received"` Ops uint64 `json:"ops"` SuccessfulOps uint64 `json:"successful_ops"` } `json:"categories"` } `json:"buckets"` } `json:"entries"` Summary []struct { User string `json:"user"` Categories []struct { Category string `json:"category"` BytesSent uint64 `json:"bytes_sent"` BytesReceived uint64 `json:"bytes_received"` Ops uint64 `json:"ops"` SuccessfulOps uint64 `json:"successful_ops"` } `json:"categories"` Total struct { BytesSent uint64 `json:"bytes_sent"` BytesReceived uint64 `json:"bytes_received"` Ops uint64 `json:"ops"` SuccessfulOps uint64 `json:"successful_ops"` } `json:"total"` } `json:"summary"` Start string `url:"start"` //Example: 2012-09-25 16:00:00 End string `url:"end"` ShowEntries *bool `url:"show-entries"` ShowSummary *bool `url:"show-summary"` RemoveAll *bool `url:"remove-all"` //true }
Usage struct
type User ¶
type User struct { Tenant string `json:"tenant,omitempty" url:"tenant"` UID string `json:"user_id" url:"uid"` DisplayName string `json:"display_name" url:"display-name"` Email string `json:"email" url:"email"` Suspended *int `json:"suspended" url:"suspended"` MaxBuckets *int `json:"max_buckets" url:"max-buckets"` Subusers []interface{} `json:"subusers"` Keys []Key `json:"keys"` SwiftKeys []interface{} `json:"swift_keys"` Caps []Cap `json:"caps"` PurgeData *int `url:"purge-data"` GenerateKey *bool `url:"generate-key"` }
User struct