trait EnvironmentVariables extends EnvironmentVariablesHelpers
A collection of useful functions to get environment variables in safe ways
- Since
2.12
- Alphabetic
- By Inheritance
- EnvironmentVariables
- EnvironmentVariablesHelpers
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
formatValue[T](typeName: String, typeValue: String): Either[Throwable, T]
Formats the value from a string to the thing specified
Formats the value from a string to the thing specified
- typeName
What kind of format ex. (String, Boolean, Int)
- typeValue
The actual value to try and convert to T
- returns
Either[Throwable, T]
- Definition Classes
- EnvironmentVariablesHelpers
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getEnvVar[T](keyToLookFor: String, delimiter: Char, defaultValues: List[T])(implicit typeTag: scala.reflect.api.JavaUniverse.TypeTag[T]): List[T]
Looks for the values of the environment variable specified split by a delimiter
Looks for the values of the environment variable specified split by a delimiter
- keyToLookFor
The environment variables key to look for
- delimiter
What to split up the values by
- defaultValues
If the environment variable key is not found return this value instead
- typeTag
The return type (no need to actually specify this implicit it will default to the supplied T)
- returns
List[T]
-
def
getEnvVar[T](keyToLookFor: String, delimiter: Char, customError: Option[Throwable])(implicit typeTag: scala.reflect.api.JavaUniverse.TypeTag[T]): List[T]
Looks for the values of the environment variable specified split by a delimiter
Looks for the values of the environment variable specified split by a delimiter
- keyToLookFor
The environment variables key to look for
- delimiter
What to split up the values by
- customError
Throw this error instead of the regular error if it fails
- typeTag
The return type (no need to actually specify this implicit it will default to the supplied T)
- returns
List[T]
-
def
getEnvVar[T](keyToLookFor: String, delimiter: Char)(implicit typeTag: scala.reflect.api.JavaUniverse.TypeTag[T]): Either[Throwable, List[T]]
Looks for the values of the environment variable specified split by a delimiter
Looks for the values of the environment variable specified split by a delimiter
- keyToLookFor
The environment variables key to look for
- delimiter
What to split up the values by
- typeTag
The return type (no need to actually specify this implicit it will default to the supplied T)
- returns
Either[Throwable, List[T]
-
def
getEnvVar[T](keyToLookFor: String, defaultValue: T)(implicit typeTag: scala.reflect.api.JavaUniverse.TypeTag[T]): T
Looks for the value of the environment variable specified
Looks for the value of the environment variable specified
- keyToLookFor
The environment variables key to look for
- defaultValue
If the environment variable key is not found return this value instead
- typeTag
The return type (no need to actually specify this implicit it will default to the supplied T)
- returns
T
-
def
getEnvVar[T](keyToLookFor: String, customError: Option[Throwable] = None)(implicit typeTag: scala.reflect.api.JavaUniverse.TypeTag[T]): T
Looks for the value of the environment variable specified and throws the error or a custom one if not found
Looks for the value of the environment variable specified and throws the error or a custom one if not found
- keyToLookFor
The environment variables key to look for
- customError
The custom throwable to throw if the keyToLookFor is not found
- returns
T
-
def
getEnvVar[T](keyToLookFor: String)(implicit typeTag: scala.reflect.api.JavaUniverse.TypeTag[T]): Either[Throwable, T]
Looks for the value of the environment variable specified
Looks for the value of the environment variable specified
- keyToLookFor
The environment variables key to look for
- typeTag
The return type (no need to actually specify this implicit it will default to the supplied T)
- returns
Either[Throwable, T]
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
returnMatch[T](theTry: Try[Any]): Either[Throwable, T]
Returns either a thing as instance of T or a throwable
Returns either a thing as instance of T or a throwable
- theTry
The Try to unwrap
- returns
Either[Throwable, T]
- Definition Classes
- EnvironmentVariablesHelpers
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )