Documentation ¶
Index ¶
- Constants
- func EncodePrivateKeyToPEM(privateKey *rsa.PrivateKey) []byte
- func GeneratePrivateKey(bitSize int) (*rsa.PrivateKey, error)
- func GeneratePublicKey(publicKey *rsa.PublicKey) ([]byte, error)
- func ResponseBody(obj interface{}) []byte
- func ResponseError(rw http.ResponseWriter, statusCode int, err error)
- func ResponseErrorMsg(rw http.ResponseWriter, statusCode int, errMsg string)
- func ResponseOK(rw http.ResponseWriter)
- func ResponseOKWithBody(rw http.ResponseWriter, obj interface{})
- func VirtClientUpdateVmi(ctx context.Context, client rest.Interface, ...) error
Constants ¶
View Source
const ( RemovedPVCsAnnotationKey = prefix + "/removedPersistentVolumeClaims" AnnotationMigrationTarget = prefix + "/migrationTargetNodeName" AnnotationMigrationUID = prefix + "/migrationUID" AnnotationMigrationState = prefix + "/migrationState" AnnotationTimestamp = prefix + "/timestamp" AnnotationVolumeClaimTemplates = prefix + "/volumeClaimTemplates" AnnotationImageID = prefix + "/imageId" LonghornSystemNamespaceName = "longhorn-system" )
Variables ¶
This section is empty.
Functions ¶
func EncodePrivateKeyToPEM ¶
func EncodePrivateKeyToPEM(privateKey *rsa.PrivateKey) []byte
EncodePrivateKeyToPEM encodes Private Key from RSA to PEM format
func GeneratePrivateKey ¶
func GeneratePrivateKey(bitSize int) (*rsa.PrivateKey, error)
GeneratePrivateKey creates a RSA Private Key of specified byte size
func GeneratePublicKey ¶
GeneratePublicKey take a rsa.PublicKey and return bytes suitable for writing to .pub file returns in the format "ssh-rsa ..."
func ResponseBody ¶
func ResponseBody(obj interface{}) []byte
func ResponseError ¶
func ResponseError(rw http.ResponseWriter, statusCode int, err error)
func ResponseErrorMsg ¶
func ResponseErrorMsg(rw http.ResponseWriter, statusCode int, errMsg string)
func ResponseOK ¶
func ResponseOK(rw http.ResponseWriter)
func ResponseOKWithBody ¶
func ResponseOKWithBody(rw http.ResponseWriter, obj interface{})
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.