resourcetypeutil

package
v0.28.0-rc1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustPopulateResourceStatus

func MustPopulateResourceStatus[T any](obj T) T

MustPopulateResourceStatus populates a ResourceStatus object with an output resource commonly used in our test fixtures.

Example usage (in a converter test):

..ResourceStatus: resourcetypeutil.MustPopulateResourceStatus(&myapiversion.ResourceStatus{})

func MustPopulateResourceStatusWithRecipe added in v0.27.0

func MustPopulateResourceStatusWithRecipe[T any](obj T) T

MustPopulateResourceStatusWithRecipe populates a ResourceStatus object with an output resource commonly used in our test fixtures for recipes.

Example usage (in a converter test):

..ResourceStatus: resourcetypeutil.MustPopulateResourceStatusWithRecipe(&myapiversion.ResourceStatus{})

Types

type FakeResource

type FakeResource struct{}

FakeResource is a fake resource type.

func (*FakeResource) GetBaseResource

func (f *FakeResource) GetBaseResource() *v1.BaseResource

func (*FakeResource) GetSystemData

func (f *FakeResource) GetSystemData() *v1.SystemData

func (*FakeResource) ProvisioningState

func (f *FakeResource) ProvisioningState() v1.ProvisioningState

func (*FakeResource) ResourceTypeName

func (f *FakeResource) ResourceTypeName() string

Always returns "FakeResource" as the name.

func (*FakeResource) SetProvisioningState

func (f *FakeResource) SetProvisioningState(state v1.ProvisioningState)

func (*FakeResource) UpdateMetadata

func (f *FakeResource) UpdateMetadata(ctx *v1.ARMRequestContext, oldResource *v1.BaseResource)

Jump to

Keyboard shortcuts

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