github.com/hyperledger/aries-framework-go@v0.3.2/pkg/doc/verifiable/credential_testsuite.go (about)

     1  // +build testsuite
     2  
     3  /*
     4  Copyright SecureKey Technologies Inc. All Rights Reserved.
     5  SPDX-License-Identifier: Apache-2.0
     6  
     7  This is not actually a test but rather a stand-alone generator application
     8  that is used by VC Test Suite (https://github.com/w3c/vc-test-suite).
     9  To run VC Test Suite, execute `make vc-test-suite`.
    10  */
    11  
    12  package verifiable
    13  
    14  // WithNoProofCheck disables checking of Verifiable Credential's proofs.
    15  func WithNoProofCheck() CredentialOpt {
    16  	return func(opts *credentialOpts) {
    17  		opts.disabledProofCheck = true
    18  	}
    19  }
    20  
    21  // WithPresNoProofCheck tells to skip checking of Verifiable Presentation's proofs.
    22  func WithPresNoProofCheck() PresentationOpt {
    23  	return func(opts *presentationOpts) {
    24  		opts.disabledProofCheck = true
    25  	}
    26  }
    27  
    28  // WithPresRequireVC option enables check for at least one verifiableCredential in the VP.
    29  func WithPresRequireVC() PresentationOpt {
    30  	return func(opts *presentationOpts) {
    31  		opts.requireVC = true
    32  	}
    33  }
    34  
    35  // WithPresRequireProof option enables check for at least one proof in the VP.
    36  func WithPresRequireProof() PresentationOpt {
    37  	return func(opts *presentationOpts) {
    38  		opts.requireProof = true
    39  	}
    40  }