Documentation ¶
Index ¶
- Variables
- type ResourceGroupManager
- func (m *ResourceGroupManager) CreateResourceGroupRule(ctx context.Context, rgr *entity.ResourceGroupRule) error
- func (m *ResourceGroupManager) DeleteResourceGroupRule(ctx context.Context, name string) error
- func (m *ResourceGroupManager) GetResourceGroupRule(ctx context.Context, name string) (*entity.ResourceGroupRule, error)
- func (m *ResourceGroupManager) ListResourceGroupRules(ctx context.Context) ([]*entity.ResourceGroupRule, error)
- func (m *ResourceGroupManager) ListResourceGroupsBy(ctx context.Context, ruleName string) (*storage.ResourceGroupResult, error)
- func (m *ResourceGroupManager) UpdateResourceGroupRule(ctx context.Context, name string, rgr *entity.ResourceGroupRule) error
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.
Click to show internal directories.
Click to hide internal directories.