Documentation ¶
Overview ¶
Copyright 2016 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2016 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2016 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2016 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2016 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2016 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2016 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func GetRestURL(endPoint string) string
- func IsHttpAccepted(err error) bool
- func IsHttpNotFound(err error) bool
- func IsHttpStatusCode(err error, statusCode int) bool
- type RookNetworkRestClient
- func (c *RookNetworkRestClient) CreateBlockImage(newImage model.BlockImage) (string, error)
- func (c *RookNetworkRestClient) CreateFilesystem(newFilesystem model.FilesystemRequest) (string, error)
- func (c *RookNetworkRestClient) CreateObjectStore() (string, error)
- func (c *RookNetworkRestClient) CreateObjectUser(user model.ObjectUser) (*model.ObjectUser, error)
- func (c *RookNetworkRestClient) CreatePool(newPool model.Pool) (string, error)
- func (c *RookNetworkRestClient) DeleteBlockImage(image model.BlockImage) (string, error)
- func (c *RookNetworkRestClient) DeleteFilesystem(deleteFilesystem model.FilesystemRequest) (string, error)
- func (c *RookNetworkRestClient) DeleteObjectUser(id string) error
- func (a *RookNetworkRestClient) Do(method, query string, body io.Reader) ([]byte, error)
- func (a *RookNetworkRestClient) DoDelete(query string) ([]byte, error)
- func (a *RookNetworkRestClient) DoGet(query string) ([]byte, error)
- func (a *RookNetworkRestClient) DoPost(query string, body io.Reader) ([]byte, error)
- func (a *RookNetworkRestClient) DoPut(query string, body io.Reader) ([]byte, error)
- func (c *RookNetworkRestClient) GetBlockImages() ([]model.BlockImage, error)
- func (c *RookNetworkRestClient) GetClientAccessInfo() (model.ClientAccessInfo, error)
- func (c *RookNetworkRestClient) GetFilesystems() ([]model.Filesystem, error)
- func (a *RookNetworkRestClient) GetNodes() ([]model.Node, error)
- func (c *RookNetworkRestClient) GetObjectStoreConnectionInfo() (*model.ObjectStoreConnectInfo, error)
- func (c *RookNetworkRestClient) GetObjectUser(id string) (*model.ObjectUser, error)
- func (c *RookNetworkRestClient) GetPools() ([]model.Pool, error)
- func (a *RookNetworkRestClient) GetStatusDetails() (model.StatusDetails, error)
- func (c *RookNetworkRestClient) ListBuckets() ([]model.ObjectBucket, error)
- func (c *RookNetworkRestClient) ListObjectUsers() ([]model.ObjectUser, error)
- func (a *RookNetworkRestClient) URL() string
- func (c *RookNetworkRestClient) UpdateObjectUser(user model.ObjectUser) (*model.ObjectUser, error)
- type RookRestClient
- type RookRestError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRestURL ¶
func IsHttpAccepted ¶ added in v0.1.1
func IsHttpNotFound ¶ added in v0.2.0
func IsHttpStatusCode ¶ added in v0.2.0
Types ¶
type RookNetworkRestClient ¶
func NewRookNetworkRestClient ¶
func NewRookNetworkRestClient(url string, httpClient *http.Client) *RookNetworkRestClient
func (*RookNetworkRestClient) CreateBlockImage ¶
func (c *RookNetworkRestClient) CreateBlockImage(newImage model.BlockImage) (string, error)
func (*RookNetworkRestClient) CreateFilesystem ¶ added in v0.1.1
func (c *RookNetworkRestClient) CreateFilesystem(newFilesystem model.FilesystemRequest) (string, error)
func (*RookNetworkRestClient) CreateObjectStore ¶ added in v0.2.0
func (c *RookNetworkRestClient) CreateObjectStore() (string, error)
func (*RookNetworkRestClient) CreateObjectUser ¶ added in v0.3.0
func (c *RookNetworkRestClient) CreateObjectUser(user model.ObjectUser) (*model.ObjectUser, error)
func (*RookNetworkRestClient) CreatePool ¶
func (c *RookNetworkRestClient) CreatePool(newPool model.Pool) (string, error)
func (*RookNetworkRestClient) DeleteBlockImage ¶ added in v0.3.1
func (c *RookNetworkRestClient) DeleteBlockImage(image model.BlockImage) (string, error)
func (*RookNetworkRestClient) DeleteFilesystem ¶ added in v0.1.1
func (c *RookNetworkRestClient) DeleteFilesystem(deleteFilesystem model.FilesystemRequest) (string, error)
func (*RookNetworkRestClient) DeleteObjectUser ¶ added in v0.3.0
func (c *RookNetworkRestClient) DeleteObjectUser(id string) error
func (*RookNetworkRestClient) DoDelete ¶ added in v0.3.0
func (a *RookNetworkRestClient) DoDelete(query string) ([]byte, error)
func (*RookNetworkRestClient) DoGet ¶
func (a *RookNetworkRestClient) DoGet(query string) ([]byte, error)
func (*RookNetworkRestClient) GetBlockImages ¶
func (c *RookNetworkRestClient) GetBlockImages() ([]model.BlockImage, error)
func (*RookNetworkRestClient) GetClientAccessInfo ¶ added in v0.1.1
func (c *RookNetworkRestClient) GetClientAccessInfo() (model.ClientAccessInfo, error)
func (*RookNetworkRestClient) GetFilesystems ¶ added in v0.1.1
func (c *RookNetworkRestClient) GetFilesystems() ([]model.Filesystem, error)
func (*RookNetworkRestClient) GetNodes ¶
func (a *RookNetworkRestClient) GetNodes() ([]model.Node, error)
func (*RookNetworkRestClient) GetObjectStoreConnectionInfo ¶ added in v0.2.0
func (c *RookNetworkRestClient) GetObjectStoreConnectionInfo() (*model.ObjectStoreConnectInfo, error)
func (*RookNetworkRestClient) GetObjectUser ¶ added in v0.3.0
func (c *RookNetworkRestClient) GetObjectUser(id string) (*model.ObjectUser, error)
func (*RookNetworkRestClient) GetPools ¶
func (c *RookNetworkRestClient) GetPools() ([]model.Pool, error)
func (*RookNetworkRestClient) GetStatusDetails ¶
func (a *RookNetworkRestClient) GetStatusDetails() (model.StatusDetails, error)
func (*RookNetworkRestClient) ListBuckets ¶ added in v0.3.0
func (c *RookNetworkRestClient) ListBuckets() ([]model.ObjectBucket, error)
func (*RookNetworkRestClient) ListObjectUsers ¶ added in v0.3.0
func (c *RookNetworkRestClient) ListObjectUsers() ([]model.ObjectUser, error)
func (*RookNetworkRestClient) URL ¶
func (a *RookNetworkRestClient) URL() string
func (*RookNetworkRestClient) UpdateObjectUser ¶ added in v0.3.0
func (c *RookNetworkRestClient) UpdateObjectUser(user model.ObjectUser) (*model.ObjectUser, error)
type RookRestClient ¶
type RookRestClient interface { URL() string GetNodes() ([]model.Node, error) GetPools() ([]model.Pool, error) CreatePool(pool model.Pool) (string, error) GetBlockImages() ([]model.BlockImage, error) CreateBlockImage(image model.BlockImage) (string, error) DeleteBlockImage(image model.BlockImage) (string, error) GetClientAccessInfo() (model.ClientAccessInfo, error) GetFilesystems() ([]model.Filesystem, error) CreateFilesystem(model.FilesystemRequest) (string, error) DeleteFilesystem(model.FilesystemRequest) (string, error) GetStatusDetails() (model.StatusDetails, error) CreateObjectStore() (string, error) GetObjectStoreConnectionInfo() (*model.ObjectStoreConnectInfo, error) ListBuckets() ([]model.ObjectBucket, error) ListObjectUsers() ([]model.ObjectUser, error) GetObjectUser(string) (*model.ObjectUser, error) CreateObjectUser(model.ObjectUser) (*model.ObjectUser, error) UpdateObjectUser(model.ObjectUser) (*model.ObjectUser, error) DeleteObjectUser(string) error }
type RookRestError ¶
func (RookRestError) Error ¶
func (e RookRestError) Error() string