laas

package
v0.8.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractTopicsInto

func ExtractTopicsInto(r pagination.Page, v interface{}) error

func ListTopic

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

type CreateTopicOptsBuilder interface {
	ToTopicCreateMap() (map[string]interface{}, error)
}

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 Hosts

type Hosts []string

Hosts represents kafka/opensearch hosts url

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) IsEmpty

func (r TopicPage) IsEmpty() (bool, error)

IsEmpty checks whether a Topic struct is empty.

func (TopicPage) NextPageURL

func (r TopicPage) NextPageURL() (string, error)

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

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

type UpdateOptsBuilder interface {
	ToStatusUpdateMap() (map[string]interface{}, error)
}

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 User

type User struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

User represents regenerated laas credentials

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL