Documentation ¶
Index ¶
- Constants
- Variables
- func DrawStatus(s string) string
- func ExpandItem(ctx context.Context, currentItem *TreeNode) (*ExpanderResponse, []*TreeNode, error)
- func GetActivityLogExpandURL(subscriptionID, resourceName string) string
- func InitializeExpanders(client *armclient.Client)
- type APISetExpandResponse
- type ActionExpander
- type ActivityLogExpander
- type ActivityLogResource
- type AppInsightsExpander
- type AzureKubernetesServiceExpander
- type AzureSearchServiceExpander
- func (e AzureSearchServiceExpander) Delete(ctx context.Context, item *TreeNode) (bool, error)
- func (e *AzureSearchServiceExpander) DoesExpand(ctx context.Context, currentItem *TreeNode) (bool, error)
- func (e *AzureSearchServiceExpander) Expand(ctx context.Context, currentItem *TreeNode) ExpanderResult
- func (e *AzureSearchServiceExpander) Name() string
- type ContainerGroupResponse
- type ContainerInstanceExpander
- type ContainerLogResponse
- type ContainerRegistryExpander
- type DefaultExpander
- type DeploymentOperationsResponse
- type DeploymentsExpander
- type DeploymentsResponse
- type Expander
- type ExpanderResponse
- type ExpanderResponseType
- type ExpanderResult
- type JSONExpander
- type MetricsExpander
- type ResourceGroupResourceExpander
- type ResourceGroupResponse
- type StorageManagementPoliciesExpander
- type SubResource
- type SubResponse
- type SubscriptionExpander
- type SwaggerAPISet
- type SwaggerAPISetARMResources
- func (c SwaggerAPISetARMResources) AppliesToNode(node *TreeNode) bool
- func (c SwaggerAPISetARMResources) Delete(ctx context.Context, item *TreeNode) (bool, error)
- func (c SwaggerAPISetARMResources) ExpandResource(ctx context.Context, currentItem *TreeNode, resourceType swagger.ResourceType) (APISetExpandResponse, error)
- func (c SwaggerAPISetARMResources) GetResourceTypes() []swagger.ResourceType
- func (c SwaggerAPISetARMResources) ID() string
- func (c SwaggerAPISetARMResources) MatchChildNodesByName() bool
- func (c SwaggerAPISetARMResources) Update(ctx context.Context, item *TreeNode, content string) error
- type SwaggerAPISetContainerService
- func (c SwaggerAPISetContainerService) AppliesToNode(node *TreeNode) bool
- func (c SwaggerAPISetContainerService) Delete(ctx context.Context, item *TreeNode) (bool, error)
- func (c SwaggerAPISetContainerService) ExpandResource(ctx context.Context, currentItem *TreeNode, resourceType swagger.ResourceType) (APISetExpandResponse, error)
- func (c SwaggerAPISetContainerService) GetResourceTypes() []swagger.ResourceType
- func (c SwaggerAPISetContainerService) ID() string
- func (c SwaggerAPISetContainerService) MatchChildNodesByName() bool
- func (c SwaggerAPISetContainerService) Update(ctx context.Context, item *TreeNode, content string) error
- type SwaggerAPISetSearch
- func (c SwaggerAPISetSearch) AppliesToNode(node *TreeNode) bool
- func (c SwaggerAPISetSearch) Delete(ctx context.Context, item *TreeNode) (bool, error)
- func (c SwaggerAPISetSearch) ExpandResource(ctx context.Context, currentItem *TreeNode, resourceType swagger.ResourceType) (APISetExpandResponse, error)
- func (c SwaggerAPISetSearch) GetResourceTypes() []swagger.ResourceType
- func (c SwaggerAPISetSearch) ID() string
- func (c SwaggerAPISetSearch) MatchChildNodesByName() bool
- func (c SwaggerAPISetSearch) Update(ctx context.Context, item *TreeNode, content string) error
- type SwaggerResourceExpander
- func (e *SwaggerResourceExpander) AddAPISet(apiSet SwaggerAPISet)
- func (e *SwaggerResourceExpander) Delete(context context.Context, item *TreeNode) (bool, error)
- func (e *SwaggerResourceExpander) DoesExpand(ctx context.Context, currentItem *TreeNode) (bool, error)
- func (e *SwaggerResourceExpander) Expand(ctx context.Context, currentItem *TreeNode) ExpanderResult
- func (e *SwaggerResourceExpander) GetAPISet(id string) *SwaggerAPISet
- func (e *SwaggerResourceExpander) Name() string
- type TenantExpander
- type TreeNode
Constants ¶
const ( // SubscriptionType defines a sub SubscriptionType = "subscription" // ResourceType defines a top level resource such as a Storage Account or VM ResourceType = "resource" // MetricsType defines an item which returns a graph MetricsType = "metrics" // SubResourceType defines a resource under a resource such as a VM Extension under a VM SubResourceType = "subResource" // ActionType defines an action like `listkey` etc ActionType = "action" // ExpandURLNotSupported is used to identify items which don't support generic expansion ExpandURLNotSupported = "notsupported" )
const (
// TentantItemType a TreeNode item representing a tenant
TentantItemType = "tentantItemType"
)
Variables ¶
var ItemWidgetHeight int
ItemWidgetHeight tracks height of item widget
var ItemWidgetWidth int
ItemWidgetWidth track width of item widget
Functions ¶
func ExpandItem ¶
ExpandItem finds child nodes of the item and their content
func GetActivityLogExpandURL ¶
GetActivityLogExpandURL gets the urls which should be used to get activity logs
func InitializeExpanders ¶
InitializeExpanders create instances of all the expanders needed by the app
Types ¶
type APISetExpandResponse ¶
type APISetExpandResponse struct { Response string ResponseType ExpanderResponseType SubResources []SubResource ChildMetadata map[string]string }
APISetExpandResponse returns the result of expanding a Resource
type ActionExpander ¶
type ActionExpander struct {
// contains filtered or unexported fields
}
ActionExpander handles actions
func (*ActionExpander) DoesExpand ¶
DoesExpand checks if it is an action
func (*ActionExpander) Expand ¶
func (e *ActionExpander) Expand(ctx context.Context, currentItem *TreeNode) ExpanderResult
Expand performs the action
func (*ActionExpander) Name ¶
func (e *ActionExpander) Name() string
Name returns the name of the expander
type ActivityLogExpander ¶
type ActivityLogExpander struct {
// contains filtered or unexported fields
}
ActivityLogExpander expands activity logs under an RG
func (*ActivityLogExpander) DoesExpand ¶
DoesExpand checks if this is an RG
func (*ActivityLogExpander) Expand ¶
func (e *ActivityLogExpander) Expand(ctx context.Context, currentItem *TreeNode) ExpanderResult
Expand returns Resources in the RG
func (*ActivityLogExpander) Name ¶
func (e *ActivityLogExpander) Name() string
Name returns the name of the expander
type ActivityLogResource ¶
type ActivityLogResource struct { Value []struct { Authorization struct { Action string `json:"action"` Scope string `json:"scope"` } `json:"authorization"` Caller string `json:"caller"` Channels string `json:"channels"` Claims struct { Aud string `json:"aud"` Iss string `json:"iss"` Iat string `json:"iat"` Nbf string `json:"nbf"` Exp string `json:"exp"` Aio string `json:"aio"` Appid string `json:"appid"` Appidacr string `json:"appidacr"` HTTPSchemasMicrosoftComIdentityClaimsIdentityprovider string `json:"http://schemas.microsoft.com/identity/claims/identityprovider"` HTTPSchemasMicrosoftComIdentityClaimsObjectidentifier string `json:"http://schemas.microsoft.com/identity/claims/objectidentifier"` HTTPSchemasXmlsoapOrgWs200505IdentityClaimsNameidentifier string `json:"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"` HTTPSchemasMicrosoftComIdentityClaimsTenantid string `json:"http://schemas.microsoft.com/identity/claims/tenantid"` Uti string `json:"uti"` Ver string `json:"ver"` } `json:"claims"` CorrelationID string `json:"correlationId"` Description string `json:"description"` EventDataID string `json:"eventDataId"` EventName struct { Value string `json:"value"` LocalizedValue string `json:"localizedValue"` } `json:"eventName"` Category struct { Value string `json:"value"` LocalizedValue string `json:"localizedValue"` } `json:"category"` ID string `json:"id"` Level string `json:"level"` ResourceGroupName string `json:"resourceGroupName"` ResourceProviderName struct { Value string `json:"value"` LocalizedValue string `json:"localizedValue"` } `json:"resourceProviderName"` ResourceID string `json:"resourceId"` ResourceType struct { Value string `json:"value"` LocalizedValue string `json:"localizedValue"` } `json:"resourceType"` OperationID string `json:"operationId"` OperationName struct { Value string `json:"value"` LocalizedValue string `json:"localizedValue"` } `json:"operationName"` Properties struct { IsComplianceCheck string `json:"isComplianceCheck"` ResourceLocation string `json:"resourceLocation"` Ancestors string `json:"ancestors"` Policies string `json:"policies"` } `json:"properties,omitempty"` Status struct { Value string `json:"value"` LocalizedValue string `json:"localizedValue"` } `json:"status"` SubStatus struct { Value string `json:"value"` LocalizedValue string `json:"localizedValue"` } `json:"subStatus"` EventTimestamp time.Time `json:"eventTimestamp"` SubmissionTimestamp time.Time `json:"submissionTimestamp"` SubscriptionID string `json:"subscriptionId"` TenantID string `json:"tenantId"` HTTPRequest struct { ClientRequestID string `json:"clientRequestId"` ClientIPAddress string `json:"clientIpAddress"` Method string `json:"method"` } `json:"httpRequest,omitempty"` } `json:"value"` }
ActivityLogResource is returned when requesting activity logs for an RG
type AppInsightsExpander ¶
type AppInsightsExpander struct {
// contains filtered or unexported fields
}
AppInsightsExpander expands aspects of App Insights that don't naturally flow from the api spec
func (*AppInsightsExpander) DoesExpand ¶
DoesExpand checks if this is a node we should extend
func (*AppInsightsExpander) Expand ¶
func (e *AppInsightsExpander) Expand(ctx context.Context, currentItem *TreeNode) ExpanderResult
Expand returns nodes for App Insights
func (*AppInsightsExpander) Name ¶
func (e *AppInsightsExpander) Name() string
Name returns the name of the expander
type AzureKubernetesServiceExpander ¶
type AzureKubernetesServiceExpander struct {
// contains filtered or unexported fields
}
AzureKubernetesServiceExpander expands the kubernetes aspects of AKS
func (*AzureKubernetesServiceExpander) DoesExpand ¶
func (e *AzureKubernetesServiceExpander) DoesExpand(ctx context.Context, currentItem *TreeNode) (bool, error)
DoesExpand checks if this is a storage account
func (*AzureKubernetesServiceExpander) Expand ¶
func (e *AzureKubernetesServiceExpander) Expand(ctx context.Context, currentItem *TreeNode) ExpanderResult
Expand returns ManagementPolicies in the StorageAccount
func (*AzureKubernetesServiceExpander) Name ¶
func (e *AzureKubernetesServiceExpander) Name() string
Name returns the name of the expander
type AzureSearchServiceExpander ¶ added in v1.1.398
type AzureSearchServiceExpander struct {
// contains filtered or unexported fields
}
AzureSearchServiceExpander expands the kubernetes aspects of AKS
func (AzureSearchServiceExpander) Delete ¶ added in v1.1.398
Delete attempts to delete the item. Returns true if deleted, false if not handled, an error if an error occurred attempting to delete
func (*AzureSearchServiceExpander) DoesExpand ¶ added in v1.1.398
func (e *AzureSearchServiceExpander) DoesExpand(ctx context.Context, currentItem *TreeNode) (bool, error)
DoesExpand checks if this is a storage account
func (*AzureSearchServiceExpander) Expand ¶ added in v1.1.398
func (e *AzureSearchServiceExpander) Expand(ctx context.Context, currentItem *TreeNode) ExpanderResult
Expand returns ManagementPolicies in the StorageAccount
func (*AzureSearchServiceExpander) Name ¶ added in v1.1.398
func (e *AzureSearchServiceExpander) Name() string
Name returns the name of the expander
type ContainerGroupResponse ¶
type ContainerGroupResponse struct { ID string `json:"id"` Location string `json:"location"` Name string `json:"name"` Properties struct { Containers []struct { Name string `json:"name"` Properties struct { Command []interface{} `json:"command"` EnvironmentVariables []interface{} `json:"environmentVariables"` Image string `json:"image"` Ports []struct { Port int `json:"port"` } `json:"ports"` InstanceView struct { RestartCount int `json:"restartCount"` CurrentState struct { State string `json:"state"` StartTime time.Time `json:"startTime"` DetailStatus string `json:"detailStatus"` } `json:"currentState"` Events []struct { Count int `json:"count"` FirstTimestamp time.Time `json:"firstTimestamp"` LastTimestamp time.Time `json:"lastTimestamp"` Name string `json:"name"` Message string `json:"message"` Type string `json:"type"` } `json:"events"` } `json:"instanceView"` Resources struct { Requests struct { CPU float64 `json:"cpu"` MemoryInGB float64 `json:"memoryInGB"` } `json:"requests"` } `json:"resources"` VolumeMounts []struct { MountPath string `json:"mountPath"` Name string `json:"name"` ReadOnly bool `json:"readOnly"` } `json:"volumeMounts"` } `json:"properties"` } `json:"containers"` ImageRegistryCredentials []struct { Server string `json:"server"` Username string `json:"username"` } `json:"imageRegistryCredentials"` IPAddress struct { IP string `json:"ip"` Ports []struct { Port int `json:"port"` Protocol string `json:"protocol"` } `json:"ports"` Type string `json:"type"` } `json:"ipAddress"` OsType string `json:"osType"` ProvisioningState string `json:"provisioningState"` Volumes []struct { AzureFile struct { ReadOnly bool `json:"readOnly"` ShareName string `json:"shareName"` StorageAccountName string `json:"storageAccountName"` } `json:"azureFile"` Name string `json:"name"` } `json:"volumes"` } `json:"properties"` Type string `json:"type"` }
ContainerGroupResponse is the response to a get request on a container group
type ContainerInstanceExpander ¶
type ContainerInstanceExpander struct {
// contains filtered or unexported fields
}
ContainerInstanceExpander expands the data-plane aspects of a Container Instance
func (*ContainerInstanceExpander) DoesExpand ¶
func (e *ContainerInstanceExpander) DoesExpand(ctx context.Context, currentItem *TreeNode) (bool, error)
DoesExpand checks if this is a storage account
func (*ContainerInstanceExpander) Expand ¶
func (e *ContainerInstanceExpander) Expand(ctx context.Context, currentItem *TreeNode) ExpanderResult
Expand adds items for container instance items to the list
func (*ContainerInstanceExpander) Name ¶
func (e *ContainerInstanceExpander) Name() string
Name returns the name of the expander
type ContainerLogResponse ¶
type ContainerLogResponse struct {
Content string `json:"content"`
}
ContainerLogResponse for container logs
type ContainerRegistryExpander ¶
type ContainerRegistryExpander struct {
// contains filtered or unexported fields
}
ContainerRegistryExpander expands Tthe data-plane aspects of a Container Registry
func NewContainerRegistryExpander ¶
func NewContainerRegistryExpander(armclient *armclient.Client) *ContainerRegistryExpander
NewContainerRegistryExpander creates a new instance of ContainerRegistryExpander
func (*ContainerRegistryExpander) DoesExpand ¶
func (e *ContainerRegistryExpander) DoesExpand(ctx context.Context, currentItem *TreeNode) (bool, error)
DoesExpand checks if this is a storage account
func (*ContainerRegistryExpander) Expand ¶
func (e *ContainerRegistryExpander) Expand(ctx context.Context, currentItem *TreeNode) ExpanderResult
Expand returns ManagementPolicies in the StorageAccount
func (*ContainerRegistryExpander) Name ¶
func (e *ContainerRegistryExpander) Name() string
Name returns the name of the expander
type DefaultExpander ¶
type DefaultExpander struct {
// contains filtered or unexported fields
}
DefaultExpander expands RGs under a subscription
var DefaultExpanderInstance DefaultExpander
DefaultExpanderInstance provides an instance of the default expander for use
func (*DefaultExpander) DoesExpand ¶
DoesExpand checks if this handler can expand this item
func (*DefaultExpander) Expand ¶
func (e *DefaultExpander) Expand(ctx context.Context, currentItem *TreeNode) ExpanderResult
Expand returns resource
func (*DefaultExpander) Name ¶
func (e *DefaultExpander) Name() string
Name returns the name of the expander
type DeploymentOperationsResponse ¶
type DeploymentOperationsResponse struct { Value []struct { ID string `json:"id"` OperationID string `json:"operationId"` Properties struct { StatusCode string `json:"statusCode"` StatusMessage interface{} `json:"statusMessage"` Timestamp string `json:"timestamp"` Duration string `json:"duration"` ProvisioningOperation string `json:"provisioningOperation"` ProvisioningState string `json:"provisioningState"` TrackingID string `json:"trackingId"` TargetResource struct { ID string `json:"id"` ResourceType string `json:"resourceType"` ResourceName string `json:"resourceName"` } `json:"targetResource"` } `json:"properties"` } `json:"value"` }
DeploymentOperationsResponse is a struct to enable splitting out json value array
type DeploymentsExpander ¶
type DeploymentsExpander struct {
// contains filtered or unexported fields
}
DeploymentsExpander expands RGs under a subscription
func (*DeploymentsExpander) DoesExpand ¶
DoesExpand checks if this is an RG
func (*DeploymentsExpander) Expand ¶
func (e *DeploymentsExpander) Expand(ctx context.Context, currentItem *TreeNode) ExpanderResult
Expand returns Resources in the RG
func (*DeploymentsExpander) Name ¶
func (e *DeploymentsExpander) Name() string
Name returns the name of the expander
type DeploymentsResponse ¶
type DeploymentsResponse struct { Value []struct { ID string `json:"id"` Name string `json:"name"` Properties struct { CorrelationID string `json:"correlationId"` Dependencies []struct { DependsOn []struct { ID string `json:"id"` ResourceName string `json:"resourceName"` ResourceType string `json:"resourceType"` } `json:"dependsOn"` ID string `json:"id"` ResourceName string `json:"resourceName"` ResourceType string `json:"resourceType"` } `json:"dependencies"` Duration string `json:"duration"` Mode string `json:"mode"` OutputResources []struct { ID string `json:"id"` } `json:"outputResources"` Outputs map[string]interface{} `json:"outputs"` Parameters map[string]interface{} `json:"parameters"` Providers []struct { Namespace string `json:"namespace"` ResourceTypes []struct { Locations []string `json:"locations"` ResourceType string `json:"resourceType"` } `json:"resourceTypes"` } `json:"providers"` ProvisioningState string `json:"provisioningState"` TemplateHash string `json:"templateHash"` Template map[string]interface{} `json:"template"` TemplateLink struct { ContentVersion string `json:"contentVersion"` URI string `json:"uri"` } `json:"templateLink"` Timestamp string `json:"timestamp"` } `json:"properties"` } `json:"value"` }
DeploymentsResponse is returned by a request for deployments in an RG
type Expander ¶
type Expander interface { DoesExpand(ctx context.Context, currentNode *TreeNode) (bool, error) Expand(ctx context.Context, currentNode *TreeNode) ExpanderResult Name() string }
Expander is used to open/expand items in the left list panel a single item can be expanded by 1 or more expanders each Expander provides two methods. `DoesExpand` should return true if this expander can expand the resource `Expand` returns the list of sub items from the resource
type ExpanderResponse ¶
type ExpanderResponse struct { Response string // the response text ResponseType ExpanderResponseType // the response }
ExpanderResponse captures the response text and formt of an expander response
type ExpanderResponseType ¶
type ExpanderResponseType string
ExpanderResponseType is used to indicate the text format of a response
const ( // ResponsePlainText indicates the response type should not be parsed or colourised ResponsePlainText ExpanderResponseType = "Text" // ResponseJSON indicates the response type can be parsed and colourised as JSON ResponseJSON ExpanderResponseType = "JSON" // ResponseYAML indicates the response type can be parsed and colourised as YAML ResponseYAML ExpanderResponseType = "YAML" )
type ExpanderResult ¶
type ExpanderResult struct { Response ExpanderResponse Nodes []*TreeNode Err error SourceDescription string // When set to true this causes the response // in the result to be displayed in the content panel IsPrimaryResponse bool }
ExpanderResult used to wrap mult-value return for use in channels
type JSONExpander ¶
type JSONExpander struct{}
JSONExpander expands an item with "jsonItem" in its metadata
func (*JSONExpander) DoesExpand ¶
DoesExpand checks if this is an RG
func (*JSONExpander) Expand ¶
func (e *JSONExpander) Expand(ctx context.Context, currentItem *TreeNode) ExpanderResult
Expand returns Resources in the RG
func (*JSONExpander) Name ¶
func (e *JSONExpander) Name() string
Name returns the name of the expander
type MetricsExpander ¶
type MetricsExpander struct {
// contains filtered or unexported fields
}
MetricsExpander expands the data-plane aspects of the Microsoft.Insights RP
func (*MetricsExpander) DoesExpand ¶
DoesExpand checks if this is a storage account
func (*MetricsExpander) Expand ¶
func (e *MetricsExpander) Expand(ctx context.Context, currentItem *TreeNode) ExpanderResult
Expand adds items for metrics to the list
func (*MetricsExpander) Name ¶
func (e *MetricsExpander) Name() string
Name returns the name of the expander
type ResourceGroupResourceExpander ¶
type ResourceGroupResourceExpander struct {
// contains filtered or unexported fields
}
ResourceGroupResourceExpander expands resource under an RG
func (*ResourceGroupResourceExpander) DoesExpand ¶
func (e *ResourceGroupResourceExpander) DoesExpand(ctx context.Context, currentItem *TreeNode) (bool, error)
DoesExpand checks if this is an RG
func (*ResourceGroupResourceExpander) Expand ¶
func (e *ResourceGroupResourceExpander) Expand(ctx context.Context, currentItem *TreeNode) ExpanderResult
Expand returns Resources in the RG
func (*ResourceGroupResourceExpander) Name ¶
func (e *ResourceGroupResourceExpander) Name() string
Name returns the name of the expander
type ResourceGroupResponse ¶
type ResourceGroupResponse struct { Groups []struct { ID string `json:"id"` Name string `json:"name"` Location string `json:"location"` Properties struct { ProvisioningState string `json:"provisioningState"` } `json:"properties"` } `json:"value"` }
ResourceGroupResponse ResourceGroup rest type
type StorageManagementPoliciesExpander ¶
type StorageManagementPoliciesExpander struct{}
StorageManagementPoliciesExpander expands The default management policy under a storage account
func (*StorageManagementPoliciesExpander) DoesExpand ¶
func (e *StorageManagementPoliciesExpander) DoesExpand(ctx context.Context, currentItem *TreeNode) (bool, error)
DoesExpand checks if this is a storage account
func (*StorageManagementPoliciesExpander) Expand ¶
func (e *StorageManagementPoliciesExpander) Expand(ctx context.Context, currentItem *TreeNode) ExpanderResult
Expand returns ManagementPolicies in the StorageAccount
func (*StorageManagementPoliciesExpander) Name ¶
func (e *StorageManagementPoliciesExpander) Name() string
Name returns the name of the expander
type SubResource ¶
type SubResource struct { ID string Name string ResourceType swagger.ResourceType ExpandURL string DeleteURL string Metadata map[string]string }
SubResource is used to pass sub resource information from SwaggerAPISet to the expander
type SubResponse ¶
type SubResponse struct { Subs []struct { ID string `json:"id"` SubscriptionID string `json:"subscriptionId"` DisplayName string `json:"displayName"` State string `json:"state"` SubscriptionPolicies struct { LocationPlacementID string `json:"locationPlacementId"` QuotaID string `json:"quotaId"` SpendingLimit string `json:"spendingLimit"` } `json:"subscriptionPolicies"` } `json:"value"` }
SubResponse Subscriptions REST type
type SubscriptionExpander ¶
type SubscriptionExpander struct {
// contains filtered or unexported fields
}
SubscriptionExpander expands RGs under a subscription
func (*SubscriptionExpander) DoesExpand ¶
DoesExpand checks if this is an RG
func (*SubscriptionExpander) Expand ¶
func (e *SubscriptionExpander) Expand(ctx context.Context, currentItem *TreeNode) ExpanderResult
Expand returns Resources in the RG
func (*SubscriptionExpander) Name ¶
func (e *SubscriptionExpander) Name() string
Name returns the name of the expander
type SwaggerAPISet ¶
type SwaggerAPISet interface { ID() string GetResourceTypes() []swagger.ResourceType AppliesToNode(node *TreeNode) bool ExpandResource(context context.Context, node *TreeNode, resourceType swagger.ResourceType) (APISetExpandResponse, error) MatchChildNodesByName() bool Delete(context context.Context, node *TreeNode) (bool, error) Update(context context.Context, node *TreeNode, content string) error }
SwaggerAPISet represents the configuration for a set of swagger API endpoints that the SwaggerResourceExpander can handle
type SwaggerAPISetARMResources ¶
type SwaggerAPISetARMResources struct {
// contains filtered or unexported fields
}
SwaggerAPISetARMResources holds the config for working with ARM resources as per the published Swagger specs
func NewSwaggerAPISetARMResources ¶
func NewSwaggerAPISetARMResources(client *armclient.Client) SwaggerAPISetARMResources
NewSwaggerAPISetARMResources creates a new SwaggerAPISetARMResources
func (SwaggerAPISetARMResources) AppliesToNode ¶
func (c SwaggerAPISetARMResources) AppliesToNode(node *TreeNode) bool
AppliesToNode is called by the Swagger exapnder to test whether the node applies to this APISet
func (SwaggerAPISetARMResources) Delete ¶
Delete attempts to delete the item. Returns true if deleted, false if not handled, an error if an error occurred attempting to delete
func (SwaggerAPISetARMResources) ExpandResource ¶
func (c SwaggerAPISetARMResources) ExpandResource(ctx context.Context, currentItem *TreeNode, resourceType swagger.ResourceType) (APISetExpandResponse, error)
ExpandResource returns metadata about child resources of the specified resource node
func (SwaggerAPISetARMResources) GetResourceTypes ¶
func (c SwaggerAPISetARMResources) GetResourceTypes() []swagger.ResourceType
GetResourceTypes returns the ResourceTypes for the API Set
func (SwaggerAPISetARMResources) ID ¶
func (c SwaggerAPISetARMResources) ID() string
ID returns the ID for the APISet
func (SwaggerAPISetARMResources) MatchChildNodesByName ¶
func (c SwaggerAPISetARMResources) MatchChildNodesByName() bool
MatchChildNodesByName indicates whether child nodes should be matched by name (or position)
type SwaggerAPISetContainerService ¶
type SwaggerAPISetContainerService struct {
// contains filtered or unexported fields
}
SwaggerAPISetContainerService holds the config for working with an AKS cluster API
func NewSwaggerAPISetContainerService ¶
func NewSwaggerAPISetContainerService(resourceTypes []swagger.ResourceType, httpClient http.Client, clusterID string, serverURL string) SwaggerAPISetContainerService
NewSwaggerAPISetContainerService creates a new SwaggerAPISetContainerService
func (SwaggerAPISetContainerService) AppliesToNode ¶
func (c SwaggerAPISetContainerService) AppliesToNode(node *TreeNode) bool
AppliesToNode is called by the Swagger exapnder to test whether the node applies to this APISet
func (SwaggerAPISetContainerService) Delete ¶
Delete attempts to delete the item. Returns true if deleted, false if not handled, an error if an error occurred attempting to delete
func (SwaggerAPISetContainerService) ExpandResource ¶
func (c SwaggerAPISetContainerService) ExpandResource(ctx context.Context, currentItem *TreeNode, resourceType swagger.ResourceType) (APISetExpandResponse, error)
ExpandResource returns metadata about child resources of the specified resource node
func (SwaggerAPISetContainerService) GetResourceTypes ¶
func (c SwaggerAPISetContainerService) GetResourceTypes() []swagger.ResourceType
GetResourceTypes returns the ResourceTypes for the API Set
func (SwaggerAPISetContainerService) ID ¶
func (c SwaggerAPISetContainerService) ID() string
ID returns the ID for the APISet
func (SwaggerAPISetContainerService) MatchChildNodesByName ¶
func (c SwaggerAPISetContainerService) MatchChildNodesByName() bool
MatchChildNodesByName indicates whether child nodes should be matched by name (or position)
type SwaggerAPISetSearch ¶ added in v1.1.398
type SwaggerAPISetSearch struct {
// contains filtered or unexported fields
}
SwaggerAPISetSearch holds the config for working with an Azure Search Service
func NewSwaggerAPISetSearch ¶ added in v1.1.398
func NewSwaggerAPISetSearch(resourceTypes []swagger.ResourceType, searchID string, searchEndpoint string, adminKey string) SwaggerAPISetSearch
NewSwaggerAPISetSearch creates a new SwaggerAPISetSearch
func (SwaggerAPISetSearch) AppliesToNode ¶ added in v1.1.398
func (c SwaggerAPISetSearch) AppliesToNode(node *TreeNode) bool
AppliesToNode is called by the Swagger exapnder to test whether the node applies to this APISet
func (SwaggerAPISetSearch) Delete ¶ added in v1.1.398
Delete attempts to delete the item. Returns true if deleted, false if not handled, an error if an error occurred attempting to delete
func (SwaggerAPISetSearch) ExpandResource ¶ added in v1.1.398
func (c SwaggerAPISetSearch) ExpandResource(ctx context.Context, currentItem *TreeNode, resourceType swagger.ResourceType) (APISetExpandResponse, error)
ExpandResource returns metadata about child resources of the specified resource node
func (SwaggerAPISetSearch) GetResourceTypes ¶ added in v1.1.398
func (c SwaggerAPISetSearch) GetResourceTypes() []swagger.ResourceType
GetResourceTypes returns the ResourceTypes for the API Set
func (SwaggerAPISetSearch) ID ¶ added in v1.1.398
func (c SwaggerAPISetSearch) ID() string
ID returns the ID for the APISet
func (SwaggerAPISetSearch) MatchChildNodesByName ¶ added in v1.1.398
func (c SwaggerAPISetSearch) MatchChildNodesByName() bool
MatchChildNodesByName indicates whether child nodes should be matched by name (or position)
type SwaggerResourceExpander ¶
type SwaggerResourceExpander struct {
// contains filtered or unexported fields
}
SwaggerResourceExpander expands resource under an AppService
func GetSwaggerResourceExpander ¶
func GetSwaggerResourceExpander() *SwaggerResourceExpander
GetSwaggerResourceExpander returns the (singleton) instance of SwaggerResourceExpander
func NewSwaggerResourcesExpander ¶
func NewSwaggerResourcesExpander() *SwaggerResourceExpander
NewSwaggerResourcesExpander creates a new SwaggerResourceExpander
func (*SwaggerResourceExpander) AddAPISet ¶
func (e *SwaggerResourceExpander) AddAPISet(apiSet SwaggerAPISet)
AddAPISet adds a SwaggerAPISet to the APIs that the expander will handle
func (*SwaggerResourceExpander) Delete ¶
Delete attempts to delete the item. Returns true if deleted, false if not handled, an error if an error occurred attempting to delete
func (*SwaggerResourceExpander) DoesExpand ¶
func (e *SwaggerResourceExpander) DoesExpand(ctx context.Context, currentItem *TreeNode) (bool, error)
DoesExpand checks if this is an RG
func (*SwaggerResourceExpander) Expand ¶
func (e *SwaggerResourceExpander) Expand(ctx context.Context, currentItem *TreeNode) ExpanderResult
Expand returns Resources in the RG
func (*SwaggerResourceExpander) GetAPISet ¶
func (e *SwaggerResourceExpander) GetAPISet(id string) *SwaggerAPISet
GetAPISet returns a SwaggerAPISet by id
func (*SwaggerResourceExpander) Name ¶
func (e *SwaggerResourceExpander) Name() string
Name returns the name of the expander
type TenantExpander ¶
type TenantExpander struct {
// contains filtered or unexported fields
}
TenantExpander expands the subscriptions under a tenant
func (*TenantExpander) DoesExpand ¶
DoesExpand checks if this is an RG
func (*TenantExpander) Expand ¶
func (e *TenantExpander) Expand(ctx context.Context, currentItem *TreeNode) ExpanderResult
Expand returns Resources in the RG
func (*TenantExpander) Name ¶
func (e *TenantExpander) Name() string
Name returns the name of the expander
type TreeNode ¶
type TreeNode struct { Parentid string // The ID of the parent resource ID string // The ID of the resource in ARM Name string // The name of the object returned by the API Display string // The Text used to draw the object in the list ExpandURL string // The URL to call to expand the item ItemType string // The type of item either subscription, resourcegroup, resource, deployment or action ExpandReturnType string // The type of the items returned by the expandURL DeleteURL string // The URL to call to delete the current resource Namespace string // The ARM Namespace of the item eg StorageAccount ArmType string // The ARM type of the item eg Microsoft.Storage/StorageAccount Metadata map[string]string // Metadata is used to pass arbritray data between `Expander`'s SubscriptionID string // The SubId of this item StatusIndicator string // Displays the resources status SwaggerResourceType *swagger.ResourceType // caches the swagger ResourceType to avoid repeated lookups Expander Expander // The Expander that created the node (set automatically by the list) }
TreeNode is an item in the ListWidget
Source Files ¶
- action.go
- activitylog.go
- appInsights.go
- containerInstance.go
- containerRegistry.go
- containerService-swaggerApiSet.go
- containerService.go
- default.go
- deployments.go
- expander.go
- json.go
- metrics.go
- registerExpanders.go
- resourcegroup.go
- search-swaggerApiSet.go
- search.generated.go
- search.go
- storageManagementPolicies.go
- subscription.go
- swagger-armspecs.generated.go
- swagger-armspecs.go
- swagger.go
- tentant.go
- test_utils.go
- types.go
- utils.go