misc

package
v0.0.0-...-8bebe21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attestation

func Attestation(report *AttestationReport) ([]byte, error)

func Exec

func Exec(out *LogOutput, name string, args ...string) error

func GetFileHash

func GetFileHash(fp string) ([]byte, error)

func GetMrEnclave

func GetMrEnclave(file string) ([]byte, error)

func GlobSortList

func GlobSortList(patterns []string) ([]string, error)

func InDir

func InDir(dir string, run func() error) error

func Listen

func Listen(uri *url.URL) (net.Listener, error)

func NewVsockClient

func NewVsockClient(proxy func(*http.Request) (*url.URL, error)) *http.Client

func NewVsockTransport

func NewVsockTransport(proxy func(*http.Request) (*url.URL, error)) *http.Transport

func RunNitroEnclave

func RunNitroEnclave(path string, mem string, debug bool) *exec.Cmd

func Tar

func Tar(out *LogOutput, prefix string, filelist []string) (string, error)

func TarTo

func TarTo(out *LogOutput, dir, tag string, filelist []string) (string, error)

Types

type AttestationReport

type AttestationReport struct {
	GitCommit  string `json:"git_commit,omitempty"`
	InputHash  string `json:"input_hash,omitempty"`
	Image      string `json:"image,omitempty"`
	OutputHash string `json:"output_hash,omitempty"`
	Nonce      string `json:"nonce,omitempty"`
	Mrenclave  string `json:"mrenclave,omitempty"`
}

type GitInfo

type GitInfo struct {
	Commit string
}

func GetGitInfo

func GetGitInfo(dir string) (*GitInfo, error)

type LogOutput

type LogOutput struct {
	Stdout io.Writer
	Stderr io.Writer
}

type MerkleTreeResult

type MerkleTreeResult struct {
	Tree     *merkletree.MerkleTree
	Root     []byte
	FileList []string
}

func FilesMerkleTree

func FilesMerkleTree(patterns []string, workers int, salt []byte) (*MerkleTreeResult, error)

type VsockLogWriter

type VsockLogWriter struct {
	// contains filtered or unexported fields
}

func NewVsockLogWriter

func NewVsockLogWriter(url string) *VsockLogWriter

func (*VsockLogWriter) Write

func (w *VsockLogWriter) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL