Skip to content

Latest commit

 

History

History
370 lines (245 loc) · 9.88 KB

PoolApi.md

File metadata and controls

370 lines (245 loc) · 9.88 KB

\PoolApi

All URIs are relative to http://localhost/api/v1

Method HTTP request Description
DeletePool Delete /pools/{pool_name} Delete a pool
GetPool Get /pools/{pool_name} Get a pool
GetPools Get /pools List pools
PatchPool Patch /pools/{pool_name} Update a pool
PostPool Post /pools Create a pool

DeletePool

DeletePool(ctx, poolName).Execute()

Delete a pool

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    poolName := "poolName_example" // string | The pool name.

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.PoolApi.DeletePool(context.Background(), poolName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `PoolApi.DeletePool``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
poolName string The pool name.

Other Parameters

Other parameters are passed through a pointer to a apiDeletePoolRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetPool

Pool GetPool(ctx, poolName).Execute()

Get a pool

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    poolName := "poolName_example" // string | The pool name.

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.PoolApi.GetPool(context.Background(), poolName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `PoolApi.GetPool``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetPool`: Pool
    fmt.Fprintf(os.Stdout, "Response from `PoolApi.GetPool`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
poolName string The pool name.

Other Parameters

Other parameters are passed through a pointer to a apiGetPoolRequest struct via the builder pattern

Name Type Description Notes

Return type

Pool

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetPools

PoolCollection GetPools(ctx).Limit(limit).Offset(offset).OrderBy(orderBy).Execute()

List pools

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    limit := int32(56) // int32 | The numbers of items to return. (optional) (default to 100)
    offset := int32(56) // int32 | The number of items to skip before starting to collect the result set. (optional)
    orderBy := "orderBy_example" // string | The name of the field to order the results by. Prefix a field name with `-` to reverse the sort order.  *New in version 2.1.0*  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.PoolApi.GetPools(context.Background()).Limit(limit).Offset(offset).OrderBy(orderBy).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `PoolApi.GetPools``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetPools`: PoolCollection
    fmt.Fprintf(os.Stdout, "Response from `PoolApi.GetPools`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGetPoolsRequest struct via the builder pattern

Name Type Description Notes
limit int32 The numbers of items to return. [default to 100]
offset int32 The number of items to skip before starting to collect the result set.
orderBy string The name of the field to order the results by. Prefix a field name with `-` to reverse the sort order. New in version 2.1.0

Return type

PoolCollection

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PatchPool

Pool PatchPool(ctx, poolName).Pool(pool).UpdateMask(updateMask).Execute()

Update a pool

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    poolName := "poolName_example" // string | The pool name.
    pool := *openapiclient.NewPool() // Pool | 
    updateMask := []string{"Inner_example"} // []string | The fields to update on the resource. If absent or empty, all modifiable fields are updated. A comma-separated list of fully qualified names of fields.  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.PoolApi.PatchPool(context.Background(), poolName).Pool(pool).UpdateMask(updateMask).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `PoolApi.PatchPool``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PatchPool`: Pool
    fmt.Fprintf(os.Stdout, "Response from `PoolApi.PatchPool`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
poolName string The pool name.

Other Parameters

Other parameters are passed through a pointer to a apiPatchPoolRequest struct via the builder pattern

Name Type Description Notes

pool | Pool | | updateMask | []string | The fields to update on the resource. If absent or empty, all modifiable fields are updated. A comma-separated list of fully qualified names of fields. |

Return type

Pool

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostPool

Pool PostPool(ctx).Pool(pool).Execute()

Create a pool

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    pool := *openapiclient.NewPool() // Pool | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.PoolApi.PostPool(context.Background()).Pool(pool).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `PoolApi.PostPool``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PostPool`: Pool
    fmt.Fprintf(os.Stdout, "Response from `PoolApi.PostPool`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiPostPoolRequest struct via the builder pattern

Name Type Description Notes
pool Pool

Return type

Pool

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]