resourcegroup

package
v0.5.7-rc.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilResourceGroupRule              = errors.New("resource group rule cannot be nil")
	ErrMissingResourceGroupRuleName      = errors.New("resource group rule name is required")
	ErrResourceGroupRuleAlreadyExists    = errors.New("resource group rule already exists")
	ErrResourceGroupRuleNotFound         = errors.New("resource group rule not found")
	ErrResourceGroupRuleNameCannotModify = errors.New("resource group rule name cannot be modified")
)

Functions

This section is empty.

Types

type ResourceGroupManager

type ResourceGroupManager struct {
	// contains filtered or unexported fields
}

func NewResourceGroupManager

func NewResourceGroupManager(rgrStorage storage.ResourceGroupRuleStorage) (*ResourceGroupManager, error)

NewResourceGroupManager creates a new instance of ResourceGroupManager with the given storage.

func (*ResourceGroupManager) CreateResourceGroupRule

func (m *ResourceGroupManager) CreateResourceGroupRule(ctx context.Context, rgr *entity.ResourceGroupRule) error

CreateResourceGroupRule creates a new resource group rule.

func (*ResourceGroupManager) DeleteResourceGroupRule

func (m *ResourceGroupManager) DeleteResourceGroupRule(ctx context.Context, name string) error

DeleteResourceGroupRule deletes a resource group rule by name.

func (*ResourceGroupManager) GetResourceGroupRule

func (m *ResourceGroupManager) GetResourceGroupRule(ctx context.Context, name string) (*entity.ResourceGroupRule, error)

GetResourceGroupRule retrieves a specific resource group rule by its name.

func (*ResourceGroupManager) ListResourceGroupRules

func (m *ResourceGroupManager) ListResourceGroupRules(ctx context.Context) ([]*entity.ResourceGroupRule, error)

ListResourceGroupRules returns a list of all resource group rules.

func (*ResourceGroupManager) ListResourceGroupsBy

func (m *ResourceGroupManager) ListResourceGroupsBy(ctx context.Context, ruleName string) (*storage.ResourceGroupResult, error)

ListResourceGroupsBy lists all resource groups by specified resource group rule name.

func (*ResourceGroupManager) UpdateResourceGroupRule

func (m *ResourceGroupManager) UpdateResourceGroupRule(ctx context.Context, name string, rgr *entity.ResourceGroupRule) error

UpdateResourceGroupRule updates an existing resource group rule.

Jump to

Keyboard shortcuts

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