Documentation ¶
Index ¶
- Variables
- func GetClient(ctx *cli.Context) (*cliclient.MasterClient, error)
- func GetHarvesterClient(host string, token string) (*harvclient.Clientset, error)
- func GetKubernetesClient(host string, token string) (*k8s.Clientset, error)
- func GetResourceType(c *cliclient.MasterClient, resource string) (string, error)
- func Lookup(c *cliclient.MasterClient, name string, types ...string) (*ntypes.Resource, error)
- func MustPVCTemplatesToString(pvcs []k8sv1.PersistentVolumeClaim) string
- func NewTrue() *bool
- func PVCTemplatesToString(pvcs []k8sv1.PersistentVolumeClaim) (string, error)
- func PointerToUint(i uint) *uint
- func RandomID() string
- func RandomLetters(n int) string
- func RandomName() string
- func SimpleFormat(values [][]string) (string, string)
- func SplitOnColon(s string) []string
- type AliEcs
- func (ecs *AliEcs) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error)
- func (ecs *AliEcs) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error)
- func (ecs *AliEcs) DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (*pbecs.DeleteEcsResp, error)
- func (ecs *AliEcs) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*pbecs.ListDetailResp, error)
- func (ecs *AliEcs) UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (*pbecs.UpdateEcsResp, error)
- type Config
- type Ecser
- type HarVMer
- func (h *HarVMer) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error)
- func (h *HarVMer) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (resp *pbecs.CreateEcsResp, err error)
- func (h *HarVMer) DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (resp *pbecs.DeleteEcsResp, err error)
- func (h *HarVMer) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (resp *pbecs.ListDetailResp, err error)
- func (h *HarVMer) UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (resp *pbecs.UpdateEcsResp, err error)
- type HuaweiEcs
- func (ecs *HuaweiEcs) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error)
- func (ecs *HuaweiEcs) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error)
- func (ecs *HuaweiEcs) DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (*pbecs.DeleteEcsResp, error)
- func (ecs *HuaweiEcs) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*pbecs.ListDetailResp, error)
- func (ecs *HuaweiEcs) UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (*pbecs.UpdateEcsResp, error)
- type MemberData
- type RoleTemplate
- type RoleTemplateBinding
- type TencentCvm
- func (ecs *TencentCvm) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error)
- func (ecs *TencentCvm) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error)
- func (ecs *TencentCvm) DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (*pbecs.DeleteEcsResp, error)
- func (ecs *TencentCvm) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*pbecs.ListDetailResp, error)
- func (ecs *TencentCvm) UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (*pbecs.UpdateEcsResp, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEcsListNotSupported = errors.New("cloud not supported ecs list") ErrEcserPanic = errors.New("ecs init panic") )
View Source
var ( // ManagementResourceTypes lists the types we use the management client for ManagementResourceTypes = []string{"cluster", "node", "project"} // ProjectResourceTypes lists the types we use the cluster client for ProjectResourceTypes = []string{"secret", "namespacedSecret", "workload"} // ClusterResourceTypes lists the types we use the project client for ClusterResourceTypes = []string{"persistentVolume", "storageClass", "namespace"} )
Functions ¶
func GetHarvesterClient ¶
func GetHarvesterClient(host string, token string) (*harvclient.Clientset, error)
GetHarvesterClient creates a Client for Harvester from Config input
func GetKubernetesClient ¶
GetKubernetesClient creates a Client for Kubernetes from Config input
func GetResourceType ¶
func GetResourceType(c *cliclient.MasterClient, resource string) (string, error)
GetResourceType maps an incoming resource type to a valid one from the schema
func Lookup ¶
func MustPVCTemplatesToString ¶
func MustPVCTemplatesToString(pvcs []k8sv1.PersistentVolumeClaim) string
func PVCTemplatesToString ¶
func PVCTemplatesToString(pvcs []k8sv1.PersistentVolumeClaim) (string, error)
func RandomID ¶
func RandomID() string
RandomID returns a random string used as an ID internally in Harvester.
func RandomLetters ¶
RandomLetters returns a string with random letters of length n
Types ¶
type AliEcs ¶
type AliEcs struct {
// contains filtered or unexported fields
}
func (*AliEcs) ActionEcs ¶
func (*AliEcs) CreateEcs ¶
func (ecs *AliEcs) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error)
func (*AliEcs) DeleteEcs ¶
func (ecs *AliEcs) DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (*pbecs.DeleteEcsResp, error)
func (*AliEcs) ListDetail ¶
func (ecs *AliEcs) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*pbecs.ListDetailResp, error)
func (*AliEcs) UpdateEcs ¶
func (ecs *AliEcs) UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (*pbecs.UpdateEcsResp, error)
type Ecser ¶
type Ecser interface { CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (resp *pbecs.CreateEcsResp, err error) //创建ecs DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (resp *pbecs.DeleteEcsResp, err error) //批量删除ecs UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (resp *pbecs.UpdateEcsResp, err error) //修改ecs ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (resp *pbecs.ListDetailResp, err error) //查询ecs详情 ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error) //操作ecs }
type HarVMer ¶
type HarVMer struct {
// contains filtered or unexported fields
}
func (*HarVMer) ActionEcs ¶
func (*HarVMer) CreateEcs ¶
func (h *HarVMer) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (resp *pbecs.CreateEcsResp, err error)
func (*HarVMer) DeleteEcs ¶
func (h *HarVMer) DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (resp *pbecs.DeleteEcsResp, err error)
func (*HarVMer) ListDetail ¶
func (h *HarVMer) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (resp *pbecs.ListDetailResp, err error)
func (*HarVMer) UpdateEcs ¶
func (h *HarVMer) UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (resp *pbecs.UpdateEcsResp, err error)
type HuaweiEcs ¶
type HuaweiEcs struct {
// contains filtered or unexported fields
}
func (*HuaweiEcs) ActionEcs ¶
func (*HuaweiEcs) CreateEcs ¶
func (ecs *HuaweiEcs) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error)
func (*HuaweiEcs) DeleteEcs ¶
func (ecs *HuaweiEcs) DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (*pbecs.DeleteEcsResp, error)
func (*HuaweiEcs) ListDetail ¶
func (ecs *HuaweiEcs) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*pbecs.ListDetailResp, error)
func (*HuaweiEcs) UpdateEcs ¶
func (ecs *HuaweiEcs) UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (*pbecs.UpdateEcsResp, error)
type RoleTemplateBinding ¶
type TencentCvm ¶
type TencentCvm struct {
// contains filtered or unexported fields
}
func (*TencentCvm) ActionEcs ¶
func (ecs *TencentCvm) ActionEcs(ctx context.Context, req *pbecs.ActionReq) (resp *pbecs.ActionResp, err error)
func (*TencentCvm) CreateEcs ¶
func (ecs *TencentCvm) CreateEcs(ctx context.Context, req *pbecs.CreateEcsReq) (*pbecs.CreateEcsResp, error)
func (*TencentCvm) DeleteEcs ¶
func (ecs *TencentCvm) DeleteEcs(ctx context.Context, req *pbecs.DeleteEcsReq) (*pbecs.DeleteEcsResp, error)
func (*TencentCvm) ListDetail ¶
func (ecs *TencentCvm) ListDetail(ctx context.Context, req *pbecs.ListDetailReq) (*pbecs.ListDetailResp, error)
func (*TencentCvm) UpdateEcs ¶
func (ecs *TencentCvm) UpdateEcs(ctx context.Context, req *pbecs.UpdateEcsReq) (*pbecs.UpdateEcsResp, error)
Click to show internal directories.
Click to hide internal directories.