Versions in this module Expand all Collapse all v4 v4.6.0 Dec 20, 2024 Changes in this version + const AssociateObjTypeNamespace + const AssociateObjTypeNamespaceGroup + const DefaultParallelCount + const MaxParallelCount + const MinParallelCount + const NamespaceType + type CreateNamespaceParams struct + Capacity int64 + Description string + Name string + ParentId string + WorkLoadTypeId string + func MakeCreateNamespaceParams(params map[string]interface{}) (*CreateNamespaceParams, error) + type Namespace interface + CreateNamespace func(ctx context.Context, params CreateNamespaceParams) (map[string]interface{}, error) + DeleteNamespace func(ctx context.Context, id string) error + ExtendNamespace func(ctx context.Context, namespaceID string, newCapacity int64) error + GetHostNamespaceId func(ctx context.Context, hostID, namespaceID string) (string, error) + GetNamespaceByID func(ctx context.Context, id string) (map[string]interface{}, error) + GetNamespaceByName func(ctx context.Context, name string) (map[string]interface{}, error) + GetNamespaceCountOfHost func(ctx context.Context, hostID string) (int64, error) + GetNamespaceCountOfMapping func(ctx context.Context, mappingID string) (int64, error) + UpdateNamespace func(ctx context.Context, namespaceID string, params map[string]interface{}) error + type NamespaceGroup interface + AddNamespaceToGroup func(ctx context.Context, namespaceID string, groupID string) error + CreateNamespaceGroup func(ctx context.Context, name string) (map[string]interface{}, error) + DeleteNamespaceGroup func(ctx context.Context, id string) error + GetNamespaceGroupByName func(ctx context.Context, name string) (map[string]interface{}, error) + QueryAssociateNamespaceGroup func(ctx context.Context, objType int, objID string) ([]interface{}, error) + RemoveNamespaceFromGroup func(ctx context.Context, namespaceID, groupID string) error + type NewClientConfig struct + BackendID string + CertSecretMeta string + Name string + ParallelNum string + SecretName string + SecretNamespace string + Storage string + Urls []string + UseCert bool + User string + type OceandiskClient struct + func NewClient(ctx context.Context, param *NewClientConfig) (*OceandiskClient, error) + func (cli *OceandiskClient) AddNamespaceToGroup(ctx context.Context, namespaceID string, groupID string) error + func (cli *OceandiskClient) CreateNamespace(ctx context.Context, params CreateNamespaceParams) (map[string]interface{}, error) + func (cli *OceandiskClient) CreateNamespaceGroup(ctx context.Context, name string) (map[string]interface{}, error) + func (cli *OceandiskClient) DeleteNamespace(ctx context.Context, id string) error + func (cli *OceandiskClient) DeleteNamespaceGroup(ctx context.Context, id string) error + func (cli *OceandiskClient) ExtendNamespace(ctx context.Context, namespaceID string, newCapacity int64) error + func (cli *OceandiskClient) GetHostNamespaceId(ctx context.Context, hostID, namespaceID string) (string, error) + func (cli *OceandiskClient) GetNamespaceByID(ctx context.Context, id string) (map[string]interface{}, error) + func (cli *OceandiskClient) GetNamespaceByName(ctx context.Context, name string) (map[string]interface{}, error) + func (cli *OceandiskClient) GetNamespaceCountOfHost(ctx context.Context, hostID string) (int64, error) + func (cli *OceandiskClient) GetNamespaceCountOfMapping(ctx context.Context, mappingID string) (int64, error) + func (cli *OceandiskClient) GetNamespaceGroupByName(ctx context.Context, name string) (map[string]interface{}, error) + func (cli *OceandiskClient) QueryAssociateNamespaceGroup(ctx context.Context, objType int, objID string) ([]interface{}, error) + func (cli *OceandiskClient) RemoveNamespaceFromGroup(ctx context.Context, namespaceID, groupID string) error + func (cli *OceandiskClient) UpdateNamespace(ctx context.Context, namespaceID string, params map[string]interface{}) error + func (cli *OceandiskClient) ValidateLogin(ctx context.Context) error + type OceandiskClientInterface interface + GetBackendID func() string + GetDeviceSN func() string + GetStorageVersion func() string + type RestClient struct + BackendID string + Client base.HTTP + DeviceId string + ReLoginMutex sync.Mutex + RequestSemaphore *utils.Semaphore + SecretName string + SecretNamespace string + Storage string + StorageVersion string + SystemInfoRefreshing uint32 + Token string + Url string + Urls []string + User string + func NewRestClient(ctx context.Context, param *NewClientConfig) (*RestClient, error) + func (cli *RestClient) BaseCall(ctx context.Context, method string, url string, data map[string]interface{}) (base.Response, error) + func (cli *RestClient) Call(ctx context.Context, method string, url string, data map[string]interface{}) (base.Response, error) + func (cli *RestClient) Delete(ctx context.Context, url string, data map[string]interface{}) (base.Response, error) + func (cli *RestClient) Get(ctx context.Context, url string, data map[string]interface{}) (base.Response, error) + func (cli *RestClient) GetBackendID() string + func (cli *RestClient) GetDeviceSN() string + func (cli *RestClient) GetRequest(ctx context.Context, method string, url string, data map[string]interface{}) (*http.Request, error) + func (cli *RestClient) GetStorageVersion() string + func (cli *RestClient) GetSystem(ctx context.Context) (map[string]interface{}, error) + func (cli *RestClient) Login(ctx context.Context) error + func (cli *RestClient) Logout(ctx context.Context) + func (cli *RestClient) Post(ctx context.Context, url string, data map[string]interface{}) (base.Response, error) + func (cli *RestClient) Put(ctx context.Context, url string, data map[string]interface{}) (base.Response, error) + func (cli *RestClient) ReLogin(ctx context.Context) error + func (cli *RestClient) SetSystemInfo(ctx context.Context) error