> For the complete documentation index, see [llms.txt](https://titannet.gitbook.io/titan-network-en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://titannet.gitbook.io/titan-network-en/tws/titan-storage/developer-guides/sdk-documentation/go-sdk.md).

# GO SDK

### Titan Storage Go SDK

The Titan Storage Go SDK provides functionalities for file uploading, downloading, deleting, renaming, sharing, and creating folders.

The Go SDK consists of TitanStorage.

#### Install Go SDK And initialize the go SDK

```
go get -u github.com/utopiosphe/titan-storage-sdk
```

Retrieve the apikey and use it to initialize the go SDK

<figure><img src="/files/rSfeyoQP8SzPV5AZVQF5" alt=""><figcaption></figcaption></figure>

```
package main

import (
    storage "github.com/utopiosphe/titan-storage-sdk"
)

const (
    titanStorageURL = "https://api-test1.container1.titannet.io"
)

var TitanStorage storage.Storage

func init() {
    var err error

    TitanStorage,err = storage.Initialize(&storage.Config{
        TitanURL: titanStorageURL,
        APIKey: os.Getenv("apikey"),
    })
    if err != nil {
        panic(fmt.Errorf("new client of titan storage error:%w",err))
    }
}
```

#### Go SDK Method With Client

| Method                                                                                                                      | Description                                           |
| --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| [TitanStorage.ListRegions](https://github.com/utopiosphe/titan-storage-sdk/blob/main/example/storage_test.go#L32)           | Retrieve the list of area IDs from the scheduler      |
| [TitanStorage.CreateFolder](https://github.com/utopiosphe/titan-storage-sdk/blob/main/example/storage_test.go#L47)          | Create directories, including root and subdirectories |
| [TitanStorage.ListDirectoryContents](https://github.com/utopiosphe/titan-storage-sdk/blob/main/example/storage_test.go#L56) | Retrieve a list of all folders and files              |
| [TitanStorage.RenameFolder](https://github.com/utopiosphe/titan-storage-sdk/blob/main/example/storage_test.go#L67)          | Rename a specific folder                              |
| [TitanStorage.RenameAsset](https://github.com/utopiosphe/titan-storage-sdk/blob/main/example/storage_test.go#L76)           | Rename a specific file                                |
| [TitanStorage.DeleteFolder](https://github.com/utopiosphe/titan-storage-sdk/blob/main/example/storage_test.go#L85)          | Delete a specific folder                              |
| [TitanStorage.DeleteAsset](https://github.com/utopiosphe/titan-storage-sdk/blob/main/example/storage_test.go#L94)           | Delete a specific file                                |
| [TitanStorage.GetUserProfile](https://github.com/utopiosphe/titan-storage-sdk/blob/main/example/storage_test.go#174)        | Retrieve user-related information                     |
| [TitanStorage.GetltemDetails](https://github.com/utopiosphe/titan-storage-sdk/blob/main/example/storage_test.go#L103)       | Get detailed information about files/folders          |
| [TitanStorage.CreateSharedLink](https://github.com/utopiosphe/titan-storage-sdk/blob/main/example/storage_test.go#L114)     | Share file/folder data                                |
| [TitanStorage.UploadAsset](https://github.com/utopiosphe/titan-storage-sdk/blob/main/example/storage_test.go#L126)          | Upload files/folders                                  |
| [TitanStorage.DownloadAsset](https://github.com/utopiosphe/titan-storage-sdk/blob/main/example/storage_test.go#L149)        | Download files/folders                                |
