DeferredSecret

com.geirolz.secret.DeferredSecret
See theDeferredSecret companion object
sealed trait DeferredSecret[F[_], T]

Specialized version of Secret that allows to defer the acquisition of the secret value. This is useful when you want to acquire the secret value only when it's needed and not before ( for instance, an HTTP call to a secret manager).

Use this type only when you need to defer the acquisition of the secret value. If you have the secret value at the moment of the creation of the DeferredSecret use the Secret type instead.

Type parameters

F

effect type

T

secret type

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def evalUse[U](f: T => F[U]): F[U]

This method acquire the Secret value every time and once used destroy the secret. It doesn't has the suffix "AndDestroy" because it's the default behavior of the DeferredSecret which could be called any number of times since it re-create every time.

This method acquire the Secret value every time and once used destroy the secret. It doesn't has the suffix "AndDestroy" because it's the default behavior of the DeferredSecret which could be called any number of times since it re-create every time.

Attributes

def evalUseRaw[U](f: (Secret[T]) => F[U]): F[U]

Acquire the secret value and transform it in F.

Acquire the secret value and transform it in F.

The secret is be destroyed after the use

Attributes

def flatMap[U : SecretStrategy](f: T => DeferredSecret[F, U])(implicit evidence$1: SecretStrategy[U], Hasher): DeferredSecret[F, U]

FlatMap the secret value to U

FlatMap the secret value to U

Attributes

def handleError(f: Throwable => Secret[T]): DeferredSecret[F, T]

Handle the error of the acquisition of the secret value

Handle the error of the acquisition of the secret value

Attributes

def handleErrorWith(f: Throwable => F[Secret[T]]): DeferredSecret[F, T]

Handle the error of the acquisition of the secret value

Handle the error of the acquisition of the secret value

Attributes

def map[U : SecretStrategy](f: T => U)(implicit evidence$1: SecretStrategy[U], Hasher): DeferredSecret[F, U]

Map the secret value to U

Map the secret value to U

Attributes

def use[U](f: T => U): F[U]

This method acquire the Secret value every time and once used destroy the secret. It doesn't has the suffix "AndDestroy" because it's the default behavior of the DeferredSecret which could be called any number of times since it re-create every time.

This method acquire the Secret value every time and once used destroy the secret. It doesn't has the suffix "AndDestroy" because it's the default behavior of the DeferredSecret which could be called any number of times since it re-create every time.

Attributes

def useRaw[U](f: (Secret[T]) => U): F[U]

Acquire the secret value and transform it.

Acquire the secret value and transform it.

The secret is be destroyed after the use

Attributes