util

package
v0.0.0-...-a1c3796 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NodeFromProviderID

func NodeFromProviderID(providerID string) (string, string, error)

providerID 1) the id of the instance in the alicloud API. Use '.' to separate providerID which looks like 'cn-hangzhou.i-v98dklsmnxkkgiiil7'. The format of "REGION.NODEID" 2) the id for an instance in the kubernetes API, which has 'alicloud://' prefix. e.g. alicloud://cn-hangzhou.i-v98dklsmnxkkgiiil7

func ProviderIDFromInstance

func ProviderIDFromInstance(region, instance string) string

func SDKError

func SDKError(api string, err error) error

Types

type Pagination

type Pagination struct {
	PageNumber int
	PageSize   int
}

type PaginationResult

type PaginationResult struct {
	TotalCount int
	PageNumber int
	PageSize   int
}

A PaginationResponse represents a response with pagination information

func (*PaginationResult) NextPage

func (r *PaginationResult) NextPage() *Pagination

NextPage gets the next page of the result set

Jump to

Keyboard shortcuts

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