cmd

package
v0.0.0-...-51c4c36 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MPL-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_USER          = ""
	DEFAULT_USER_PASSWORD = ""
)
View Source
const ASYM_EXAMPLE_DATA string = "0123456789abcdef"
View Source
const SIGN_EXAMPLE_DATA string = "0123456789abcdef"
View Source
const SYM_EXAMPLE_DATA string = "0123456789ABCDEF"

Variables

This section is empty.

Functions

func Execute

func Execute()

func GetSobject

func GetSobject(kid *string) *sdkms.Sobject

GetSobject retrieves a sobject through SDKMS client. It takes a keyID as a parameter and returns a pointer to a Sobject. If the keyID is empty, it will return an error. If an error occurs during the retrieval process, the function will log a fatal error and exit.

func Max

func Max(a, b int) int

func StrPad

func StrPad(input string, padLength int, padString string, padType string) string

StrPad returns the input string padded on the left, right or both sides using padType to the specified padding length padLength.

This helper function is from internet: https://gist.github.com/asessa/3aaec43d93044fc42b7c6d5f728cb039

Example:

input := "Codes";

StrPad(input, 10, " ", "RIGHT") // produces "Codes "

StrPad(input, 10, "-=", "LEFT") // produces "=-=-=Codes"

StrPad(input, 10, "_", "BOTH") // produces "__Codes___"

StrPad(input, 6, "___", "RIGHT") // produces "Codes_"

StrPad(input, 3, "*", "RIGHT") // produces "Codes"

Types

This section is empty.

Jump to

Keyboard shortcuts

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