Debian Codegraph @

pkg/signature/options/keyversion.go

raw symbols SCIP
1 //
2 // Copyright 2022 The Sigstore Authors.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15
16 package optionsscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/
17
18 // RequestKeyVersion implements the functional option pattern for specifying the KMS key version during signing or verification
19 type RequestKeyVersionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/RequestKeyVersion# struct {
20 NoOpOptionImplscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/RequestKeyVersion#NoOpOptionImpl.
21 keyVersionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/RequestKeyVersion#keyVersion. string
22 }
23
24 // ApplyKeyVersion sets the KMS's key version as a functional option
25 func (r RequestKeyVersionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/RequestKeyVersion#) ApplyKeyVersionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/RequestKeyVersion#ApplyKeyVersion().(keyVersion *string) {
26 *keyVersion = r.keyVersionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/RequestKeyVersion#keyVersion.
27 }
28
29 // WithKeyVersion specifies that a specific KMS key version be used during signing and verification operations;
30 // a value of 0 will use the latest version of the key (default)
31 func WithKeyVersionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/WithKeyVersion().(keyVersion string) RequestKeyVersionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/RequestKeyVersion# {
32 return RequestKeyVersionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/RequestKeyVersion#{keyVersionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/RequestKeyVersion#keyVersion.: keyVersion}
33 }
34
35 // RequestKeyVersionUsed implements the functional option pattern for obtaining the KMS key version used during signing
36 type RequestKeyVersionUsedscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/RequestKeyVersionUsed# struct {
37 NoOpOptionImplscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/RequestKeyVersionUsed#NoOpOptionImpl.
38 keyVersionUsedscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/RequestKeyVersionUsed#keyVersionUsed. *string
39 }
40
41 // ApplyKeyVersionUsed requests to store the KMS's key version that was used as a functional option
42 func (r RequestKeyVersionUsedscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/RequestKeyVersionUsed#) ApplyKeyVersionUsedscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/RequestKeyVersionUsed#ApplyKeyVersionUsed().(keyVersionUsed **string) {
43 *keyVersionUsed = r.keyVersionUsedscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/RequestKeyVersionUsed#keyVersionUsed.
44 }
45
46 // ReturnKeyVersionUsed specifies that the specific KMS key version that was used during signing should be stored
47 // in the pointer provided
48 func ReturnKeyVersionUsedscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/ReturnKeyVersionUsed().(keyVersionUsed *string) RequestKeyVersionUsedscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/RequestKeyVersionUsed# {
49 return RequestKeyVersionUsedscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/RequestKeyVersionUsed#{keyVersionUsedscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/options`/RequestKeyVersionUsed#keyVersionUsed.: keyVersionUsed}
50 }