Documentation
¶
Index ¶
- Variables
- func NewApplicationView(ctx context.Context, app *App) model.Component
- func NewClusterView(ctx context.Context, app *App) model.Component
- func NewK8SView(ctx context.Context, app *App) model.Component
- type App
- type ApplicationView
- type ClusterView
- type Command
- type HelpView
- type K8SView
- type PageStack
- type ResourceView
- type ResourceViewer
- type Table
Constants ¶
This section is empty.
Variables ¶
var ResourceMap = map[string]ResourceViewer{ "app": { // contains filtered or unexported fields }, "cluster": { // contains filtered or unexported fields }, "k8s": { // contains filtered or unexported fields }, }
ResourceMap is a map from resource name to resource's renderer
Functions ¶
func NewApplicationView ¶
NewApplicationView return a new application view
func NewClusterView ¶
NewClusterView return a new cluster view
Types ¶
type App ¶
App application object
type ApplicationView ¶
type ApplicationView struct { *ResourceView // contains filtered or unexported fields }
ApplicationView is the application view, this view display info of application of KubeVela
func (*ApplicationView) ColorizeStatusText ¶
func (v *ApplicationView) ColorizeStatusText(rowNum int)
ColorizeStatusText colorize the status column text
func (*ApplicationView) Hint ¶
func (v *ApplicationView) Hint() []model.MenuHint
Hint return key action menu hints of the application view
func (*ApplicationView) ListApplications ¶
func (v *ApplicationView) ListApplications() model.ResourceList
ListApplications list all applications
func (*ApplicationView) Name ¶
func (v *ApplicationView) Name() string
Name return application view name
type ClusterView ¶
type ClusterView struct { *ResourceView // contains filtered or unexported fields }
ClusterView is the cluster view, this view display info of cluster where selected application deployed
func (*ClusterView) Hint ¶
func (v *ClusterView) Hint() []model.MenuHint
Hint return key action menu hints of the cluster view
func (*ClusterView) ListClusters ¶
func (v *ClusterView) ListClusters() model.ResourceList
ListClusters list clusters where application deployed
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command is a kind of abstract of user UI operation
type HelpView ¶
type HelpView struct { *Table // contains filtered or unexported fields }
HelpView is the view which display help tips about how to use app
type K8SView ¶
type K8SView struct { *ResourceView // contains filtered or unexported fields }
K8SView is a view which displays info of kubernetes objects which are generated when application deployed
func (*K8SView) ColorizeStatusText ¶
ColorizeStatusText colorize the status column text
func (*K8SView) ListK8SObjects ¶
func (v *K8SView) ListK8SObjects() model.ResourceList
ListK8SObjects return kubernetes objects of the aimed application
type PageStack ¶
PageStack store views of app's main view, and it's a high level packing of "component.Pages"
type ResourceView ¶
type ResourceView struct { *Table // contains filtered or unexported fields }
ResourceView is an abstract of resource view
func NewResourceView ¶
func NewResourceView(app *App) *ResourceView
NewResourceView return a new resource view
func (*ResourceView) Init ¶
func (v *ResourceView) Init(list model.ResourceList)
Init the resource view
type ResourceViewer ¶
type ResourceViewer struct {
// contains filtered or unexported fields
}
ResourceViewer is resource's renderer