util

package
v0.13.0-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayMap

func ArrayMap[T, U any](data []T, f func(T) U) []U

func FormatCreatedTime added in v0.4.0

func FormatCreatedTime(input string) string

func FormatUptime added in v0.11.0

func FormatUptime(uptime int32) string

func GenerateIdFromName

func GenerateIdFromName(name string) string

func GetFrpcApiDomain added in v0.11.0

func GetFrpcApiDomain(serverId, frpsDomain string) string

func GetFrpcApiUrl added in v0.11.0

func GetFrpcApiUrl(protocol, serverId, frpsDomain string) string

func GetFrpcServerDomain added in v0.11.0

func GetFrpcServerDomain(serverId, frpsDomain string) string

func GetFrpcServerUrl added in v0.11.0

func GetFrpcServerUrl(protocol, serverId, frpsDomain string) string

func GetRemoteOS added in v0.3.0

func GetRemoteOS(remote string) (*os.OperatingSystem, error)

func GetSshPrivateKeyPath

func GetSshPrivateKeyPath(privateKeyPath string) (string, *string, error)

GetSshPrivateKeyPath returns the path to the private key and the password if it's encrypted

func GetValidatedUrl

func GetValidatedUrl(input string) (string, error)

func GetValidatedWorkspaceName

func GetValidatedWorkspaceName(input string) (string, error)

func ReadLog

func ReadLog(ctx context.Context, logReader *io.Reader, follow bool, c chan []byte, errChan chan error)

func WorkspaceMode

func WorkspaceMode() bool

Types

type DebugLogWriter

type DebugLogWriter struct{}

func (*DebugLogWriter) Write

func (w *DebugLogWriter) Write(p []byte) (n int, err error)

type InfoLogWriter

type InfoLogWriter struct{}

func (*InfoLogWriter) Write

func (w *InfoLogWriter) Write(p []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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