Documentation ¶
Index ¶
- func ExtractTopicsInto(r pagination.Page, v interface{}) error
- func ListTopic(c *gcorecloud.ServiceClient) pagination.Pager
- type CreateTopicOpts
- type CreateTopicOptsBuilder
- type DeleteResult
- type Hosts
- type HostsResult
- type Status
- type StatusResult
- type Topic
- type TopicPage
- type TopicResult
- type UpdateOptsBuilder
- type UpdateStatusOpts
- type User
- type UserResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractTopicsInto ¶
func ExtractTopicsInto(r pagination.Page, v interface{}) error
func ListTopic ¶
func ListTopic(c *gcorecloud.ServiceClient) pagination.Pager
ListTopic list LaaS Kafka topics within client namespace
Types ¶
type CreateTopicOpts ¶
type CreateTopicOpts struct {
Name string `json:"name"`
}
CreateTopicOpts represents options used to create a topic.
func (CreateTopicOpts) ToTopicCreateMap ¶
func (opts CreateTopicOpts) ToTopicCreateMap() (map[string]interface{}, error)
ToTopicCreateMap builds a request body from CreateTopicOpts.
type CreateTopicOptsBuilder ¶
CreateTopicOptsBuilder allows extensions to add additional parameters to the request.
type DeleteResult ¶
type DeleteResult struct {
gcorecloud.ErrResult
}
DeleteResult represents the result of a delete operation
func DeleteTopic ¶
func DeleteTopic(c *gcorecloud.ServiceClient, name string) (r DeleteResult)
DeleteTopic delete LaaS Kafka topic within client namespace
type HostsResult ¶
type HostsResult struct {
gcorecloud.Result
}
func ListKafkaHosts ¶
func ListKafkaHosts(c *gcorecloud.ServiceClient) (r HostsResult)
ListKafkaHosts retrieves LaaS kafka hosts.
func ListOpenSearchHosts ¶
func ListOpenSearchHosts(c *gcorecloud.ServiceClient) (r HostsResult)
ListOpenSearchHosts retrieves LaaS opensearch hosts.
func (HostsResult) Extract ¶
func (r HostsResult) Extract() (*Hosts, error)
Extract is a function that accepts a result and extracts a Hosts resource.
func (HostsResult) ExtractInto ¶
func (r HostsResult) ExtractInto(v interface{}) error
type Status ¶
type Status struct { Namespace string `json:"namespace"` IsInitialized bool `json:"is_initialized"` }
Status represents laas status
type StatusResult ¶
type StatusResult struct {
gcorecloud.Result
}
func GetStatus ¶
func GetStatus(c *gcorecloud.ServiceClient) (r StatusResult)
GetStatus retrieves laas status.
func UpdateStatus ¶
func UpdateStatus(c *gcorecloud.ServiceClient, opts UpdateOptsBuilder) (r StatusResult)
UpdateStatus update LaaS status.
func (StatusResult) Extract ¶
func (r StatusResult) Extract() (*Status, error)
Extract is a function that accepts a result and extracts a Status resource.
func (StatusResult) ExtractInto ¶
func (r StatusResult) ExtractInto(v interface{}) error
type Topic ¶
type Topic struct {
Name string
}
Topic represents kafka/opensearch topic
func ExtractTopics ¶
func ExtractTopics(r pagination.Page) ([]Topic, error)
ExtractTopics accepts a Page struct, specifically a TopicPage struct, and extracts the elements into a slice of Topic structs. In other words, a generic collection is mapped into a relevant slice.
func ListTopicAll ¶
func ListTopicAll(c *gcorecloud.ServiceClient) ([]Topic, error)
ListTopicAll list LaaS Kafka topics within client namespace
type TopicPage ¶
type TopicPage struct {
pagination.LinkedPageBase
}
TopicPage is the page returned by a pager when traversing over a collection of topics.
func (TopicPage) NextPageURL ¶
NextPageURL is invoked when a paginated collection of topics has reached the end of a page and the pager seeks to traverse over a new one. In order to do this, it needs to construct the next page's URL.
type TopicResult ¶
type TopicResult struct {
gcorecloud.Result
}
func CreateTopic ¶
func CreateTopic(c *gcorecloud.ServiceClient, opts CreateTopicOptsBuilder) (r TopicResult)
CreateTopic create LaaS topic.
func (TopicResult) Extract ¶
func (r TopicResult) Extract() (*Topic, error)
Extract is a function that accepts a result and extracts a Topic resource.
func (TopicResult) ExtractInto ¶
func (r TopicResult) ExtractInto(v interface{}) error
type UpdateOptsBuilder ¶
UpdateOptsBuilder allows extensions to add additional parameters to the request.
type UpdateStatusOpts ¶
type UpdateStatusOpts struct {
IsInitialized bool `json:"is_initialized"`
}
UpdateStatusOpts represents options used to update a laas status.
func (UpdateStatusOpts) ToStatusUpdateMap ¶
func (opts UpdateStatusOpts) ToStatusUpdateMap() (map[string]interface{}, error)
ToStatusUpdateMap builds a request body from UpdateStatusOpts.
type UserResult ¶
type UserResult struct {
gcorecloud.Result
}
func RegenerateUser ¶
func RegenerateUser(c *gcorecloud.ServiceClient) (r UserResult)
RegenerateUser regenerate LaaS credentials.
func (UserResult) Extract ¶
func (r UserResult) Extract() (*User, error)
Extract is a function that accepts a result and extracts a User resource.
func (UserResult) ExtractInto ¶
func (r UserResult) ExtractInto(v interface{}) error