common

package
v1.19.5 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package common contains common functions and types used by BindPlane.

Index

Constants

View Source
const (
	// ProfilesFolderName is the name of the profiles folder.
	ProfilesFolderName = "profiles"

	// DefaultHomeName is the default directory name for bindplane.
	DefaultHomeName = ".bindplane"

	// DefaultProfileName is the name of the default profile
	DefaultProfileName = "default"

	// HomeEnv is the environment variable for the bindplane home path.
	HomeEnv = "BINDPLANE_CONFIG_HOME"
)

Variables

View Source
var (
	// ValidHTTPSchemes are the valid http schemes to be used with ValidateURL function
	ValidHTTPSchemes = []string{"http", "https"}

	// ValidWSSchemes are the valid websocket schemes to be used with ValidateURL function
	ValidWSSchemes = []string{"ws", "wss"}
)

list of valid schemes for different protocols

Functions

func GetHome added in v1.16.0

func GetHome() string

GetHome returns the bindplane home path.

func GetProfilesFolder added in v1.16.0

func GetProfilesFolder() string

GetProfilesFolder returns the profiles folder path.

func ValidatePort added in v1.16.0

func ValidatePort(port string) error

ValidatePort validates the port

func ValidateURL added in v1.16.0

func ValidateURL(urlString string, validSchemes []string) error

ValidateURL validates the URL and ensures the scheme matches one of the valid schemes in the list

Types

This section is empty.

Jump to

Keyboard shortcuts

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