Documentation
¶
Index ¶
- func AESEncrypt(plaintext []byte) ([]byte, []byte, error)
- func ConnectAndAttest(keyReq KeyRequest) (*attest.AttestationDoc, *attest.AttestationUserData, error)
- func Deploy(req DeployRequest) (string, []byte, error)
- func Encrypt(keyReq KeyRequest, input []byte) (string, error)
- func Key(keyReq KeyRequest) ([]byte, error)
- func RSAEncrypt(plaintext []byte, publicKey []byte) ([]byte, error)
- func Run(req RunRequest) ([]byte, error)
- func Test(testReq TestRequest, endpoint string) (*entities.RunResults, error)
- type DeployRequest
- type ErrorMsg
- type KeyRequest
- type RunRequest
- type TestRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectAndAttest ¶
func ConnectAndAttest(keyReq KeyRequest) (*attest.AttestationDoc, *attest.AttestationUserData, error)
TODO: Run, deploy and test could use this function.
func Deploy ¶
func Deploy(req DeployRequest) (string, []byte, error)
Deploy encrypts the given function data within a secure enclave and stores the encrypted function for future use. Returns a function ID upon successful deployment. The stored function can only be decrypted within an enclave.
func Key ¶
func Key(keyReq KeyRequest) ([]byte, error)
func Run ¶
func Run(req RunRequest) ([]byte, error)
Run loads the given function into a secure enclave and invokes it on the given data, then returns the result.
func Test ¶
func Test(testReq TestRequest, endpoint string) (*entities.RunResults, error)
Test simulates the workflow of Deploy and Run, without storing the function. It loads the given function into an enclave, runs it on the given data, and returns the result. Use Test to verify that your function will work before storing it via Deploy.
Types ¶
type DeployRequest ¶
type KeyRequest ¶
type RunRequest ¶
Click to show internal directories.
Click to hide internal directories.