common

package
v1.0.39 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyRendered = "rendered"
	KeyCert     = "cert"
	KeyPrivKey  = "privkey"
	KeySha256   = "sha256"
	KeyFolder   = "folder"
	KeyText     = "text"
	KeyContract = "contract"
	KeyJSON     = "json"

	PrefixBasicEncoding = "hyper-protect-basic"
)

Variables

View Source
var (
	Base64Encode  = base64.StdEncoding.EncodeToString
	Base64DecodeE = E.Eitherize1(base64.StdEncoding.DecodeString)

	Base64EncodeE = F.Flow2(
		Base64Encode,
		E.Of[error, string],
	)

	PlainTextEncodeE = F.Flow2(
		B.ToString,
		E.Of[error, string],
	)

	MapBytesToStgE = E.Map[error](B.ToString)
	MapStgToBytesE = E.Map[error](S.ToBytes)
	MapRefAnyE     = E.Map[error](F.Ref[any])

	FromErrorO = O.FromPredicate(isError)
)

Functions

func ToTypeE

func ToTypeE[A any](data any) E.Either[error, A]

func ToTypeO

func ToTypeO[A any](data any) O.Option[A]

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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