utils

package
v0.0.0-...-32702a7 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

copied from clusternet.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(decryptStr string, key []byte, iv string) (string, error)

解密

func AesEncrypt

func AesEncrypt(encryptStr string, key []byte, iv string) (string, error)

加密 aes_128_cbc

func CreateKubeConfigWithToken

func CreateKubeConfigWithToken(serverURL, token string, caCert []byte) *clientcmdapi.Config

CreateKubeConfigWithToken creates a KubeConfig object with access to the API server with a token

func CreateSign

func CreateSign(appKey, appSecret string) string

func GenerateKubeConfigFromToken

func GenerateKubeConfigFromToken(serverURL, token string, caCert []byte, flowRate int) (*rest.Config, error)

GenerateKubeConfigFromToken composes a kubeconfig from token

func Int64Addr

func Int64Addr(i int64) *int64

func LoadsKubeConfig

func LoadsKubeConfig(kubeConfigPath string, flowRate int) (*rest.Config, error)

LoadsKubeConfig tries to load kubeconfig from specified kubeconfig file or in-cluster config

func MD5

func MD5(str string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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