MCPcopy Create free account
hub / github.com/google/go-cloud / ExampleKeeper_Decrypt

Function ExampleKeeper_Decrypt

secrets/example_test.go:99–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97}
98
99func ExampleKeeper_Decrypt() {
100 // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored.
101 // PRAGMA: On gocloud.dev, hide lines until the next blank line.
102 ctx := context.Background()
103 var keeper *secrets.Keeper
104
105 var cipherText []byte // obtained from elsewhere and random-looking
106 plainText, err := keeper.Decrypt(ctx, cipherText)
107 if err != nil {
108 log.Fatal(err)
109 }
110
111 // PRAGMA: On gocloud.dev, hide the rest of the function.
112 _ = plainText
113}

Callers

nothing calls this directly

Calls 1

DecryptMethod · 0.95

Tested by

no test coverage detected