generic

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetResourceByFuncs

func GetResourceByFuncs[T cloudprovider.ICloudResource](objs []T, idFs []func(T) string, id string) (T, error)

func GetResourceByGlobalId

func GetResourceByGlobalId[T cloudprovider.ICloudResource](objs []T, id string) (T, error)

func GetResourceById

func GetResourceById[T cloudprovider.ICloudResource](objs []T, id string) (T, error)

func GetResourceByIdOrName

func GetResourceByIdOrName[T cloudprovider.ICloudResource](objs []T, idOrName string) (T, error)

func GetResourceByName

func GetResourceByName[T cloudprovider.ICloudResource](objs []T, id string) (T, error)

func GetResourceGlobalId

func GetResourceGlobalId[T cloudprovider.ICloudResource](obj T) string

func GetResourceId

func GetResourceId[T cloudprovider.ICloudResource](obj T) string

func GetResourceName

func GetResourceName[T cloudprovider.ICloudResource](obj T) string

func Iter

func Iter[T cloudprovider.ICloudResource](objs []T, f func(T) error, continueOnErr bool) error

Types

type Operator

type Operator[T cloudprovider.ICloudResource] struct {
	// contains filtered or unexported fields
}

func NewOperator

func NewOperator[T cloudprovider.ICloudResource](nf func() ([]T, error)) (*Operator[T], error)

func (Operator[T]) Iter

func (o Operator[T]) Iter(f func(T) error, continueOnErr bool) error

Jump to

Keyboard shortcuts

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