util

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 17 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 GetFrpcRegistryDomain added in v0.17.0

func GetFrpcRegistryDomain(serverId, frpsDomain string) string

func GetFrpcRegistryUrl added in v0.17.0

func GetFrpcRegistryUrl(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 GetHomeDir added in v0.13.0

func GetHomeDir(activeProfile config.Profile, workspaceId string, projectName string) (string, error)

func GetProjectDir added in v0.13.0

func GetProjectDir(activeProfile config.Profile, workspaceId string, projectName string) (string, error)

func GetRemoteOS added in v0.3.0

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

func GetRepositorySlugFromUrl added in v0.15.0

func GetRepositorySlugFromUrl(url string, specifyGitProviders bool) string

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