resource

package
v0.0.0-...-a2c330a Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteClusterForProduct

func DeleteClusterForProduct(clusterId string) error

从产品表里删除对应的cluster

func DeleteNamespaceForProduct

func DeleteNamespaceForProduct(namespace string) error

从产品表里删除对应的namespace

func In

func In(s string, l []string) bool

func PatchNamespaceForProduct

func PatchNamespaceForProduct(clusterId string) error

从产品表中删除集群对应的Namespace

func SliceInsert

func SliceInsert(s []menu, index int, value menu) []menu

func UniqueList

func UniqueList(l []string) []string

Types

type Cascade

type Cascade struct {
	common.InfoType
	Children []*Cascade `json:"children"`
}

type ClusterPluginResource

type ClusterPluginResource struct {
	Params   *handle.Resources
	PostData *common.PluginDB
	Plugin   string `json:"plugin "`
}

func (*ClusterPluginResource) Install

func (r *ClusterPluginResource) Install() error

func (*ClusterPluginResource) List

func (r *ClusterPluginResource) List() (interface{}, error)

func (*ClusterPluginResource) UnInstall

func (r *ClusterPluginResource) UnInstall() error

type ClusterResource

type ClusterResource struct {
	Params *handle.Resources
	common.ClusterDB
}

func (*ClusterResource) Create

func (r *ClusterResource) Create(c *gin.Context) (err error)

func (*ClusterResource) Delete

func (r *ClusterResource) Delete() (err error)

func (*ClusterResource) DeleteClusterForUser

func (r *ClusterResource) DeleteClusterForUser(clusterId string) error

从User表中删除对应的Cluster

func (*ClusterResource) DeleteNamespaceForNamespace

func (r *ClusterResource) DeleteNamespaceForNamespace(clusterId string) error

从namespace表中删除对应的namespace

func (*ClusterResource) Get

func (r *ClusterResource) Get() (interface{}, error)

func (*ClusterResource) List

func (r *ClusterResource) List() (interface{}, error)

func (*ClusterResource) Update

func (r *ClusterResource) Update(c *gin.Context) (err error)

type ConfigResource

type ConfigResource struct {
	Params     *handle.Resources
	ConfigType string
	PostData   *common.ConfigDB
}

func (*ConfigResource) Create

func (r *ConfigResource) Create(c *gin.Context) (err error)

func (*ConfigResource) Delete

func (r *ConfigResource) Delete() (err error)

func (*ConfigResource) Get

func (r *ConfigResource) Get() (interface{}, error)

func (*ConfigResource) LDAPTest

func (r *ConfigResource) LDAPTest(c *gin.Context) (err error)

func (*ConfigResource) List

func (r *ConfigResource) List() (interface{}, error)

func (*ConfigResource) Update

func (r *ConfigResource) Update(c *gin.Context) (err error)
type MenuResource struct {
	Params   *handle.Resources
	PostData *common.PlatformRoleDB
}
func (r *MenuResource) Get() (interface{}, error)

type PlatformRoleResource

type PlatformRoleResource struct {
	Params   *handle.Resources
	PostData *common.PlatformRoleDB
}

func (*PlatformRoleResource) Create

func (r *PlatformRoleResource) Create(c *gin.Context) (err error)

func (*PlatformRoleResource) Delete

func (r *PlatformRoleResource) Delete() (err error)

func (*PlatformRoleResource) Get

func (r *PlatformRoleResource) Get() (interface{}, error)

func (*PlatformRoleResource) List

func (r *PlatformRoleResource) List() (interface{}, error)

func (*PlatformRoleResource) ListPlatformRoleTree

func (r *PlatformRoleResource) ListPlatformRoleTree() (interface{}, error)

func (*PlatformRoleResource) Update

func (r *PlatformRoleResource) Update(c *gin.Context) (err error)

type PluginResource

type PluginResource struct {
	Params   *handle.Resources
	PostData *common.PluginDB
}

func (*PluginResource) Create

func (r *PluginResource) Create(c *gin.Context) (err error)

func (*PluginResource) Delete

func (r *PluginResource) Delete() (err error)

func (*PluginResource) Get

func (r *PluginResource) Get() (interface{}, error)

func (*PluginResource) List

func (r *PluginResource) List() (interface{}, error)

func (*PluginResource) Update

func (r *PluginResource) Update(c *gin.Context) (err error)

type ProductResource

type ProductResource struct {
	Params   *handle.Resources
	PostData *common.ProductDB
}

func (*ProductResource) CascadeAll

func (r *ProductResource) CascadeAll() (interface{}, error)

级联查询所有产品线--集群--Namespace

func (*ProductResource) CascadeCluster

func (r *ProductResource) CascadeCluster() (interface{}, error)

根据用户权限的级联列出产品线--集群--Namespace

func (*ProductResource) Create

func (r *ProductResource) Create(c *gin.Context) (err error)

func (*ProductResource) Delete

func (r *ProductResource) Delete() (err error)

func (*ProductResource) Get

func (r *ProductResource) Get() (interface{}, error)

func (*ProductResource) List

func (r *ProductResource) List() (interface{}, error)

func (*ProductResource) TreeClusterNamespace

func (r *ProductResource) TreeClusterNamespace() (interface{}, error)

级联列出集群--Namespace

func (*ProductResource) Update

func (r *ProductResource) Update(c *gin.Context) (err error)

type ProductResponse

type ProductResponse struct {
	common.Info
	Cluster    []common.Info `json:"cluster"`
	Namespace  []common.Info `json:"namespace"`
	CreateTime int64         `json:"createTime"`
	ModifyTime int64         `json:"modifyTime"`
}

type TemplateResource

type TemplateResource struct {
	Params   *handle.Resources
	PostData *common.TemplateDB
}

func (*TemplateResource) Create

func (r *TemplateResource) Create(c *gin.Context) (err error)

func (*TemplateResource) Delete

func (r *TemplateResource) Delete() (err error)

func (*TemplateResource) Get

func (r *TemplateResource) Get() (interface{}, error)

func (*TemplateResource) List

func (r *TemplateResource) List() (interface{}, error)

func (*TemplateResource) Update

func (r *TemplateResource) Update(c *gin.Context) (err error)

Jump to

Keyboard shortcuts

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