Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- type StorageClient
- func (client *StorageClient) DELETE() (storageResp StorageResponse, err error)
- func (client *StorageClient) GET() (storageResp StorageResponse, err error)
- func (client *StorageClient) GetBody(data interface{}) (interface{}, error)
- func (client *StorageClient) GetURL() string
- func (client *StorageClient) ListClusterResource() (data []interface{}, err error)
- func (client *StorageClient) ListNamespaceResource() (data []interface{}, err error)
- func (client *StorageClient) NewRequest() (*gorequest.SuperAgent, error)
- func (client *StorageClient) PUT(data interface{}) (storageResp StorageResponse, err error)
- type StorageRequestBody
- type StorageResponse
Constants ¶
View Source
const ( // bcsstorage/v1/k8s/dynamic/namespace_resources/clusters/{clusterId}/namespaces/{namespace}/{resourceType}/{resourceName} NamespaceScopeURLFmt = "%s/bcsstorage/v1/k8s/dynamic/namespace_resources/clusters/%s/namespaces/%s/%s/%s" // bcsstorage/v1/k8s/dynamic/namespace_resources/clusters/{clusterId}/namespaces/{namespace}/{resourceType} ListNamespaceScopeURLFmt = "%s/bcsstorage/v1/k8s/dynamic/namespace_resources/clusters/%s/namespaces/%s/%s" // bcsstorage/v1/k8s/dynamic/cluster_resources/clusters/{clusterId}/{resourceType}/{resourceName} ClusterScopeURLFmt = "%s/bcsstorage/v1/k8s/dynamic/cluster_resources/clusters/%s/%s/%s" // bcsstorage/v1/k8s/dynamic/cluster_resources/clusters/{clusterId}/{resourceType} ListClusterScopeURLFmt = "%s/bcsstorage/v1/k8s/dynamic/cluster_resources/clusters/%s/%s" // event url EventScopeURLFmt = "%s/bcsstorage/v1/events" // request timeout StorageRequestTimeoutSeconds = 2 // bcsstorage/v1/k8s/watch/clusters/{clusterId}/namespaces/{namespace}/{resourceType}/{resourceName} NamespaceScopeWatchURLFmt = "%s/bcsstorage/v1/k8s/watch/clusters/%s/namespaces/%s/%s/%s" )
Variables ¶
View Source
var WatchKindSet = map[string]struct{}{
"ExportService": {},
}
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // GetURL returns target url. GetURL() // GET is http restfull GET method. GET() // DELETE is http restfull DELETE method. DELETE() // PUT is http restfull PUT method. PUT() }
Client is http client for inner services.
type StorageClient ¶
type StorageClient struct { HTTPClientConfig *bcs.HTTPClientConfig ClusterID string Namespace string ResourceType string ResourceName string }
func (*StorageClient) DELETE ¶
func (client *StorageClient) DELETE() (storageResp StorageResponse, err error)
func (*StorageClient) GET ¶
func (client *StorageClient) GET() (storageResp StorageResponse, err error)
func (*StorageClient) GetBody ¶
func (client *StorageClient) GetBody(data interface{}) (interface{}, error)
func (*StorageClient) GetURL ¶
func (client *StorageClient) GetURL() string
func (*StorageClient) ListClusterResource ¶
func (client *StorageClient) ListClusterResource() (data []interface{}, err error)
func (*StorageClient) ListNamespaceResource ¶
func (client *StorageClient) ListNamespaceResource() (data []interface{}, err error)
func (*StorageClient) NewRequest ¶
func (client *StorageClient) NewRequest() (*gorequest.SuperAgent, error)
func (*StorageClient) PUT ¶
func (client *StorageClient) PUT(data interface{}) (storageResp StorageResponse, err error)
type StorageRequestBody ¶
type StorageRequestBody struct {
Data interface{} `json:"data"`
}
type StorageResponse ¶
Click to show internal directories.
Click to hide internal directories.