Documentation
¶
Index ¶
- Variables
- func Aes256DecodeString(target []byte, passphrase string) (string, error)
- func Aes256EncodeString(target string, passphrase string) ([]byte, error)
- func CompressData(data []byte) ([]byte, error)
- func ConvertFileToBase64(file string) (string, error)
- func GetCloudConfig(bootstrapParams params.BootstrapInstance, ...) (string, error)
- func GetLoggingWriter(cfg *config.Config) (io.Writer, error)
- func GetRandomString(n int) (string, error)
- func GetTools(osType params.OSType, osArch params.OSArch, ...) (github.RunnerApplicationDownload, error)
- func GithubClient(ctx context.Context, token string, credsDetails params.GithubCredentials) (common.GithubClient, common.GithubEnterpriseClient, error)
- func IsAlphanumeric(s string) bool
- func IsValidEmail(email string) bool
- func NewID() string
- func NewLoggingMiddleware(writer io.Writer) func(http.Handler) http.Handler
- func OSToOSType(os string) (params.OSType, error)
- func PaswsordToBcrypt(password string) (string, error)
- func ResolveToGithubArch(arch string) (string, error)
- func ResolveToGithubOSType(osType string) (string, error)
- func ResolveToGithubTag(os params.OSType) (string, error)
- func SanitizeLogEntry(entry string) string
- func UTF16EncodedByteArrayFromString(s string) ([]byte, error)
- func UTF16FromString(s string) ([]uint16, error)
- func UTF16ToString(s []uint16) string
- func Uint16ToByteArray(u []uint16) []byte
Constants ¶
This section is empty.
Variables ¶
var ( OSToOSTypeMap map[string]params.OSType = map[string]params.OSType{ "almalinux": params.Linux, "alma": params.Linux, "alpine": params.Linux, "archlinux": params.Linux, "arch": params.Linux, "centos": params.Linux, "ubuntu": params.Linux, "rhel": params.Linux, "suse": params.Linux, "opensuse": params.Linux, "fedora": params.Linux, "debian": params.Linux, "flatcar": params.Linux, "gentoo": params.Linux, "rockylinux": params.Linux, "rocky": params.Linux, "windows": params.Windows, } )
Functions ¶
func CompressData ¶
func ConvertFileToBase64 ¶
func GetCloudConfig ¶
func GetCloudConfig(bootstrapParams params.BootstrapInstance, tools github.RunnerApplicationDownload, runnerName string) (string, error)
func GetLoggingWriter ¶
GetLoggingWriter returns a new io.Writer suitable for logging.
func GetRandomString ¶
GetRandomString returns a secure random string
func GetTools ¶
func GetTools(osType params.OSType, osArch params.OSArch, tools []*github.RunnerApplicationDownload) (github.RunnerApplicationDownload, error)
func GithubClient ¶
func GithubClient(ctx context.Context, token string, credsDetails params.GithubCredentials) (common.GithubClient, common.GithubEnterpriseClient, error)
func IsAlphanumeric ¶
func IsValidEmail ¶
IsValidEmail returs a bool indicating if an email is valid
func NewLoggingMiddleware ¶
func PaswsordToBcrypt ¶
PaswsordToBcrypt returns a bcrypt hash of the specified password using the default cost
func ResolveToGithubArch ¶
ResolveToGithubArch returns the cpu architecture as it is defined in the GitHub tools download list. We use it to find the proper tools for the OS/Arch combo we're deploying.
func ResolveToGithubOSType ¶
ResolveToGithubArch returns the OS type as it is defined in the GitHub tools download list. We use it to find the proper tools for the OS/Arch combo we're deploying.
func ResolveToGithubTag ¶
ResolveToGithubTag returns the default OS tag that self hosted runners automatically (and forcefully) adds to every runner that gets deployed. We need to keep track of those tags internally as well.
func SanitizeLogEntry ¶
func UTF16FromString ¶
func UTF16ToString ¶
func Uint16ToByteArray ¶
Types ¶
This section is empty.