| 1 | // Copyright The Notary Project Authors. |
| 2 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | // you may not use this file except in compliance with the License. |
| 4 | // You may obtain a copy of the License at |
| 5 | // |
| 6 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | // |
| 8 | // Unless required by applicable law or agreed to in writing, software |
| 9 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | // See the License for the specific language governing permissions and |
| 12 | // limitations under the License. |
| 13 | |
| 14 | package pluginscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ |
| 15 | |
| 16 | import ( |
| 17 | "fmtscip-go gomod github.com/golang/go/src go1.20 fmt/" |
| 18 | "testingscip-go gomod github.com/golang/go/src go1.20 testing/" |
| 19 | ) |
| 20 | |
| 21 | func TestGenerateSignatureRequest_Validatescip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/TestGenerateSignatureRequest_Validate().(t *testingscip-go gomod github.com/golang/go/src go1.20 testing/.Tscip-go gomod github.com/golang/go/src go1.20 testing/T#) { |
| 22 | reqs := []GenerateSignatureRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateSignatureRequest#{ |
| 23 | getGenerateSignatureRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateSignatureRequest().(ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ContractVersion., "someKeyId", string(KeySpecEC384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/KeySpecEC384.), string(HashAlgorithmSHA384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/HashAlgorithmSHA384.), []byte("zop")), |
| 24 | { |
| 25 | ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateSignatureRequest#ContractVersion.: ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ContractVersion., |
| 26 | KeyIDscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateSignatureRequest#KeyID.: "someKeyId", |
| 27 | KeySpecscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateSignatureRequest#KeySpec.: KeySpecEC384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/KeySpecEC384., |
| 28 | Hashscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateSignatureRequest#Hash.: HashAlgorithmSHA384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/HashAlgorithmSHA384., |
| 29 | Payloadscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateSignatureRequest#Payload.: []byte("somePayload"), |
| 30 | PluginConfigscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateSignatureRequest#PluginConfig.: map[string]string{"key1": "value1"}, |
| 31 | }, |
| 32 | } |
| 33 | |
| 34 | for _, req := range reqs { |
| 35 | if err := req.Validatescip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateSignatureRequest#Validate().(); err != nil { |
| 36 | t.Errorfscip-go gomod github.com/golang/go/src go1.20 testing/common#Errorf().("VerifySignatureRequest#Validate failed with error: %+v", err) |
| 37 | } |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | func TestGenerateSignatureRequest_Validate_Errorscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/TestGenerateSignatureRequest_Validate_Error().(t *testingscip-go gomod github.com/golang/go/src go1.20 testing/.Tscip-go gomod github.com/golang/go/src go1.20 testing/T#) { |
| 42 | testCases := []struct { |
| 43 | name string |
| 44 | req GenerateSignatureRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateSignatureRequest# |
| 45 | }{ |
| 46 | {name: "contractVersion", req: getGenerateSignatureRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateSignatureRequest().("", "someKeyId", string(KeySpecEC384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/KeySpecEC384.), string(HashAlgorithmSHA384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/HashAlgorithmSHA384.), []byte("zop"))}, |
| 47 | {name: "keyId", req: getGenerateSignatureRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateSignatureRequest().(ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ContractVersion., "", string(KeySpecEC384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/KeySpecEC384.), string(HashAlgorithmSHA384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/HashAlgorithmSHA384.), []byte("zop"))}, |
| 48 | {name: "keySpec", req: getGenerateSignatureRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateSignatureRequest().(ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ContractVersion., "someKeyId", "", string(HashAlgorithmSHA384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/HashAlgorithmSHA384.), []byte("zop"))}, |
| 49 | {name: "hashAlgorithm", req: getGenerateSignatureRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateSignatureRequest().(ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ContractVersion., "someKid", string(KeySpecEC384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/KeySpecEC384.), "", []byte("zop"))}, |
| 50 | {name: "payload", req: getGenerateSignatureRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateSignatureRequest().(ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ContractVersion., "someKeyId", string(KeySpecEC384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/KeySpecEC384.), string(HashAlgorithmSHA384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/HashAlgorithmSHA384.), []byte(""))}, |
| 51 | {name: "payload", req: getGenerateSignatureRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateSignatureRequest().(ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ContractVersion., "someKeyId", string(KeySpecEC384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/KeySpecEC384.), string(HashAlgorithmSHA384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/HashAlgorithmSHA384.), nil)}, |
| 52 | {name: "keySpec", req: getGenerateSignatureRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateSignatureRequest().(ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ContractVersion., "someKeyId", "", string(HashAlgorithmSHA384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/HashAlgorithmSHA384.), []byte("zop"))}, |
| 53 | } |
| 54 | |
| 55 | for _, testcase := range testCases { |
| 56 | t.Runscip-go gomod github.com/golang/go/src go1.20 testing/T#Run().(testcase.name, func(t *testingscip-go gomod github.com/golang/go/src go1.20 testing/.Tscip-go gomod github.com/golang/go/src go1.20 testing/T#) { |
| 57 | if err := testcase.req.Validatescip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateSignatureRequest#Validate().(); err != nil { |
| 58 | expMsg := fmtscip-go gomod github.com/golang/go/src go1.20 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.20 fmt/Sprintf().("{\"errorCode\":\"VALIDATION_ERROR\",\"errorMessage\":\"%s cannot be empty\"}", testcase.name) |
| 59 | if err.Error() != expMsg { |
| 60 | t.Errorfscip-go gomod github.com/golang/go/src go1.20 testing/common#Errorf().("expected error message '%s' but got '%s'", expMsg, err.Error()) |
| 61 | } |
| 62 | } else { |
| 63 | t.Errorscip-go gomod github.com/golang/go/src go1.20 testing/common#Error().("VerifySignatureRequest#Validate didn't returned error") |
| 64 | } |
| 65 | }) |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | func TestGenerateSignatureRequest_Commandscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/TestGenerateSignatureRequest_Command().(t *testingscip-go gomod github.com/golang/go/src go1.20 testing/.Tscip-go gomod github.com/golang/go/src go1.20 testing/T#) { |
| 70 | req := getGenerateSignatureRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateSignatureRequest().(ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ContractVersion., "someKeyId", string(KeySpecEC384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/KeySpecEC384.), string(HashAlgorithmSHA384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/HashAlgorithmSHA384.), []byte("zop")) |
| 71 | if cmd := req.Commandscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateSignatureRequest#Command().(); cmd != CommandGenerateSignaturescip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/CommandGenerateSignature. { |
| 72 | t.Errorfscip-go gomod github.com/golang/go/src go1.20 testing/common#Errorf().("DescribeKeyRequest#Command, expected %s but returned %s", CommandGenerateSignaturescip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/CommandGenerateSignature., cmd) |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | func TestGenerateEnvelopeRequest_Validatescip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/TestGenerateEnvelopeRequest_Validate().(t *testingscip-go gomod github.com/golang/go/src go1.20 testing/.Tscip-go gomod github.com/golang/go/src go1.20 testing/T#) { |
| 77 | reqs := []GenerateEnvelopeRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest#{ |
| 78 | getGenerateEnvelopeRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateEnvelopeRequest().(ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ContractVersion., "someKeyId", "someSET", "somePT", []byte("zop")), |
| 79 | { |
| 80 | ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest#ContractVersion.: ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ContractVersion., |
| 81 | KeyIDscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest#KeyID.: "someKeyId", |
| 82 | SignatureEnvelopeTypescip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest#SignatureEnvelopeType.: "someType", |
| 83 | ExpiryDurationInSecondsscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest#ExpiryDurationInSeconds.: 1, |
| 84 | Payloadscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest#Payload.: []byte("zap"), |
| 85 | PayloadTypescip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest#PayloadType.: ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ContractVersion., |
| 86 | PluginConfigscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest#PluginConfig.: map[string]string{"key1": "value1"}, |
| 87 | }, |
| 88 | } |
| 89 | |
| 90 | for _, req := range reqs { |
| 91 | if err := req.Validatescip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest#Validate().(); err != nil { |
| 92 | t.Errorfscip-go gomod github.com/golang/go/src go1.20 testing/common#Errorf().("GenerateEnvelopeRequest#Validate failed with error: %+v", err) |
| 93 | } |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | func TestGenerateEnvelopeRequest_Validate_Errorscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/TestGenerateEnvelopeRequest_Validate_Error().(t *testingscip-go gomod github.com/golang/go/src go1.20 testing/.Tscip-go gomod github.com/golang/go/src go1.20 testing/T#) { |
| 98 | testCases := []struct { |
| 99 | name string |
| 100 | req GenerateEnvelopeRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest# |
| 101 | }{ |
| 102 | {name: "contractVersion", req: getGenerateEnvelopeRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateEnvelopeRequest().("", "someKeyId", "someSET", "somePT", []byte("zop"))}, |
| 103 | {name: "keyId", req: getGenerateEnvelopeRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateEnvelopeRequest().(ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ContractVersion., "", "someSET", "somePT", []byte("zop"))}, |
| 104 | {name: "signatureEnvelopeType", req: getGenerateEnvelopeRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateEnvelopeRequest().(ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ContractVersion., "someKeyId", "", "somePT", []byte("zop"))}, |
| 105 | {name: "payloadType", req: getGenerateEnvelopeRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateEnvelopeRequest().(ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ContractVersion., "someKeyId", "someSET", "", []byte("zop"))}, |
| 106 | {name: "payload", req: getGenerateEnvelopeRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateEnvelopeRequest().(ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ContractVersion., "someKeyId", "someSET", "somePT", []byte(""))}, |
| 107 | {name: "payload", req: getGenerateEnvelopeRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateEnvelopeRequest().(ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ContractVersion., "someKeyId", "someSET", "somePT", nil)}, |
| 108 | } |
| 109 | |
| 110 | for _, testcase := range testCases { |
| 111 | t.Runscip-go gomod github.com/golang/go/src go1.20 testing/T#Run().(testcase.name, func(t *testingscip-go gomod github.com/golang/go/src go1.20 testing/.Tscip-go gomod github.com/golang/go/src go1.20 testing/T#) { |
| 112 | if err := testcase.req.Validatescip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest#Validate().(); err != nil { |
| 113 | expMsg := fmtscip-go gomod github.com/golang/go/src go1.20 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.20 fmt/Sprintf().("{\"errorCode\":\"VALIDATION_ERROR\",\"errorMessage\":\"%s cannot be empty\"}", testcase.name) |
| 114 | if err.Error() != expMsg { |
| 115 | t.Errorfscip-go gomod github.com/golang/go/src go1.20 testing/common#Errorf().("expected error message '%s' but got '%s'", expMsg, err.Error()) |
| 116 | } |
| 117 | } else { |
| 118 | t.Errorscip-go gomod github.com/golang/go/src go1.20 testing/common#Error().("GenerateEnvelopeRequest#Validate didn't returned error") |
| 119 | } |
| 120 | }) |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | func TestGenerateEnvelopeRequest_Commandscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/TestGenerateEnvelopeRequest_Command().(t *testingscip-go gomod github.com/golang/go/src go1.20 testing/.Tscip-go gomod github.com/golang/go/src go1.20 testing/T#) { |
| 125 | req := getGenerateEnvelopeRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateEnvelopeRequest().(ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/ContractVersion., "someKeyId", string(KeySpecEC384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/KeySpecEC384.), string(HashAlgorithmSHA384scip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/HashAlgorithmSHA384.), []byte("zop")) |
| 126 | if cmd := req.Commandscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest#Command().(); cmd != CommandGenerateEnvelopescip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/CommandGenerateEnvelope. { |
| 127 | t.Errorfscip-go gomod github.com/golang/go/src go1.20 testing/common#Errorf().("DescribeKeyRequest#Command, expected %s but returned %s", CommandGenerateEnvelopescip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/CommandGenerateEnvelope., cmd) |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | func getGenerateSignatureRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateSignatureRequest().(cv, kid, ks, ha string, pl []byte) GenerateSignatureRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateSignatureRequest# { |
| 132 | return GenerateSignatureRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateSignatureRequest#{ |
| 133 | ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateSignatureRequest#ContractVersion.: cv, |
| 134 | KeyIDscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateSignatureRequest#KeyID.: kid, |
| 135 | KeySpecscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateSignatureRequest#KeySpec.: KeySpecscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/KeySpec#(ks), |
| 136 | Hashscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateSignatureRequest#Hash.: HashAlgorithmscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/HashAlgorithm#(ha), |
| 137 | Payloadscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateSignatureRequest#Payload.: pl, |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | func getGenerateEnvelopeRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/getGenerateEnvelopeRequest().(cv, kid, set, pt string, pl []byte) GenerateEnvelopeRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest# { |
| 142 | return GenerateEnvelopeRequestscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest#{ |
| 143 | ContractVersionscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest#ContractVersion.: cv, |
| 144 | KeyIDscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest#KeyID.: kid, |
| 145 | SignatureEnvelopeTypescip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest#SignatureEnvelopeType.: set, |
| 146 | PayloadTypescip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest#PayloadType.: pt, |
| 147 | Payloadscip-go gomod github.com/notaryproject/notation-plugin-framework-go . `github.com/notaryproject/notation-plugin-framework-go/plugin`/GenerateEnvelopeRequest#Payload.: pl, |
| 148 | } |
| 149 | } |