Documentation
¶
Index ¶
- Constants
- type ResourceGroupDto
- type ResourceGroupService
- type ResourceGroupServiceImpl
- func (impl *ResourceGroupServiceImpl) CheckResourceGroupPermissions(request *ResourceGroupDto, token string) (bool, error)
- func (impl *ResourceGroupServiceImpl) CreateResourceGroup(request *ResourceGroupDto, token string) (*ResourceGroupDto, error)
- func (impl *ResourceGroupServiceImpl) DeleteResourceGroup(resourceGroupId int, groupType ResourceGroupType, token string, ...) (bool, error)
- func (impl *ResourceGroupServiceImpl) GetActiveResourceGroupList(token string, ...) ([]*ResourceGroupDto, error)
- func (impl *ResourceGroupServiceImpl) GetResourceIdsByResourceGroupId(resourceGroupId int) ([]int, error)
- func (impl *ResourceGroupServiceImpl) UpdateResourceGroup(request *ResourceGroupDto, token string) (*ResourceGroupDto, error)
- type ResourceGroupType
- type ResourceGroupingRequest
Constants ¶
View Source
const ( HibernatingApplicationsResourceGroupName = "Hibernating Applications" UnhibernatingApplicationsResourceGroupName = "Unhibernating Applications" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResourceGroupDto ¶
type ResourceGroupDto struct {
Id int `json:"id,omitempty"`
Name string `json:"name,omitempty" validate:"required,max=30,name-component"`
Description string `json:"description,omitempty" validate:"max=50"`
ResourceIds []int `json:"resourceIds"`
Active bool `json:"active,omitempty"`
ParentResourceId int `json:"parentResourceId"`
GroupType ResourceGroupType `json:"groupType,omitempty"`
UserId int32 `json:"-"`
CheckAuthBatch func(token string, appObject []string, action string) map[string]bool `json:"-"`
//for backward compatibility
AppIds []int `json:"appIds,omitempty"`
EnvironmentId int `json:"environmentId,omitempty"`
}
type ResourceGroupService ¶
type ResourceGroupService interface {
GetActiveResourceGroupList(token string, checkAuthBatch func(token string, appObject []string, action string) map[string]bool, envId int, groupType ResourceGroupType) ([]*ResourceGroupDto, error)
//GetApplicationsForResourceGroup(appGroupId int) ([]*ApplicationDto, error)
GetResourceIdsByResourceGroupId(resourceGroupId int) ([]int, error)
CreateResourceGroup(request *ResourceGroupDto, token string) (*ResourceGroupDto, error)
UpdateResourceGroup(request *ResourceGroupDto, token string) (*ResourceGroupDto, error)
CheckResourceGroupPermissions(request *ResourceGroupDto, token string) (bool, error)
DeleteResourceGroup(resourceGroupId int, groupType ResourceGroupType, token string, checkAuthBatch func(token string, appObject []string, action string) map[string]bool) (bool, error)
}
type ResourceGroupServiceImpl ¶
type ResourceGroupServiceImpl struct {
// contains filtered or unexported fields
}
func NewResourceGroupServiceImpl ¶
func NewResourceGroupServiceImpl(logger *zap.SugaredLogger, resourceGroupRepository resourceGroup.ResourceGroupRepository, resourceGroupMappingRepository resourceGroup.ResourceGroupMappingRepository, enforcerUtil rbac.EnforcerUtil, devtronResourceSearchableKeyService devtronResource.DevtronResourceSearchableKeyService, appStatusRepository appStatusRepo.AppStatusRepository) *ResourceGroupServiceImpl
func (*ResourceGroupServiceImpl) CheckResourceGroupPermissions ¶
func (impl *ResourceGroupServiceImpl) CheckResourceGroupPermissions(request *ResourceGroupDto, token string) (bool, error)
func (*ResourceGroupServiceImpl) CreateResourceGroup ¶
func (impl *ResourceGroupServiceImpl) CreateResourceGroup(request *ResourceGroupDto, token string) (*ResourceGroupDto, error)
func (*ResourceGroupServiceImpl) DeleteResourceGroup ¶
func (*ResourceGroupServiceImpl) GetActiveResourceGroupList ¶
func (impl *ResourceGroupServiceImpl) GetActiveResourceGroupList(token string, checkAuthBatch func(token string, appObject []string, action string) map[string]bool, parentResourceId int, groupType ResourceGroupType) ([]*ResourceGroupDto, error)
func (*ResourceGroupServiceImpl) GetResourceIdsByResourceGroupId ¶
func (impl *ResourceGroupServiceImpl) GetResourceIdsByResourceGroupId(resourceGroupId int) ([]int, error)
func (*ResourceGroupServiceImpl) UpdateResourceGroup ¶
func (impl *ResourceGroupServiceImpl) UpdateResourceGroup(request *ResourceGroupDto, token string) (*ResourceGroupDto, error)
type ResourceGroupType ¶
type ResourceGroupType string
const ( APP_GROUP ResourceGroupType = "app-group" ENV_GROUP ResourceGroupType = "env-group" )
type ResourceGroupingRequest ¶
type ResourceGroupingRequest struct {
ResourceGroupId int
ParentResourceId int
ResourceGroupType ResourceGroupType
ResourceIds []int `json:"appIds,omitempty"`
CheckAuthBatch func(token string, appObject []string, envObject []string) (map[string]bool, map[string]bool) `json:"-"`
Ctx context.Context `json:"-"`
UserId int32 `json:"-"`
}
Click to show internal directories.
Click to hide internal directories.