Documentation
¶
Index ¶
- type AccessKeyList
- type AccessKeyPair
- type Bucket
- type BucketSize
- type ItemCountersNet
- type ItemCountersOps
- type ItemKey
- type OStorObjectUsageResponse
- type OStorResponse
- type Ostor
- func (o *Ostor) CreateUser(email string) (*OstorCreateUserResponse, *resty.Response, error)
- func (o *Ostor) DeleteUser(email string) (*resty.Response, error)
- func (o *Ostor) GenerateCredentials(email string) (*OstorCreateUserResponse, *resty.Response, error)
- func (o *Ostor) GetBuckets(email string) (*OstorBucketListResponse, *resty.Response, error)
- func (o *Ostor) GetUser(email string) (*OstorUser, *resty.Response, error)
- func (o *Ostor) GetUserLimits(email string) (*OstorUserLimits, *resty.Response, error)
- func (o *Ostor) List(after *string) (*OStorResponse, *resty.Response, error)
- func (o *Ostor) ListUsers(usage bool) (*OstorUsersListResponse, *resty.Response, error)
- func (o *Ostor) LockUnlockUser(email string, lock bool) (*resty.Response, error)
- func (o *Ostor) ObjectUsage(object string) (*OStorObjectUsageResponse, *resty.Response, error)
- func (o *Ostor) RevokeKey(email, accessKeyID string) (*resty.Response, error)
- func (o *Ostor) RotateKey(email, accessKeyID string) (*AccessKeyPair, *resty.Response, error)
- type OstorBucketListResponse
- type OstorCreateUserResponse
- type OstorUser
- type OstorUserLimits
- type OstorUsersListResponse
- type UserSpaceStat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessKeyList ¶ added in v0.3.1
type AccessKeyList []AccessKeyPair
type AccessKeyPair ¶ added in v0.4.0
type Bucket ¶ added in v0.4.0
type Bucket struct { Name string `json:"name"` Epoch int `json:"epoc"` CreatedAt string `json:"creation_date"` OwnerID string `json:"owner_id"` Size BucketSize `json:"size"` }
type BucketSize ¶ added in v0.4.0
type ItemCountersNet ¶
type ItemCountersOps ¶
type OStorObjectUsageResponse ¶
type OStorObjectUsageResponse struct { // probably an API version of some kind Version int `json:"fmt_version"` // volume ID (ostor-ctl get-config) ServiceID string `json:"service_id"` // start time of the object you are looking at StartTS int64 `json:"start_ts"` // sample interval of the object (usually ~30 seconds) Period int `json:"period"` // number of items in the response Count int `json:"nr_items"` // the actual items Items []struct { Key ItemKey `json:"key"` Counters struct { Operations ItemCountersOps `json:"ops"` Net ItemCountersNet `json:"net_io"` } `json:"counters"` } `json:"items"` }
type OStorResponse ¶
type Ostor ¶
type Ostor struct {
// contains filtered or unexported fields
}
func (*Ostor) CreateUser ¶ added in v0.2.0
func (o *Ostor) CreateUser(email string) (*OstorCreateUserResponse, *resty.Response, error)
func (*Ostor) DeleteUser ¶ added in v0.7.0
func (*Ostor) GenerateCredentials ¶
func (o *Ostor) GenerateCredentials(email string) (*OstorCreateUserResponse, *resty.Response, error)
func (*Ostor) GetBuckets ¶
func (o *Ostor) GetBuckets(email string) (*OstorBucketListResponse, *resty.Response, error)
func (*Ostor) GetUserLimits ¶ added in v0.5.0
func (o *Ostor) GetUserLimits(email string) (*OstorUserLimits, *resty.Response, error)
func (*Ostor) ListUsers ¶
func (o *Ostor) ListUsers(usage bool) (*OstorUsersListResponse, *resty.Response, error)
func (*Ostor) LockUnlockUser ¶ added in v0.3.1
func (*Ostor) ObjectUsage ¶
func (o *Ostor) ObjectUsage(object string) (*OStorObjectUsageResponse, *resty.Response, error)
func (*Ostor) RotateKey ¶ added in v0.6.0
func (o *Ostor) RotateKey(email, accessKeyID string) (*AccessKeyPair, *resty.Response, error)
RotateKey attempts to rotate the accessKeyID for the given user (email).
This feature is not a native feature in the APIs, so we build around it using our own methods, by checking the user account and verifying what can happen.
type OstorBucketListResponse ¶
type OstorBucketListResponse struct {
Buckets []Bucket `json:"Buckets"`
}
type OstorCreateUserResponse ¶ added in v0.3.1
type OstorCreateUserResponse struct { Email string `json:"UserEmail"` ID string `json:"UserId"` AccessKeys AccessKeyList `json:"AWSAccessKeys"` }
type OstorUser ¶
type OstorUser struct { Email string `json:"UserEmail"` ID string `json:"UserId"` State string `json:"State"` Owner string `json:"OwnerId"` Flags []string `json:"Flags"` AccessKeys AccessKeyList `json:"AWSAccessKeys,omitempty"` AccountCount string `json:"AccountCount,omitempty"` Accounts []interface{} `json:"Accounts,omitempty"` Space *UserSpaceStat `json:"SpaceStat,omitempty"` }
type OstorUserLimits ¶ added in v0.5.0
type OstorUserLimits struct { OpsDefault string `json:"ops:default"` OpsGet string `json:"ops:get"` OpsPut string `json:"ops:put"` OpsList string `json:"ops:list"` OpsDelete string `json:"ops:delete"` BandwidthOut string `json:"bandwidth:out"` }
limits in ops/second bandwidth in kb/second
type OstorUsersListResponse ¶
type OstorUsersListResponse struct {
Users []OstorUser `json:"users"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.