management

package
v0.0.0-...-5c5b994 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 13 Imported by: 25

Documentation

Index

Constants

View Source
const ErrCodeAPICreation = "APICreationError"

ErrCodeAPICreation ...

View Source
const ErrCodeResourceGroupDoesnotExist = "ResourceGroupDoesnotExist"

ErrCodeResourceGroupDoesnotExist ...

View Source
const ErrCodeResourceQuotaDoesnotExist = "ResourceQuotaDoesnotExist"

ErrCodeResourceQuotaDoesnotExist ...

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericPaginatedResourcesHandler

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

func NewRCPaginatedResources

func NewRCPaginatedResources(resource interface{}) GenericPaginatedResourcesHandler

func (GenericPaginatedResourcesHandler) Resources

func (pr GenericPaginatedResourcesHandler) Resources(bytes []byte, curURL string) ([]interface{}, string, error)

type ResourceGroupQuery

type ResourceGroupQuery struct {
	AccountID      string
	Default        bool
	ResourceID     string
	ResourceOrigin models.ResourceOrigin
}

ResourceGroupQuery is the query filters to get resource groups

func (ResourceGroupQuery) MakeRequest

func (q ResourceGroupQuery) MakeRequest(r *rest.Request) *rest.Request

populate query part of HTTP requests

type ResourceGroupRepository

type ResourceGroupRepository interface {
	// List all available resource groups
	List(*ResourceGroupQuery) ([]models.ResourceGroup, error)
	// Get resource group by ID
	Get(id string) (*models.ResourceGroup, error)
	// Find resource groups having the specific name
	FindByName(*ResourceGroupQuery, string) ([]models.ResourceGroup, error)
	// Create a new resource group
	Create(models.ResourceGroup) (*models.ResourceGroup, error)
	// Delete an existing resource group
	Delete(id string) error
	// Update an existing resource group
	Update(id string, request *ResourceGroupUpdateRequest) (*models.ResourceGroup, error)
}

ResourceGroupQuery ...

type ResourceGroupUpdateRequest

type ResourceGroupUpdateRequest struct {
	Name    string `json:"name,omitempty"`
	QuotaID string `json:"quota_id,omitempty"`
	Default *bool  `json:"default,omitempty"`
}

ResourceGroupUpdateRequest ...

type ResourceManagementAPI

type ResourceManagementAPI interface {
	ResourceQuota() ResourceQuotaRepository
	ResourceGroup() ResourceGroupRepository
}

ResourceManagementAPI is the resource client ...

func New

New ...

type ResourceQuotaRepository

type ResourceQuotaRepository interface {
	// List all quota definitions
	List() ([]models.QuotaDefinition, error)
	// Query quota definitions having specific name
	FindByName(name string) ([]models.QuotaDefinition, error)
	// Get quota definition by ID
	Get(id string) (*models.QuotaDefinition, error)
}

Jump to

Keyboard shortcuts

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