Skip to content

Latest commit

 

History

History
147 lines (94 loc) · 3.51 KB

File metadata and controls

147 lines (94 loc) · 3.51 KB

\TopicApi

All URIs are relative to http://localhost

Method HTTP request Description
Describe Get /topic/{topic} Describe a topic
List Get /topic List topics

Describe

Messages Describe(ctx, topic).Limit(limit).Offset(offset).Partition(partition).Execute()

Describe a topic

Example

package main

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

func main() {
    topic := "topic_example" // string | 
    limit := int32(56) // int32 |  (optional)
    offset := int64(789) // int64 |  (optional)
    partition := int32(56) // int32 |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.TopicApi.Describe(context.Background(), topic).Limit(limit).Offset(offset).Partition(partition).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TopicApi.Describe``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Describe`: Messages
    fmt.Fprintf(os.Stdout, "Response from `TopicApi.Describe`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
topic string

Other Parameters

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

Name Type Description Notes

limit | int32 | | offset | int64 | | partition | int32 | |

Return type

Messages

Authorization

ApiToken, ServiceBearer, ServiceToken

HTTP request headers

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

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

List

[]Topic List(ctx).Execute()

List topics

Example

package main

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

func main() {

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.TopicApi.List(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TopicApi.List``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `List`: []Topic
    fmt.Fprintf(os.Stdout, "Response from `TopicApi.List`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]Topic

Authorization

ApiToken, ServiceBearer, ServiceToken

HTTP request headers

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

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