github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/platformkeys/bindings/import_wasm.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright 2023 The Prime Citizens
     3  
     4  //go:build wasm
     5  
     6  package bindings
     7  
     8  import (
     9  	"unsafe"
    10  
    11  	"github.com/primecitizens/pcz/std/ffi/js"
    12  )
    13  
    14  type (
    15  	_ unsafe.Pointer
    16  	_ js.Ref
    17  )
    18  
    19  //go:wasmimport plat/js/webext/platformkeys constof_ClientCertificateType
    20  //go:noescape
    21  func ConstOfClientCertificateType(str js.Ref) uint32
    22  
    23  //go:wasmimport plat/js/webext/platformkeys store_ClientCertificateRequest
    24  //go:noescape
    25  func ClientCertificateRequestJSStore(
    26  	ptr unsafe.Pointer, ref js.Ref)
    27  
    28  //go:wasmimport plat/js/webext/platformkeys load_ClientCertificateRequest
    29  //go:noescape
    30  func ClientCertificateRequestJSLoad(
    31  	ptr unsafe.Pointer, create, ref js.Ref) js.Ref
    32  
    33  //go:wasmimport plat/js/webext/platformkeys store_Match
    34  //go:noescape
    35  func MatchJSStore(
    36  	ptr unsafe.Pointer, ref js.Ref)
    37  
    38  //go:wasmimport plat/js/webext/platformkeys load_Match
    39  //go:noescape
    40  func MatchJSLoad(
    41  	ptr unsafe.Pointer, create, ref js.Ref) js.Ref
    42  
    43  //go:wasmimport plat/js/webext/platformkeys store_SelectDetails
    44  //go:noescape
    45  func SelectDetailsJSStore(
    46  	ptr unsafe.Pointer, ref js.Ref)
    47  
    48  //go:wasmimport plat/js/webext/platformkeys load_SelectDetails
    49  //go:noescape
    50  func SelectDetailsJSLoad(
    51  	ptr unsafe.Pointer, create, ref js.Ref) js.Ref
    52  
    53  //go:wasmimport plat/js/webext/platformkeys store_VerificationResult
    54  //go:noescape
    55  func VerificationResultJSStore(
    56  	ptr unsafe.Pointer, ref js.Ref)
    57  
    58  //go:wasmimport plat/js/webext/platformkeys load_VerificationResult
    59  //go:noescape
    60  func VerificationResultJSLoad(
    61  	ptr unsafe.Pointer, create, ref js.Ref) js.Ref
    62  
    63  //go:wasmimport plat/js/webext/platformkeys store_VerificationDetails
    64  //go:noescape
    65  func VerificationDetailsJSStore(
    66  	ptr unsafe.Pointer, ref js.Ref)
    67  
    68  //go:wasmimport plat/js/webext/platformkeys load_VerificationDetails
    69  //go:noescape
    70  func VerificationDetailsJSLoad(
    71  	ptr unsafe.Pointer, create, ref js.Ref) js.Ref
    72  
    73  //go:wasmimport plat/js/webext/platformkeys has_GetKeyPair
    74  //go:noescape
    75  func HasFuncGetKeyPair() js.Ref
    76  
    77  //go:wasmimport plat/js/webext/platformkeys func_GetKeyPair
    78  //go:noescape
    79  func FuncGetKeyPair(fn unsafe.Pointer)
    80  
    81  //go:wasmimport plat/js/webext/platformkeys call_GetKeyPair
    82  //go:noescape
    83  func CallGetKeyPair(
    84  	retPtr unsafe.Pointer,
    85  	certificate js.Ref,
    86  	parameters js.Ref,
    87  	callback js.Ref)
    88  
    89  //go:wasmimport plat/js/webext/platformkeys try_GetKeyPair
    90  //go:noescape
    91  func TryGetKeyPair(
    92  	retPtr unsafe.Pointer, errPtr unsafe.Pointer,
    93  	certificate js.Ref,
    94  	parameters js.Ref,
    95  	callback js.Ref) (ok js.Ref)
    96  
    97  //go:wasmimport plat/js/webext/platformkeys has_GetKeyPairBySpki
    98  //go:noescape
    99  func HasFuncGetKeyPairBySpki() js.Ref
   100  
   101  //go:wasmimport plat/js/webext/platformkeys func_GetKeyPairBySpki
   102  //go:noescape
   103  func FuncGetKeyPairBySpki(fn unsafe.Pointer)
   104  
   105  //go:wasmimport plat/js/webext/platformkeys call_GetKeyPairBySpki
   106  //go:noescape
   107  func CallGetKeyPairBySpki(
   108  	retPtr unsafe.Pointer,
   109  	publicKeySpkiDer js.Ref,
   110  	parameters js.Ref,
   111  	callback js.Ref)
   112  
   113  //go:wasmimport plat/js/webext/platformkeys try_GetKeyPairBySpki
   114  //go:noescape
   115  func TryGetKeyPairBySpki(
   116  	retPtr unsafe.Pointer, errPtr unsafe.Pointer,
   117  	publicKeySpkiDer js.Ref,
   118  	parameters js.Ref,
   119  	callback js.Ref) (ok js.Ref)
   120  
   121  //go:wasmimport plat/js/webext/platformkeys has_SelectClientCertificates
   122  //go:noescape
   123  func HasFuncSelectClientCertificates() js.Ref
   124  
   125  //go:wasmimport plat/js/webext/platformkeys func_SelectClientCertificates
   126  //go:noescape
   127  func FuncSelectClientCertificates(fn unsafe.Pointer)
   128  
   129  //go:wasmimport plat/js/webext/platformkeys call_SelectClientCertificates
   130  //go:noescape
   131  func CallSelectClientCertificates(
   132  	retPtr unsafe.Pointer,
   133  	details unsafe.Pointer,
   134  	callback js.Ref)
   135  
   136  //go:wasmimport plat/js/webext/platformkeys try_SelectClientCertificates
   137  //go:noescape
   138  func TrySelectClientCertificates(
   139  	retPtr unsafe.Pointer, errPtr unsafe.Pointer,
   140  	details unsafe.Pointer,
   141  	callback js.Ref) (ok js.Ref)
   142  
   143  //go:wasmimport plat/js/webext/platformkeys has_SubtleCrypto
   144  //go:noescape
   145  func HasFuncSubtleCrypto() js.Ref
   146  
   147  //go:wasmimport plat/js/webext/platformkeys func_SubtleCrypto
   148  //go:noescape
   149  func FuncSubtleCrypto(fn unsafe.Pointer)
   150  
   151  //go:wasmimport plat/js/webext/platformkeys call_SubtleCrypto
   152  //go:noescape
   153  func CallSubtleCrypto(
   154  	retPtr unsafe.Pointer)
   155  
   156  //go:wasmimport plat/js/webext/platformkeys try_SubtleCrypto
   157  //go:noescape
   158  func TrySubtleCrypto(
   159  	retPtr unsafe.Pointer, errPtr unsafe.Pointer) (ok js.Ref)
   160  
   161  //go:wasmimport plat/js/webext/platformkeys has_VerifyTLSServerCertificate
   162  //go:noescape
   163  func HasFuncVerifyTLSServerCertificate() js.Ref
   164  
   165  //go:wasmimport plat/js/webext/platformkeys func_VerifyTLSServerCertificate
   166  //go:noescape
   167  func FuncVerifyTLSServerCertificate(fn unsafe.Pointer)
   168  
   169  //go:wasmimport plat/js/webext/platformkeys call_VerifyTLSServerCertificate
   170  //go:noescape
   171  func CallVerifyTLSServerCertificate(
   172  	retPtr unsafe.Pointer,
   173  	details unsafe.Pointer,
   174  	callback js.Ref)
   175  
   176  //go:wasmimport plat/js/webext/platformkeys try_VerifyTLSServerCertificate
   177  //go:noescape
   178  func TryVerifyTLSServerCertificate(
   179  	retPtr unsafe.Pointer, errPtr unsafe.Pointer,
   180  	details unsafe.Pointer,
   181  	callback js.Ref) (ok js.Ref)