vtsclient

package
v0.0.0-...-4e66fdd Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 11 Imported by: 5

Documentation

Overview

Copyright 2022-2023 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2022-2023 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoClient = errors.New("there is no active gRPC VTS client")
)

Functions

This section is empty.

Types

type GRPC

type GRPC struct {
	ServerAddress     string
	Connection        *grpc.ClientConn
	ConnectionTimeout time.Duration
}

func NewGRPC

func NewGRPC() *GRPC

NewGRPC instantiate a new gRPC VTS client with default settings

func (*GRPC) EnsureConnection

func (o *GRPC) EnsureConnection() error

func (*GRPC) GetAttestation

func (o *GRPC) GetAttestation(
	ctx context.Context, in *proto.AttestationToken, opts ...grpc.CallOption,
) (*proto.AppraisalContext, error)

func (*GRPC) GetEARSigningPublicKey

func (o *GRPC) GetEARSigningPublicKey(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*proto.PublicKey, error)

func (*GRPC) GetProvisionerClient

func (o *GRPC) GetProvisionerClient() proto.VTSClient

func (*GRPC) GetServiceState

func (o *GRPC) GetServiceState(
	ctx context.Context,
	in *emptypb.Empty,
	opts ...grpc.CallOption,
) (*proto.ServiceState, error)

func (*GRPC) GetSupportedProvisioningMediaTypes

func (o *GRPC) GetSupportedProvisioningMediaTypes(
	ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption,
) (*proto.MediaTypeList, error)

func (*GRPC) GetSupportedVerificationMediaTypes

func (o *GRPC) GetSupportedVerificationMediaTypes(
	ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption,
) (*proto.MediaTypeList, error)

func (*GRPC) Init

func (o *GRPC) Init(v *viper.Viper) error

func (*GRPC) SubmitEndorsements

func (o *GRPC) SubmitEndorsements(
	ctx context.Context, in *proto.SubmitEndorsementsRequest, opts ...grpc.CallOption,
) (*proto.SubmitEndorsementsResponse, error)

type IVTSClient

type IVTSClient interface {
	proto.VTSClient
}

type NoConnectionError

type NoConnectionError struct {
	Context string
	Err     error
}

func NewNoConnectionError

func NewNoConnectionError(ctx string, err error) NoConnectionError

func (NoConnectionError) Error

func (o NoConnectionError) Error() string

func (NoConnectionError) Unwrap

func (o NoConnectionError) Unwrap() error

Jump to

Keyboard shortcuts

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