github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/enterprise/platformkeysinternal/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/enterprise/platformkeysinternal store_Hash
    20  //go:noescape
    21  func HashJSStore(
    22  	ptr unsafe.Pointer, ref js.Ref)
    23  
    24  //go:wasmimport plat/js/webext/enterprise/platformkeysinternal load_Hash
    25  //go:noescape
    26  func HashJSLoad(
    27  	ptr unsafe.Pointer, create, ref js.Ref) js.Ref
    28  
    29  //go:wasmimport plat/js/webext/enterprise/platformkeysinternal store_Algorithm
    30  //go:noescape
    31  func AlgorithmJSStore(
    32  	ptr unsafe.Pointer, ref js.Ref)
    33  
    34  //go:wasmimport plat/js/webext/enterprise/platformkeysinternal load_Algorithm
    35  //go:noescape
    36  func AlgorithmJSLoad(
    37  	ptr unsafe.Pointer, create, ref js.Ref) js.Ref
    38  
    39  //go:wasmimport plat/js/webext/enterprise/platformkeysinternal has_GenerateKey
    40  //go:noescape
    41  func HasFuncGenerateKey() js.Ref
    42  
    43  //go:wasmimport plat/js/webext/enterprise/platformkeysinternal func_GenerateKey
    44  //go:noescape
    45  func FuncGenerateKey(fn unsafe.Pointer)
    46  
    47  //go:wasmimport plat/js/webext/enterprise/platformkeysinternal call_GenerateKey
    48  //go:noescape
    49  func CallGenerateKey(
    50  	retPtr unsafe.Pointer,
    51  	tokenId js.Ref,
    52  	algorithm unsafe.Pointer,
    53  	softwareBacked js.Ref,
    54  	callback js.Ref)
    55  
    56  //go:wasmimport plat/js/webext/enterprise/platformkeysinternal try_GenerateKey
    57  //go:noescape
    58  func TryGenerateKey(
    59  	retPtr unsafe.Pointer, errPtr unsafe.Pointer,
    60  	tokenId js.Ref,
    61  	algorithm unsafe.Pointer,
    62  	softwareBacked js.Ref,
    63  	callback js.Ref) (ok js.Ref)
    64  
    65  //go:wasmimport plat/js/webext/enterprise/platformkeysinternal has_GetTokens
    66  //go:noescape
    67  func HasFuncGetTokens() js.Ref
    68  
    69  //go:wasmimport plat/js/webext/enterprise/platformkeysinternal func_GetTokens
    70  //go:noescape
    71  func FuncGetTokens(fn unsafe.Pointer)
    72  
    73  //go:wasmimport plat/js/webext/enterprise/platformkeysinternal call_GetTokens
    74  //go:noescape
    75  func CallGetTokens(
    76  	retPtr unsafe.Pointer,
    77  	callback js.Ref)
    78  
    79  //go:wasmimport plat/js/webext/enterprise/platformkeysinternal try_GetTokens
    80  //go:noescape
    81  func TryGetTokens(
    82  	retPtr unsafe.Pointer, errPtr unsafe.Pointer,
    83  	callback js.Ref) (ok js.Ref)