server

package
v2.16.3 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package server implements the gRPC and REST endpoints for retrieving attestation statements.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttestationIssuer

type AttestationIssuer interface {
	Issue(ctx context.Context, userData []byte, nonce []byte) (quote []byte, err error)
}

AttestationIssuer issues an attestation document for the provided userData and nonce.

type Server

type Server struct {
	verifyproto.UnimplementedAPIServer
	// contains filtered or unexported fields
}

Server implements Constellation's verify API. The server exposes both HTTP and gRPC endpoints to retrieve attestation statements.

func New

func New(log *slog.Logger, issuer AttestationIssuer) *Server

New initializes a new verification server.

func (*Server) GetAttestation

GetAttestation implements the gRPC endpoint for requesting attestation statements.

func (*Server) Run

func (s *Server) Run(httpListener, grpcListener net.Listener) error

Run starts the HTTP and gRPC servers. If one of the servers fails, other server will be closed and the error will be returned.

Jump to

Keyboard shortcuts

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