### GET /kv Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Lists all available key-value stores and their values. ```APIDOC ## GET /kv ### Description Returns a list of all key-value stores and their associated values. ### Method GET ### Endpoint /kv ### Response #### Success Response (200) - **[]KV** (array) - A list of key-value store objects. ``` -------------------------------- ### Get All Resources Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves all resources for a given resource definition. Supports optional ListOpts for filtering. Requires context, resource name, and optional ListOpts. ```go func (n *ResourceService) GetAll(ctx context.Context, resName string, opts ...*ListOpts) ([]Resource, error) ``` -------------------------------- ### Get All Resource Definitions Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves all resource definitions based on the provided request. Returns a slice of ResourceDefinitionWithVolumeDefinition. ```go func (n *ResourceDefinitionService) GetAll(ctx context.Context, request RDGetAllRequest) ([]ResourceDefinitionWithVolumeDefinition, error) ``` -------------------------------- ### Get All Volume Definitions for Resource Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves all volume definitions for a given resource definition. Optional ListOpts can be provided. ```go func (n *ResourceDefinitionService) GetVolumeDefinitions(ctx context.Context, resDefName string, opts ...*ListOpts) ([]VolumeDefinition, error) ``` -------------------------------- ### Get Resource Definition Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves a specific resource definition by name. Optional ListOpts can be provided. ```go func (n *ResourceDefinitionService) Get(ctx context.Context, resDefName string, opts ...*ListOpts) (ResourceDefinition, error) ``` -------------------------------- ### Get All Storage Pool Definitions Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves all storage pool definitions, with optional list options. ```go func (s *StoragePoolDefinitionService) GetAll(ctx context.Context, opts ...*ListOpts) ([]StoragePoolDefinition, error) ``` -------------------------------- ### Get Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Returns information about a resource-definition. ```APIDOC ## GET /Get ### Description Returns information about a resource-definition. ### Parameters #### Request Body - **resDefName** (string) - Required - Name of the resource definition - **opts** (ListOpts) - Optional - List options ``` -------------------------------- ### Get Property Information Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves meta information about properties configurable on a resource group. ```go func (n *ResourceGroupService) GetPropsInfos(ctx context.Context, opts ...*ListOpts) ([]PropsInfo, error) ``` -------------------------------- ### Get All Remote Services Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves all configured remote services. Optional ListOpts can be provided for filtering. ```go func (r *RemoteService) GetAll(ctx context.Context, opts ...*ListOpts) (RemoteList, error) ``` -------------------------------- ### Get Resource Definition Properties Info Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves property information for resource definitions. Optional ListOpts can be provided. ```go func (n *ResourceDefinitionService) GetPropsInfos(ctx context.Context, opts ...*ListOpts) ([]PropsInfo, error) ``` -------------------------------- ### GET /kv/{kv} Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves a specific key-value store entry. ```APIDOC ## GET /kv/{kv} ### Description Retrieves a specific key-value store entry by its identifier. ### Method GET ### Endpoint /kv/{kv} ### Parameters #### Path Parameters - **kv** (string) - Required - The identifier of the key-value store. ### Response #### Success Response (200) - **KV** (object) - The requested key-value store object. ``` -------------------------------- ### Get Key-Value Pair Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves a specific key-value pair from the store. Requires a context and the key string. ```go func (k *KeyValueStoreService) Get(ctx context.Context, kv string) (*KV, error) ``` -------------------------------- ### Get Storage Pool View Function Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves information about all storage pools in the cluster. Accepts optional ListOpts. ```go func (n *NodeService) GetStoragePoolView(ctx context.Context, opts ...*ListOpts) ([]StoragePool, error) ``` -------------------------------- ### Get Node Properties Info Function Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves meta information about properties that can be set on a node. Accepts optional ListOpts. ```go func (n *NodeService) GetPropsInfos(ctx context.Context, opts ...*ListOpts) ([]PropsInfo, error) ``` -------------------------------- ### Get Resource Information Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves information about a specific resource on a given node. Supports optional ListOpts for filtering. Requires context, resource name, node name, and optional ListOpts. ```go func (n *ResourceService) Get(ctx context.Context, resName, nodeName string, opts ...*ListOpts) (Resource, error) ``` -------------------------------- ### Clone Resource Definition Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Starts a cloning operation for a resource definition and all associated resources using storage-driver optimized methods. ```APIDOC ## POST /resource-definitions/{srcResDef}/clone ### Description Initiates the cloning process for a resource definition. ### Method POST ### Endpoint /resource-definitions/{srcResDef}/clone ### Parameters #### Path Parameters - **srcResDef** (string) - Required - The name of the source resource definition to clone. #### Request Body - **request** (ResourceDefinitionCloneRequest) - Required - Configuration details for the clone operation. ### Response #### Success Response (200) - **status** (ResourceDefinitionCloneStarted) - Information about the started clone operation. ``` -------------------------------- ### Apply Caches to Client Source: https://pkg.go.dev/github.com/LINBIT/golinstor/cache Use WithCaches to set up the provided caches on a client.Client instance. This is a client.Option that can be passed during client initialization. ```go func WithCaches(caches ...Cache) client.Option ``` -------------------------------- ### Get Resource Group Properties Info Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Gets meta information about properties that can be set on a resource group. ```APIDOC ## GET /api/resourcegroups/props ### Description GetPropsInfos gets meta information about the properties that can be set on a resource group. ### Method GET ### Endpoint /api/resourcegroups/props ### Parameters #### Query Parameters - **opts** (*ListOpts) - Optional - Options for listing. ### Response #### Success Response (200) - **[]PropsInfo** - Meta information about resource group properties. #### Response Example ```json { "example": "[]PropsInfo object" } ``` ``` -------------------------------- ### Get Volume Group Properties Info Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Gets meta information about properties that can be set on a volume group within a resource group. ```APIDOC ## GET /api/resourcegroups/{resGrpName}/volumegroups/props ### Description GetVolumeGroupPropsInfos gets meta information about the properties that can be set on a resource group. ### Method GET ### Endpoint /api/resourcegroups/{resGrpName}/volumegroups/props ### Parameters #### Path Parameters - **resGrpName** (string) - Required - The name of the resource group. #### Query Parameters - **opts** (*ListOpts) - Optional - Options for listing. ### Response #### Success Response (200) - **[]PropsInfo** - Meta information about volume group properties. #### Response Example ```json { "example": "[]PropsInfo object" } ``` ``` -------------------------------- ### Initialize LINSTOR Client Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Creates a new LINSTOR client instance. Options provided here override environment variable configurations. ```go func NewClient(options ...Option) (*Client, error) ``` -------------------------------- ### Handle errors in client Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Demonstrates basic error handling patterns for the client. ```go Output: ``` -------------------------------- ### Configure Client Options Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Provides various options to configure the client, such as BaseURL, BasicAuth, BearerToken, Controllers, HTTPClient, Limit, Limiter, Log, and UserAgent. ```go func BaseURL(urls ...*url.URL) Option ``` ```go func BasicAuth(basicauth *BasicAuthCfg) Option ``` ```go func BearerToken(token string) Option ``` ```go func Controllers(controllers []string) Option ``` ```go func HTTPClient(httpClient *http.Client) Option ``` ```go func Limit(r rate.Limit, b int) Option ``` ```go func Limiter(limiter *rate.Limiter) Option ``` ```go func Log(logger interface{}) Option ``` ```go func UserAgent(ua string) Option ``` -------------------------------- ### GET /controller/version Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Queries version information for the controller. ```APIDOC ## GET /controller/version ### Description Queries version information for the controller. ### Method GET ### Endpoint /controller/version ### Parameters #### Query Parameters - **opts** (ListOpts) - Optional - List options for filtering or pagination. ``` -------------------------------- ### Get Storage Pool Properties Info Function Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves meta information about properties that can be set on a storage pool on a particular node. Accepts optional ListOpts. ```go func (n *NodeService) GetStoragePoolPropsInfos(ctx context.Context, nodeName string, opts ...*ListOpts) ([]PropsInfo, error) ``` -------------------------------- ### Get All Resource Groups Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Lists all available resource groups. ```APIDOC ## GET /api/resourcegroups ### Description GetAll lists all resource-groups. ### Method GET ### Endpoint /api/resourcegroups ### Parameters #### Query Parameters - **opts** (*ListOpts) - Optional - Options for listing. ### Response #### Success Response (200) - **[]ResourceGroup** - A list of all resource groups. #### Response Example ```json { "example": "[]ResourceGroup object" } ``` ``` -------------------------------- ### BCache Property Keys Source: https://pkg.go.dev/github.com/LINBIT/golinstor Constants for configuring BCache settings. ```go const KeyBcacheSize = "Size" ``` ```go const KeyBcacheWriteback = "Writeback" ``` ```go const KeyCacheBlockSize = "Blocksize" ``` ```go const KeyCacheCachePoolName = "CachePool" ``` ```go const KeyCacheCacheSize = "Cachesize" ``` ```go const KeyCacheFlushTimeout = "FlushTimeout" ``` ```go const KeyCacheMetaPoolName = "MetaPool" ``` ```go const KeyCacheMetaSize = "Metasize" ``` ```go const KeyCacheOperatingMode = "OpMode" ``` -------------------------------- ### BackupCreate struct Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Defines the parameters required to initiate a new backup operation. ```go type BackupCreate struct { RscName string `json:"rsc_name"` SnapName string `json:"snap_name,omitempty"` NodeName string `json:"node_name,omitempty"` Incremental bool `json:"incremental,omitempty"` } ``` -------------------------------- ### Get Version API Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Queries version information for the controller. ```APIDOC ## GetVersion ### Description Queries version information for the controller. ### Method GET ### Endpoint /version ### Parameters #### Query Parameters - **opts** (*ListOpts) - Optional - Options for listing. ### Response #### Success Response (200) - **ControllerVersion** (ControllerVersion) - The controller version information. #### Response Example ```json { "version": "0.27.0", "git_hash": "abcdef123456", "build_time": "2023-10-27T10:00:00Z", "rest_api_version": "v1" } ``` ``` -------------------------------- ### Get Resource Group Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves information about a specific resource group. ```APIDOC ## GET /api/resourcegroups/{resGrpName} ### Description Get return information about a resource-definition. ### Method GET ### Endpoint /api/resourcegroups/{resGrpName} ### Parameters #### Path Parameters - **resGrpName** (string) - Required - The name of the resource group. #### Query Parameters - **opts** (*ListOpts) - Optional - Options for listing. ### Response #### Success Response (200) - **ResourceGroup** (ResourceGroup) - Information about the resource group. #### Response Example ```json { "example": "ResourceGroup object" } ``` ``` -------------------------------- ### Get Resource Group Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves information about a specific resource definition. ```go func (n *ResourceGroupService) Get(ctx context.Context, resGrpName string, opts ...*ListOpts) (ResourceGroup, error) ``` -------------------------------- ### Create Resource Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Creates a resource on a node. Requires a context and a ResourceCreate object. ```go func (n *ResourceService) Create(ctx context.Context, res ResourceCreate) error ``` -------------------------------- ### GET /remotes Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves a list of all registered remote storage providers. ```APIDOC ## GET /remotes ### Description Returns a list of all registered S3, LINSTOR, and EBS remotes. ### Method GET ### Endpoint /remotes ### Response #### Success Response (200) - **s3_remotes** (array) - List of S3 remotes - **linstor_remotes** (array) - List of LINSTOR remotes - **ebs_remotes** (array) - List of EBS remotes ``` -------------------------------- ### Implement EncryptionService Create Method Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Creates an encryption using the provided passphrase. This method is part of the EncryptionService. ```go func (n *EncryptionService) Create(ctx context.Context, passphrase Passphrase) error ``` -------------------------------- ### Create Snapshot Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Creates a snapshot of a resource. Requires a context and a Snapshot object. ```go func (n *ResourceService) CreateSnapshot(ctx context.Context, snapshot Snapshot) error ``` -------------------------------- ### Get All Volume Groups Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Lists all volume groups for a specific resource group. ```APIDOC ## GET /api/resourcegroups/{resGrpName}/volumegroups ### Description GetVolumeGroups lists all volume-groups for a resource-group. ### Method GET ### Endpoint /api/resourcegroups/{resGrpName}/volumegroups ### Parameters #### Path Parameters - **resGrpName** (string) - Required - The name of the resource group. #### Query Parameters - **opts** (*ListOpts) - Optional - Options for listing. ### Response #### Success Response (200) - **[]VolumeGroup** - A list of all volume groups for the resource group. #### Response Example ```json { "example": "[]VolumeGroup object" } ``` ``` -------------------------------- ### BackupProvider interface Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Defines the core operations for interacting with backup providers. ```go type BackupProvider interface { // GetAll fetches information on all backups stored at the given remote. Optionally limited to the given // resource names. GetAll(ctx context.Context, remoteName string, rscName string, snapName string) (*BackupList, error) // DeleteAll backups that fit the given criteria. DeleteAll(ctx context.Context, remoteName string, filter BackupDeleteOpts) error // Create a new backup operation. Create(ctx context.Context, remoteName string, request BackupCreate) (string, error) // Info retrieves information about a specific backup instance. Info(ctx context.Context, remoteName string, request BackupInfoRequest) (*BackupInfo, error) // Abort all running backup operations of a resource. Abort(ctx context.Context, remoteName string, request BackupAbortRequest) error // Ship ships a backup from one LINSTOR cluster to another. Ship(ctx context.Context, remoteName string, request BackupShipRequest) (string, error) // Restore starts to restore a resource from a backup. Restore(ctx context.Context, remoteName string, request BackupRestoreRequest) error } ``` -------------------------------- ### Get Volume Group Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Lists a specific volume group for a resource group. ```APIDOC ## GET /api/resourcegroups/{resGrpName}/volumegroups/{volNr} ### Description GetVolumeGroup lists a volume-group for a resource-group. ### Method GET ### Endpoint /api/resourcegroups/{resGrpName}/volumegroups/{volNr} ### Parameters #### Path Parameters - **resGrpName** (string) - Required - The name of the resource group. - **volNr** (int) - Required - The number of the volume group. #### Query Parameters - **opts** (*ListOpts) - Optional - Options for listing. ### Response #### Success Response (200) - **VolumeGroup** (VolumeGroup) - Information about the volume group. #### Response Example ```json { "example": "VolumeGroup object" } ``` ``` -------------------------------- ### BackupService Methods Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Methods for performing backup lifecycle operations. ```go func (b *BackupService) Abort(ctx context.Context, remoteName string, request BackupAbortRequest) error ``` ```go func (b *BackupService) Create(ctx context.Context, remoteName string, request BackupCreate) (string, error) ``` ```go func (b *BackupService) DeleteAll(ctx context.Context, remoteName string, filter BackupDeleteOpts) error ``` ```go func (b *BackupService) GetAll(ctx context.Context, remoteName string, rscName string, snapName string) (*BackupList, error) ``` ```go func (b *BackupService) Info(ctx context.Context, remoteName string, request BackupInfoRequest) (*BackupInfo, error) ``` ```go func (b *BackupService) Restore(ctx context.Context, remoteName string, request BackupRestoreRequest) error ``` ```go func (b *BackupService) Ship(ctx context.Context, remoteName string, request BackupShipRequest) (string, error) ``` -------------------------------- ### Get Volume Group Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Lists a specific volume group for a given resource group. ```go func (n *ResourceGroupService) GetVolumeGroup(ctx context.Context, resGrpName string, volNr int, opts ...*ListOpts) (VolumeGroup, error) ``` -------------------------------- ### Configuration Flags Source: https://pkg.go.dev/github.com/LINBIT/golinstor String constants used as configuration flags. ```go const FlagAutoSnapshot = "AUTO_SNAPSHOT" ``` ```go const FlagBackup = "BACKUP" ``` ```go const FlagBackupSource = "BACKUP_SOURCE" ``` ```go const FlagBackupTarget = "BACKUP_TARGET" ``` ```go const FlagClean = "CLEAN" ``` -------------------------------- ### List Key-Value Stores Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Returns the names and values of all key-value stores. Requires a context. ```go func (k *KeyValueStoreService) List(ctx context.Context) ([]KV, error) ``` -------------------------------- ### Get Physical Storage Function Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves physical storage information for a given node. ```go func (n *NodeService) GetPhysicalStorage(ctx context.Context, nodeName string) ([]PhysicalStorageNode, error) ``` -------------------------------- ### Create Resource Definition Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Creates a new resource definition. Requires a context and a ResourceDefinitionCreate object. ```go func (n *ResourceDefinitionService) Create(ctx context.Context, resDef ResourceDefinitionCreate) error ``` -------------------------------- ### Define Namespace for Default Source: https://pkg.go.dev/github.com/LINBIT/golinstor String constant representing the 'Default' namespace. ```go const NamespcDflt = "Default" ``` -------------------------------- ### Get All Nodes Function Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves information for all registered nodes. Accepts optional ListOpts for filtering. ```go func (n *NodeService) GetAll(ctx context.Context, opts ...*ListOpts) ([]Node, error) ``` -------------------------------- ### Create Multiple Snapshots Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Creates multiple snapshots for resources. Accepts a context and a variable number of Snapshot objects. ```go func (n *ResourceService) CreateSnapshots(ctx context.Context, snapshots ...Snapshot) error ``` -------------------------------- ### Get Node Function Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves information for a particular node. Accepts optional ListOpts for filtering. ```go func (n *NodeService) Get(ctx context.Context, nodeName string, opts ...*ListOpts) (Node, error) ``` -------------------------------- ### Define HTTP Server Configuration Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Defines the configuration for the HTTP server, including whether it is enabled, the listen address, and the port. ```go type ControllerConfigHttp struct { Enabled bool `json:"enabled,omitempty"` ListenAddress string `json:"listen_address,omitempty"` Port int32 `json:"port,omitempty"` } ``` -------------------------------- ### GetAll Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Lists all resource-definitions. ```APIDOC ## GET /GetAll ### Description Lists all resource-definitions. ### Parameters #### Request Body - **request** (RDGetAllRequest) - Required - Request parameters ``` -------------------------------- ### Implement EncryptionService Enter Method Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Enters a password to decrypt content. This method is part of the EncryptionService. ```go func (n *EncryptionService) Enter(ctx context.Context, password string) error ``` -------------------------------- ### Get Volume Group Property Information Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves meta information about properties configurable on a volume group. ```go func (n *ResourceGroupService) GetVolumeGroupPropsInfos(ctx context.Context, resGrpName string, opts ...*ListOpts) ([]PropsInfo, error) ``` -------------------------------- ### List All Resource Groups Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Lists all available resource groups. ```go func (n *ResourceGroupService) GetAll(ctx context.Context, opts ...*ListOpts) ([]ResourceGroup, error) ``` -------------------------------- ### Client Initialization Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Initializes a new Linstor client. It can be configured using options or environment variables. ```APIDOC ## func NewClient ### Description Initializes a new Linstor client with optional configuration. Environment variables like LS_CONTROLLERS, LS_USERNAME, LS_PASSWORD, and TLS-related variables can be used for configuration. Options passed directly to `NewClient` take precedence over environment variables. ### Signature ```go func NewClient(options ...Option) (*Client, error) ``` ### Parameters #### Options - `options` (...Option): A variadic list of `Option` functions to configure the client. ### Environment Variables - `LS_CONTROLLERS`: Comma-separated list of LINSTOR controller addresses. - `LS_USERNAME`, `LS_PASSWORD`: For HTTP basic authentication. - `LS_USER_CERTIFICATE`, `LS_USER_KEY`, `LS_ROOT_CA`: For enabling TLS encryption. - `LS_BEARER_TOKEN_FILE`: Path to a file containing a bearer token for authentication. ### Returns - `*Client`: A pointer to the initialized Linstor client. - `error`: An error if the client initialization fails. ``` -------------------------------- ### Define Namespace for Filesystem Source: https://pkg.go.dev/github.com/LINBIT/golinstor String constant representing the 'FileSystem' namespace. ```go const NamespcFilesystem = "FileSystem" ``` -------------------------------- ### Get Network Interfaces Function Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves information about all network interfaces of a given node. Accepts optional ListOpts. ```go func (n *NodeService) GetNetInterfaces(ctx context.Context, nodeName string, opts ...*ListOpts) ([]NetInterface, error) ``` -------------------------------- ### Define Namespace for DRBD Proxy Options Source: https://pkg.go.dev/github.com/LINBIT/golinstor String constant representing the 'DrbdOptions/Proxy' namespace. ```go const NamespcDrbdProxyOptions = "DrbdOptions/Proxy" ``` -------------------------------- ### Get Storage Pool Property Information Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves information about storage pool properties, with optional list options. ```go func (s *StoragePoolDefinitionService) GetPropsInfos(ctx context.Context, opts ...*ListOpts) ([]PropsInfo, error) ``` -------------------------------- ### Get Storage Pool Definition Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves a specific storage pool definition by name, with optional list options. ```go func (s *StoragePoolDefinitionService) Get(ctx context.Context, spdName string, opts ...*ListOpts) (StoragePoolDefinition, error) ``` -------------------------------- ### Define Namespace for DRBD Net Options Source: https://pkg.go.dev/github.com/LINBIT/golinstor String constant representing the 'DrbdOptions/Net' namespace. ```go const NamespcDrbdNetOptions = "DrbdOptions/Net" ``` -------------------------------- ### Define Namespace for NVMe Source: https://pkg.go.dev/github.com/LINBIT/golinstor String constant representing the 'NVMe' namespace. ```go const NamespcNvme = "NVMe" ``` -------------------------------- ### Get All S3 Remote Services Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves all configured S3 remote services. Optional ListOpts can be provided for filtering. ```go func (r *RemoteService) GetAllS3(ctx context.Context, opts ...*ListOpts) ([]S3Remote, error) ``` -------------------------------- ### BackupInfo struct Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Represents detailed information about a specific backup instance. ```go type BackupInfo struct { Rsc string `json:"rsc"` Snap string `json:"snap"` Full string `json:"full"` Latest string `json:"latest"` Count int32 `json:"count,omitempty"` DlSizeKib int64 `json:"dl_size_kib"` AllocSizeKib int64 `json:"alloc_size_kib"` Storpools []BackupInfoStorPool `json:"storpools"` } ``` -------------------------------- ### Get All EBS Remote Services Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves all configured EBS remote services. Optional ListOpts can be provided for filtering. ```go func (r *RemoteService) GetAllEbs(ctx context.Context, opts ...*ListOpts) ([]EbsRemote, error) ``` -------------------------------- ### Define Namespace for DRBD Disk Options Source: https://pkg.go.dev/github.com/LINBIT/golinstor String constant representing the 'DrbdOptions/Disk' namespace. ```go const NamespcDrbdDiskOptions = "DrbdOptions/Disk" ``` -------------------------------- ### Define Query Size Info Response Space Info Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client QuerySizeInfoResponseSpaceInfo details the available and maximum sizes, oversubscription ratios, and next spawn results for storage. ```go type QuerySizeInfoResponseSpaceInfo struct { MaxVlmSizeInKib int64 `json:"max_vlm_size_in_kib"` AvailableSizeInKib *int64 `json:"available_size_in_kib,omitempty"` CapacityInKib *int64 `json:"capacity_in_kib,omitempty"` DefaultMaxOversubscriptionRatio *float64 `json:"default_max_oversubscription_ratio,omitempty"` NextSpawnResult []QuerySizeInfoSpawnResult `json:"next_spawn_result,omitempty"` } ``` -------------------------------- ### Define Namespace for Bcache Source: https://pkg.go.dev/github.com/LINBIT/golinstor String constant representing the 'BCache' namespace. ```go const NamespcBcache = "BCache" ``` -------------------------------- ### Get All Linstor Remote Services Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves all configured Linstor remote services. Optional ListOpts can be provided for filtering. ```go func (r *RemoteService) GetAllLinstor(ctx context.Context, opts ...*ListOpts) ([]LinstorRemote, error) ``` -------------------------------- ### Get Storage Pool Function Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves information about a specific storage pool on a given node. Accepts optional ListOpts. ```go func (n *NodeService) GetStoragePool(ctx context.Context, nodeName, spName string, opts ...*ListOpts) (StoragePool, error) ``` -------------------------------- ### Define Physical Storage Creation Configuration Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Use PhysicalStorageCreate to configure the creation of physical storage, including device paths, RAID levels, and optional storage pool creation. ```go type PhysicalStorageCreate struct { ProviderKind ProviderKind `json:"provider_kind"` DevicePaths []string `json:"device_paths"` // RAID level to use for pool. RaidLevel string `json:"raid_level,omitempty"` PoolName string `json:"pool_name,omitempty"` VdoEnable bool `json:"vdo_enable,omitempty"` VdoSlabSizeKib int64 `json:"vdo_slab_size_kib,omitempty"` VdoLogicalSizeKib int64 `json:"vdo_logical_size_kib,omitempty"` WithStoragePool PhysicalStorageStoragePoolCreate `json:"with_storage_pool,omitempty"` PvCreateArguments []string `json:"pv_create_arguments,omitempty"` VgCreateArguments []string `json:"vg_create_arguments,omitempty"` LvCreateArguments []string `json:"lv_create_arguments,omitempty"` ZpoolCreateArguments []string `json:"zpool_create_arguments,omitempty"` } ``` -------------------------------- ### Implement ResourceGroupService methods Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Methods for performing operations on resource groups and volume groups via the ResourceGroupService. ```go func (n *ResourceGroupService) Adjust(ctx context.Context, resGrpName string, adjust ResourceGroupAdjust) error ``` ```go func (n *ResourceGroupService) AdjustAll(ctx context.Context, adjust ResourceGroupAdjust) error ``` ```go func (n *ResourceGroupService) Create(ctx context.Context, resGrp ResourceGroup) error ``` ```go func (n *ResourceGroupService) CreateVolumeGroup(ctx context.Context, resGrpName string, volGrp VolumeGroup) error ``` ```go func (n *ResourceGroupService) Delete(ctx context.Context, resGrpName string) error ``` ```go func (n *ResourceGroupService) DeleteVolumeGroup(ctx context.Context, resGrpName string, volNr int) error ``` -------------------------------- ### Create Volume Definition for Resource Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Creates a volume definition associated with a specific resource definition. Requires context, resource definition name, and VolumeDefinitionCreate object. ```go func (n *ResourceDefinitionService) CreateVolumeDefinition(ctx context.Context, resDefName string, volDef VolumeDefinitionCreate) error ``` -------------------------------- ### Get Network Interface Function Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves information about a specific network interface on a given node. Accepts optional ListOpts. ```go func (n *NodeService) GetNetInterface(ctx context.Context, nodeName, nifName string, opts ...*ListOpts) (NetInterface, error) ``` -------------------------------- ### Get Volume Definition Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves a specific volume definition for a resource definition by volume number. Optional ListOpts can be provided. ```go func (n *ResourceDefinitionService) GetVolumeDefinition(ctx context.Context, resDefName string, volNr int, opts ...*ListOpts) (VolumeDefinition, error) ``` -------------------------------- ### Controller Configuration Structures Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Configuration models for the LINSTOR controller, including database and general settings. ```go type ControllerConfig struct { Config ControllerConfigConfig `json:"config,omitempty"` Debug ControllerConfigDebug `json:"debug,omitempty"` Log ControllerConfigLog `json:"log,omitempty"` Db ControllerConfigDb `json:"db,omitempty"` Http ControllerConfigHttp `json:"http,omitempty"` Https ControllerConfigHttps `json:"https,omitempty"` Ldap ControllerConfigLdap `json:"ldap,omitempty"` } ``` ```go type ControllerConfigConfig struct { Dir string `json:"dir,omitempty"` } ``` ```go type ControllerConfigDb struct { ConnectionUrl string `json:"connection_url,omitempty"` CaCertificate string `json:"ca_certificate,omitempty"` ClientCertificate string `json:"client_certificate,omitempty"` ClientKeyPkcs8Pem string `json:"client_key_pkcs8_pem,omitempty"` InMemory string `json:"in_memory,omitempty"` VersionCheckDisabled bool `json:"version_check_disabled,omitempty"` Etcd ControllerConfigDbEtcd `json:"etcd,omitempty"` } ``` -------------------------------- ### Define Namespace for DRBD Peer Device Options Source: https://pkg.go.dev/github.com/LINBIT/golinstor String constant representing the 'DrbdOptions/PeerDevice' namespace. ```go const NamespcDrbdPeerDeviceOptions = "DrbdOptions/PeerDevice" ``` -------------------------------- ### External and File System Property Keys Source: https://pkg.go.dev/github.com/LINBIT/golinstor Constants for external command execution, file system parameters, and EBS volume types. ```go const KeyEbsVolumeType = "EBS/VolumeType" ``` ```go const KeyExtCmdWaitTo = "ExtCmdWaitTimeout" ``` ```go const KeyExtFile = "ExtFile" ``` ```go const KeyForceInitialSync = "ForceInitialSync" ``` ```go const KeyFsGroup = "Group" ``` ```go const KeyFsMkfsparameters = "MkfsParams" ``` ```go const KeyFsType = "Type" ``` ```go const KeyFsUser = "User" ``` -------------------------------- ### Get Resource Definition Sync Status Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves the synchronization status for a resource definition. Requires context and resource definition name. ```go func (n *ResourceDefinitionService) SyncStatus(ctx context.Context, resDef string) (ResourceDefinitionSyncStatus, error) ``` -------------------------------- ### Define Namespace for DRBD Resource Options Source: https://pkg.go.dev/github.com/LINBIT/golinstor String constant representing the 'DrbdOptions/Resource' namespace. ```go const NamespcDrbdResourceOptions = "DrbdOptions/Resource" ``` -------------------------------- ### Get Physical Storage View Function Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves a grouped list of physical storage that can be converted into LINSTOR storage pools. Accepts optional ListOpts. ```go func (n *NodeService) GetPhysicalStorageView(ctx context.Context, opts ...*ListOpts) ([]PhysicalStorageViewItem, error) ``` -------------------------------- ### Create Network Interface Function Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Creates the given network interface on a specified node. Requires context, node name, and NetInterface details. ```go func (n *NodeService) CreateNetInterface(ctx context.Context, nodeName string, nif NetInterface) error ``` -------------------------------- ### Get Resource Definition Clone Status Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves the status of a resource definition cloning operation. Requires source and target resource definition names. ```go func (n *ResourceDefinitionService) CloneStatus(ctx context.Context, srcResDef, targetResDef string) (ResourceDefinitionCloneStatus, error) ``` -------------------------------- ### Define ResourceDefinitionCreate struct Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Holds data required to create a resource definition. ```go type ResourceDefinitionCreate struct { // drbd port for resources DrbdPort int32 `json:"drbd_port,omitempty"` // drbd resource secret DrbdSecret string `json:"drbd_secret,omitempty"` DrbdTransportType string `json:"drbd_transport_type,omitempty"` ResourceDefinition ResourceDefinition `json:"resource_definition"` } ``` -------------------------------- ### Create Storage Pool Function Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Creates a storage pool on a given node. Requires context, node name, and StoragePool details. ```go func (n *NodeService) CreateStoragePool(ctx context.Context, nodeName string, sp StoragePool) error ``` -------------------------------- ### Get DRBD Proxy Properties Info for Resource Definition Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Retrieves DRBD proxy property information for a specific resource definition. Optional ListOpts can be provided. ```go func (n *ResourceDefinitionService) GetDRBDProxyPropsInfos(ctx context.Context, resDefName string, opts ...*ListOpts) ([]PropsInfo, error) ``` -------------------------------- ### Client Options - WithCaches Source: https://pkg.go.dev/github.com/LINBIT/golinstor/cache The WithCaches function allows you to set up provided caches on the client.Client. ```APIDOC ## func WithCaches ### Description WithCaches sets up the given caches on the client.Client. ### Signature ```go func WithCaches(caches ...Cache) client.Option ``` ``` -------------------------------- ### Define DrbdVolume Structure Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Represents a DRBD volume, including its definition, device path, backing device, and size information. Used by linstor to get information about a DRBD volume. ```go type DrbdVolume struct { DrbdVolumeDefinition DrbdVolumeDefinition `json:"drbd_volume_definition,omitempty"` // drbd device path e.g. '/dev/drbd1000' DevicePath string `json:"device_path,omitempty"` // block device used by drbd BackingDevice string `json:"backing_device,omitempty"` MetaDisk string `json:"meta_disk,omitempty"` AllocatedSizeKib int64 `json:"allocated_size_kib,omitempty"` UsableSizeKib int64 `json:"usable_size_kib,omitempty"` // String describing current volume state DiskState string `json:"disk_state,omitempty"` // Storage pool name used for external meta data; null for internal ExtMetaStorPool string `json:"ext_meta_stor_pool,omitempty"` } ``` -------------------------------- ### Define HTTPS Server Configuration Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Defines the configuration for the HTTPS server, including enabled status, listen address, port, and keystore/truststore details. ```go type ControllerConfigHttps struct { Enabled bool `json:"enabled,omitempty"` ListenAddress string `json:"listen_address,omitempty"` Port int32 `json:"port,omitempty"` Keystore string `json:"keystore,omitempty"` KeystorePassword string `json:"keystore_password,omitempty"` Truststore string `json:"truststore,omitempty"` TruststorePassword string `json:"truststore_password,omitempty"` } ``` -------------------------------- ### Define Namespace for DRBD Options Source: https://pkg.go.dev/github.com/LINBIT/golinstor String constant representing the base 'DrbdOptions' namespace. ```go const NamespcDrbdOptions = "DrbdOptions" ``` -------------------------------- ### Define Logging Configuration Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Defines the logging configuration, including stack trace printing, log directory, and various log levels for different components. ```go type ControllerConfigLog struct { PrintStackTrace bool `json:"print_stack_trace,omitempty"` Directory string `json:"directory,omitempty"` Level LogLevel `json:"level,omitempty"` LevelGlobal LogLevel `json:"level_global,omitempty"` LevelLinstor LogLevel `json:"level_linstor,omitempty"` LevelLinstorGlobal LogLevel `json:"level_linstor_global,omitempty"` RestAccessLogPath string `json:"rest_access_log_path,omitempty"` RestAccessMode string `json:"rest_access_mode,omitempty"` } ``` -------------------------------- ### BackupService Structure Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Service structure for managing backups. ```go type BackupService struct { // contains filtered or unexported fields } ``` -------------------------------- ### Define Namespace for Connection Paths Source: https://pkg.go.dev/github.com/LINBIT/golinstor String constant representing the 'Paths' namespace for connections. ```go const NamespcConnectionPaths = "Paths" ``` -------------------------------- ### Define Namespace for Logging Source: https://pkg.go.dev/github.com/LINBIT/golinstor String constant representing the 'Logging' namespace. ```go const NamespcLogging = "Logging" ``` -------------------------------- ### Define Namespace for Writecache Options Source: https://pkg.go.dev/github.com/LINBIT/golinstor String constant representing the 'Writecache/Options' namespace. ```go const NamespcWritecacheOptions = "Writecache/Options" ``` -------------------------------- ### KeyValueStore Components Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Definitions for key-value store structures, provider interfaces, and service methods. ```go type KV struct { Name string `json:"name"` Props map[string]string `json:"props"` } ``` ```go type KeyValueStoreProvider interface { List(ctx context.Context) ([]KV, error) Get(ctx context.Context, kv string) (*KV, error) CreateOrModify(ctx context.Context, kv string, modify GenericPropsModify) error Delete(ctx context.Context, kv string) error } ``` ```go type KeyValueStoreService struct { // contains filtered or unexported fields } ``` ```go func (k *KeyValueStoreService) CreateOrModify(ctx context.Context, kv string, modify GenericPropsModify) error ``` ```go func (k *KeyValueStoreService) Delete(ctx context.Context, kv string) error ``` -------------------------------- ### Create Device Pool Function Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Creates an LVM, LVM-thin, or ZFS pool, optionally with VDO, on a given node. Requires node name and physical storage creation details. ```go func (n *NodeService) CreateDevicePool(ctx context.Context, nodeName string, psc PhysicalStorageCreate) error ``` -------------------------------- ### Define ResourceDefinitionCloneStarted struct Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Represents the initiation status of a resource definition clone. ```go type ResourceDefinitionCloneStarted struct { // Path for clone status Location string `json:"location"` // name of the source resource SourceName string `json:"source_name"` // name of the clone resource CloneName string `json:"clone_name"` Messages *[]ApiCallRc `json:"messages,omitempty"` } ``` -------------------------------- ### Define Namespace for DRBD Proxy Compression Options Source: https://pkg.go.dev/github.com/LINBIT/golinstor String constant representing the 'DrbdOptions/ProxyCompression' namespace. ```go const NamespcDrbdProxyCompressionOptions = "DrbdOptions/ProxyCompression" ``` -------------------------------- ### Create Storage Pool Definition Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Creates a new storage pool definition using the provided StoragePoolDefinition object. ```go func (s *StoragePoolDefinitionService) Create(ctx context.Context, spd StoragePoolDefinition) error ``` -------------------------------- ### ResourceDefinitionService Struct Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Represents the client pointer for the ResourceDefinitionService. ```go type ResourceDefinitionService struct { // contains filtered or unexported fields } ``` -------------------------------- ### Define ResourceDefinitionCloneRequest struct Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Request structure for cloning a resource definition. ```go type ResourceDefinitionCloneRequest struct { Name string `json:"name,omitempty"` ExternalName string `json:"external_name,omitempty"` UseZfsClone bool `json:"use_zfs_clone,omitempty"` LayerList []devicelayerkind.DeviceLayerKind `json:"layer_list,omitempty"` VolumePassphrases []string `json:"volume_passphrases,omitempty"` ResourceGroup string `json:"resource_group,omitempty"` GenericPropsModify `json:",inline"` } ``` -------------------------------- ### Define Namespace for DRBD Handler Options Source: https://pkg.go.dev/github.com/LINBIT/golinstor String constant representing the 'DrbdOptions/Handlers' namespace. ```go const NamespcDrbdHandlerOptions = "DrbdOptions/Handlers" ``` -------------------------------- ### Spawn Resource Group Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Creates a new resource definition and triggers auto-deployment if configured. ```go func (n *ResourceGroupService) Spawn(ctx context.Context, resGrpName string, resGrpSpwn ResourceGroupSpawn) error ``` -------------------------------- ### Define ResourceMakeAvailable struct Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Represents the configuration for making a resource available. Use the Diskful field to force diskful creation even when diskless is an option. ```go type ResourceMakeAvailable struct { LayerList []devicelayerkind.DeviceLayerKind `json:"layer_list,omitempty"` // if true resource will be created as diskful even if diskless would be possible Diskful bool `json:"diskful,omitempty"` } ``` -------------------------------- ### Define Namespace for ZFS Source: https://pkg.go.dev/github.com/LINBIT/golinstor String constant representing the 'Zfs' namespace. ```go const NamespcZfs = "Zfs" ``` -------------------------------- ### Define Namespace for Snapshot Shipping Source: https://pkg.go.dev/github.com/LINBIT/golinstor String constant representing the 'SnapshotShipping' namespace. ```go const NamespcSnapshotShipping = "SnapshotShipping" ``` -------------------------------- ### BackupInfoRequest struct Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Defines the request parameters for retrieving information about a backup. ```go type BackupInfoRequest struct { SrcRscName string `json:"src_rsc_name,omitempty"` SrcSnapName string `json:"src_snap_name,omitempty"` LastBackup string `json:"last_backup,omitempty"` StorPoolMap map[string]string `json:"stor_pool_map,omitempty"` NodeName string `json:"node_name,omitempty"` } ``` -------------------------------- ### Toggle Resource to Diskless Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Toggles a resource on a node to be diskless. Optionally specify a diskless pool name. Requires context, resource name, node name, and diskless pool name. ```go func (n *ResourceService) Diskless(ctx context.Context, resName, nodeName, disklessPoolName string) error ``` -------------------------------- ### Create Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Adds a new resource-definition. ```APIDOC ## POST /Create ### Description Adds a new resource-definition. ### Parameters #### Request Body - **resDef** (ResourceDefinitionCreate) - Required - The resource definition object to create ``` -------------------------------- ### ResourceDefinitionWithVolumeDefinition struct Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Represents a resource definition including its volume definitions. ```go type ResourceDefinitionWithVolumeDefinition struct { ResourceDefinition VolumeDefinitions []VolumeDefinition `json:"volume_definitions,omitempty"` } ``` -------------------------------- ### General and NetCom Property Keys Source: https://pkg.go.dev/github.com/LINBIT/golinstor Constants for node properties, network communication, and general resource management. ```go const KeyKeep = "Keep" ``` ```go const KeyMaxConcurrentBackupsPerNode = "MaxConcurrentBackupsPerNode" ``` ```go const KeyMinorNrAutoRange = "MinorNrAutoRange" ``` ```go const KeyNetcomBindAddress = "BindAddress" ``` ```go const KeyNetcomEnabled = "Enabled" ``` ```go const KeyNetcomKeyPasswd = "KeyPasswd" ``` ```go const KeyNetcomKeyStore = "KeyStore" ``` ```go const KeyNetcomKeyStorePasswd = "KeyStorePasswd" ``` ```go const KeyNetcomPort = "Port" ``` ```go const KeyNetcomSslProtocol = "SslProtocol" ``` ```go const KeyNetcomTrustStore = "TrustStore" ``` ```go const KeyNetcomTrustStorePasswd = "TrustStorePasswd" ``` ```go const KeyNetcomType = "Type" ``` ```go const KeyNode = "Node" ``` ```go const KeyPassphrase = "Passphrase" ``` ```go const KeyPeerSlots = "PeerSlots" ``` ```go const KeyPeerSlotsNewResource = "PeerSlotsNewResource" ``` ```go const KeyPoolName = "PoolName" ``` ```go const KeyPort = "Port" ``` ```go const KeyPrefNic = "PrefNic" ``` ```go const KeyQuorumSetBy = "QuorumSetBy" ``` ```go const KeyRecvTimeoutInMs = "L2LReceiveStartedTimeout" ``` ```go const KeyRemote = "Remote" ``` ```go const KeyRscAllowMixingDeviceKind = "AllowMixingStoragePoolDriver" ``` ```go const KeyRscDfn = "RscDfn" ``` ```go const KeyRscDiskfulBy = "DiskfulBy" ``` ```go const KeyRscGrp = "RscGrp" ``` ```go const KeyRscMigrateFrom = "MigrateFrom" ``` ```go const KeyRscRollbackTarget = "RollbackTarget" ``` ```go const KeyRunEvery = "RunEvery" ``` ```go const KeySearchDomain = "SearchDomain" ``` ```go const KeySecDomain = "SecDomain" ``` ```go const KeySecIdentity = "SecIdentity" ``` -------------------------------- ### CacheResource Structures Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Structures for managing cache resources and volumes. ```go type CacheResource struct { CacheVolumes []CacheVolume `json:"cache_volumes,omitempty"` } ``` ```go type CacheVolume struct { VolumeNumber int32 `json:"volume_number,omitempty"` // block device path DevicePath string `json:"device_path,omitempty"` // block device path used as cache device DevicePathCache string `json:"device_path_cache,omitempty"` // block device path used as meta device DeviceMetaCache string `json:"device_meta_cache,omitempty"` AllocatedSizeKib int64 `json:"allocated_size_kib,omitempty"` UsableSizeKib int64 `json:"usable_size_kib,omitempty"` // String describing current volume state DiskState string `json:"disk_state,omitempty"` } ``` -------------------------------- ### Define BCacheResource Struct Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client BCacheResource holds a list of BCacheVolume configurations. ```go type BCacheResource struct { BCacheVolumes []BCacheVolume `json:"bcache_volumes,omitempty"` } ``` -------------------------------- ### BasicAuthCfg Structure Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Configuration for basic authentication. ```go type BasicAuthCfg struct { Username, Password string } ``` -------------------------------- ### Toggle Resource to Diskful Source: https://pkg.go.dev/github.com/LINBIT/golinstor/client Toggles a resource to be diskful. Optionally specify a storage pool name. Requires context, resource name, node name, storage pool name, and ToggleDiskDiskfulProps. ```go func (n *ResourceService) Diskful(ctx context.Context, resName, nodeName, storagePoolName string, props *ToggleDiskDiskfulProps) error ```