SecretFromBytes

Functionin secretstorecompute-sdk-go v1.11.0View source
func SecretFromBytes(b []byte) (*Secret, error)

FromBytes creates an instance of the Secret type for use with APIs that require it from the provided byte slice.

This function is provided as a way to use data that should be secret, but is being obtained by some other means than a Fastly Secret Store. Secret values created this way are plaintext only, and are not shared via a Store. This should only be used in situations in which an API requires a Secret, but you cannot (for whatever reason) use a Store to store them.

It is strongly suggested to store secrets in a Store and create Secret values by calling Store.Get.

Parameters

b: []byte

Returns

(*Secret, error)