config

package
v1.6.11 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 13 Imported by: 115

Documentation

Index

Constants

View Source
const (
	LayoutForTimeStamp = "Jan 2, 2006 at 3:04pm"
)

Variables

View Source
var APILog = logging.MustGetLogger("gauge-api")
View Source
var GetPropertyFromConfig = func(propertyName string) string {
	config, err := common.GetGaugeConfiguration()
	if err != nil {
		APILog.Warningf("Failed to get configuration from Gauge properties file. Error: %s", err.Error())
		return ""
	}
	return config[propertyName]
}
View Source
var Log = logging.MustGetLogger("gauge")
View Source
var ProjectRoot string

Functions

func AllowInsecureDownload added in v1.1.2

func AllowInsecureDownload() bool

AllowInsecureDownload determines if insecure download is enabled

func CheckUpdates added in v0.3.0

func CheckUpdates() bool

CheckUpdates determines if update check is enabled

func FilePath added in v1.1.2

func FilePath(name string) (string, error)

func GaugeRepositoryUrl

func GaugeRepositoryUrl() string

GaugeRepositoryUrl fetches the repository URL to locate plugins

func GaugeVersionInPropertiesFile added in v1.1.2

func GaugeVersionInPropertiesFile(name string) (*version.Version, error)

func GetProperty added in v0.9.0

func GetProperty(name string) (string, error)

func IdeRequestTimeout added in v0.9.8

func IdeRequestTimeout() time.Duration

Timeout in milliseconds for requests from the grpc language runner.

func List added in v0.9.0

func List(machineReadable bool) (string, error)

func Merge added in v0.9.0

func Merge() error

func PluginConnectionTimeout

func PluginConnectionTimeout() time.Duration

PluginConnectionTimeout gets timeout in milliseconds for making a connection to plugins

func PluginKillTimeout

func PluginKillTimeout() time.Duration

PluginKillTimeout gets timeout in milliseconds for a plugin to stop after a kill message has been sent

func RefactorTimeout

func RefactorTimeout() time.Duration

RefactorTimeout returns the default timeout value for a refactoring request.

func RunnerConnectionTimeout

func RunnerConnectionTimeout() time.Duration

RunnerConnectionTimeout gets timeout in milliseconds for making a connection to the language runner

func RunnerRequestTimeout

func RunnerRequestTimeout() time.Duration

Timeout in milliseconds for requests from the language runner.

func SetProjectRoot

func SetProjectRoot(args []string) error

SetProjectRoot sets project root location in ENV.

func Update added in v0.9.0

func Update(name, value string) error

func Write added in v1.1.2

func Write(text, file string) error

Types

type Formatter added in v1.1.2

type Formatter interface {
	Format([]Property) (string, error)
}

type JsonFormatter added in v1.1.2

type JsonFormatter struct {
}

func (JsonFormatter) Format added in v1.1.2

func (f JsonFormatter) Format(p []Property) (string, error)

type Property added in v1.1.2

type Property struct {
	Key         string `json:"key"`
	Value       string `json:"value"`
	Description string
	// contains filtered or unexported fields
}

func NewProperty added in v1.1.2

func NewProperty(key, defaultValue, description string) *Property

type TextFormatter added in v1.1.2

type TextFormatter struct {
	Headers []string
}

func (TextFormatter) Format added in v1.1.2

func (f TextFormatter) Format(p []Property) (string, error)

Jump to

Keyboard shortcuts

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