utils

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 11

Documentation

Overview

Package utils implements utils code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAccount

func GetAccount(auth core.Authenticator) (string, error)

GetAccount is function parses the account number from the token and returns it.

func GetAccountID added in v0.4.0

func GetAccountID() (string, error)

GetAccountID will parse and returns user cloud account ID.

func PagingHelper added in v0.4.0

func PagingHelper(f func(string) (bool, string, error)) error

PagingHelper while listing resources, can use this to get the start token for getting the next set of resources for processing start token will get fetched from nextURL returned by f and passed to the func f. f should take start as param and return three values isDone bool, nextURL string, e error. isDone - represents no need to iterate for getting next set of resources. nextURL - if nextURL is present, will try to get the start token and pass it to f for next set of resource processing. e - if e is not nil, will break and return the error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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