github.com/milvus-io/milvus-sdk-go/v2@v2.4.1/docs/show_partitions.md (about)

     1  # Show Partitions 
     2  
     3  API to list all the partitions in the specified collection.
     4  
     5  ## Params
     6  
     7  | Parameter    | Description                                                  | Type                     |
     8  | ------------ | ------------------------------------------------------------ | ------------------------ |
     9  | `ctx`        | Context to control API invocation process.                    | context.Context          |
    10  | `collName`   | Name of the collection to list all partitions.                | String                   |
    11  
    12  
    13  ## Response
    14  
    15  - `partitions`: array of entity.Partition that represents the partitions in the collection.
    16  
    17  - `err`: error in the process (if any). Possible errors are listed below:
    18  
    19      - `ErrClientNotReady`, error that the client is not connected.
    20  
    21      - `ErrCollectionNotExists`, error that collection with the specified name does not exist.
    22  
    23      - error that API invocation failed.
    24  
    25  ## Example
    26  
    27  ```go
    28  ctx := context.Background()
    29  // cli is a valid Client instance
    30  partitions, err := cli.ShowPartitions(ctx, "TestCollection")
    31  // handles the error not nil
    32  for _, part := range partitions {
    33  // process each partition if needed
    34  }
    35  ```