proto

package
v0.0.2411 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

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

View Source
const ServiceStateMediaType = "application/vnd.veraison.service-state+json"

Variables

View Source
var (
	ServiceStatus_name = map[int32]string{
		0: "SERVICE_STATUS_UNSPECIFIED",
		1: "SERVICE_STATUS_DOWN",
		2: "SERVICE_STATUS_INITIALIZING",
		3: "SERVICE_STATUS_READY",
		4: "SERVICE_STATUS_TERMINATING",
	}
	ServiceStatus_value = map[string]int32{
		"SERVICE_STATUS_UNSPECIFIED":  0,
		"SERVICE_STATUS_DOWN":         1,
		"SERVICE_STATUS_INITIALIZING": 2,
		"SERVICE_STATUS_READY":        3,
		"SERVICE_STATUS_TERMINATING":  4,
	}
)

Enum value maps for ServiceStatus.

View Source
var File_appraisal_context_proto protoreflect.FileDescriptor
View Source
var File_evidence_proto protoreflect.FileDescriptor
View Source
var File_state_proto protoreflect.FileDescriptor
View Source
var File_token_proto protoreflect.FileDescriptor
View Source
var VTS_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.VTS",
	HandlerType: (*VTSServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetServiceState",
			Handler:    _VTS_GetServiceState_Handler,
		},
		{
			MethodName: "GetAttestation",
			Handler:    _VTS_GetAttestation_Handler,
		},
		{
			MethodName: "GetSupportedVerificationMediaTypes",
			Handler:    _VTS_GetSupportedVerificationMediaTypes_Handler,
		},
		{
			MethodName: "GetSupportedProvisioningMediaTypes",
			Handler:    _VTS_GetSupportedProvisioningMediaTypes_Handler,
		},
		{
			MethodName: "SubmitEndorsements",
			Handler:    _VTS_SubmitEndorsements_Handler,
		},
		{
			MethodName: "GetEARSigningPublicKey",
			Handler:    _VTS_GetEARSigningPublicKey_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "vts.proto",
}

VTS_ServiceDesc is the grpc.ServiceDesc for VTS service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterVTSServer

func RegisterVTSServer(s grpc.ServiceRegistrar, srv VTSServer)

Types

type AppraisalContext

type AppraisalContext struct {
	Evidence *EvidenceContext `protobuf:"bytes,1,opt,name=evidence,proto3" json:"evidence,omitempty"`
	// This is a JSON-serialized form ear.AttestationResult which is not
	// defined as a protobuf message and so cannot be included directly.
	Result []byte `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*AppraisalContext) Descriptor deprecated

func (*AppraisalContext) Descriptor() ([]byte, []int)

Deprecated: Use AppraisalContext.ProtoReflect.Descriptor instead.

func (*AppraisalContext) GetEvidence

func (x *AppraisalContext) GetEvidence() *EvidenceContext

func (*AppraisalContext) GetResult

func (x *AppraisalContext) GetResult() []byte

func (*AppraisalContext) MarshalJSON

func (msg *AppraisalContext) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*AppraisalContext) ProtoMessage

func (*AppraisalContext) ProtoMessage()

func (*AppraisalContext) ProtoReflect

func (x *AppraisalContext) ProtoReflect() protoreflect.Message

func (*AppraisalContext) Reset

func (x *AppraisalContext) Reset()

func (*AppraisalContext) String

func (x *AppraisalContext) String() string

func (*AppraisalContext) UnmarshalJSON

func (msg *AppraisalContext) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type AttestationToken

type AttestationToken struct {
	TenantId  string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
	Data      []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	MediaType string `protobuf:"bytes,4,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
	Nonce     []byte `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// contains filtered or unexported fields
}

func (*AttestationToken) Descriptor deprecated

func (*AttestationToken) Descriptor() ([]byte, []int)

Deprecated: Use AttestationToken.ProtoReflect.Descriptor instead.

func (*AttestationToken) GetData

func (x *AttestationToken) GetData() []byte

func (*AttestationToken) GetMediaType

func (x *AttestationToken) GetMediaType() string

func (*AttestationToken) GetNonce

func (x *AttestationToken) GetNonce() []byte

func (*AttestationToken) GetTenantId

func (x *AttestationToken) GetTenantId() string

func (*AttestationToken) MarshalJSON

func (msg *AttestationToken) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*AttestationToken) ProtoMessage

func (*AttestationToken) ProtoMessage()

func (*AttestationToken) ProtoReflect

func (x *AttestationToken) ProtoReflect() protoreflect.Message

func (*AttestationToken) Reset

func (x *AttestationToken) Reset()

func (*AttestationToken) String

func (x *AttestationToken) String() string

func (*AttestationToken) UnmarshalJSON

func (msg *AttestationToken) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type Evidence

type Evidence struct {
	Value *structpb.Struct `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Evidence) Descriptor deprecated

func (*Evidence) Descriptor() ([]byte, []int)

Deprecated: Use Evidence.ProtoReflect.Descriptor instead.

func (*Evidence) GetValue

func (x *Evidence) GetValue() *structpb.Struct

func (*Evidence) MarshalJSON

func (msg *Evidence) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*Evidence) ProtoMessage

func (*Evidence) ProtoMessage()

func (*Evidence) ProtoReflect

func (x *Evidence) ProtoReflect() protoreflect.Message

func (*Evidence) Reset

func (x *Evidence) Reset()

func (*Evidence) String

func (x *Evidence) String() string

func (*Evidence) UnmarshalJSON

func (msg *Evidence) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type EvidenceContext

type EvidenceContext struct {
	TenantId       string           `protobuf:"bytes,1,opt,name=tenant_id,json=tenant-id,proto3" json:"tenant_id,omitempty"`
	TrustAnchorIds []string         `protobuf:"bytes,2,rep,name=trust_anchor_ids,json=trust-anchor-ids,proto3" json:"trust_anchor_ids,omitempty"`
	ReferenceIds   []string         `protobuf:"bytes,3,rep,name=reference_ids,json=reference-ids,proto3" json:"reference_ids,omitempty"`
	Evidence       *structpb.Struct `protobuf:"bytes,5,opt,name=evidence,proto3" json:"evidence,omitempty"`
	// contains filtered or unexported fields
}

func (*EvidenceContext) Descriptor deprecated

func (*EvidenceContext) Descriptor() ([]byte, []int)

Deprecated: Use EvidenceContext.ProtoReflect.Descriptor instead.

func (*EvidenceContext) GetEvidence

func (x *EvidenceContext) GetEvidence() *structpb.Struct

func (*EvidenceContext) GetReferenceIds

func (x *EvidenceContext) GetReferenceIds() []string

func (*EvidenceContext) GetTenantId

func (x *EvidenceContext) GetTenantId() string

func (*EvidenceContext) GetTrustAnchorIds

func (x *EvidenceContext) GetTrustAnchorIds() []string

func (*EvidenceContext) MarshalJSON

func (msg *EvidenceContext) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*EvidenceContext) ProtoMessage

func (*EvidenceContext) ProtoMessage()

func (*EvidenceContext) ProtoReflect

func (x *EvidenceContext) ProtoReflect() protoreflect.Message

func (*EvidenceContext) Reset

func (x *EvidenceContext) Reset()

func (*EvidenceContext) String

func (x *EvidenceContext) String() string

func (*EvidenceContext) UnmarshalJSON

func (msg *EvidenceContext) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type MediaTypeList

type MediaTypeList struct {
	MediaTypes []string `protobuf:"bytes,1,rep,name=media_types,json=mediaTypes,proto3" json:"media_types,omitempty"`
	// contains filtered or unexported fields
}

func (*MediaTypeList) Descriptor deprecated

func (*MediaTypeList) Descriptor() ([]byte, []int)

Deprecated: Use MediaTypeList.ProtoReflect.Descriptor instead.

func (*MediaTypeList) GetMediaTypes

func (x *MediaTypeList) GetMediaTypes() []string

func (*MediaTypeList) MarshalJSON

func (msg *MediaTypeList) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*MediaTypeList) ProtoMessage

func (*MediaTypeList) ProtoMessage()

func (*MediaTypeList) ProtoReflect

func (x *MediaTypeList) ProtoReflect() protoreflect.Message

func (*MediaTypeList) Reset

func (x *MediaTypeList) Reset()

func (*MediaTypeList) String

func (x *MediaTypeList) String() string

func (*MediaTypeList) UnmarshalJSON

func (msg *MediaTypeList) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type PublicKey

type PublicKey struct {
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*PublicKey) Descriptor deprecated

func (*PublicKey) Descriptor() ([]byte, []int)

Deprecated: Use PublicKey.ProtoReflect.Descriptor instead.

func (*PublicKey) GetKey

func (x *PublicKey) GetKey() string

func (*PublicKey) MarshalJSON

func (msg *PublicKey) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*PublicKey) ProtoMessage

func (*PublicKey) ProtoMessage()

func (*PublicKey) ProtoReflect

func (x *PublicKey) ProtoReflect() protoreflect.Message

func (*PublicKey) Reset

func (x *PublicKey) Reset()

func (*PublicKey) String

func (x *PublicKey) String() string

func (*PublicKey) UnmarshalJSON

func (msg *PublicKey) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type ServiceState

type ServiceState struct {
	Status              ServiceStatus                  `protobuf:"varint,1,opt,name=status,proto3,enum=proto.ServiceStatus" json:"status,omitempty"`
	ServerVersion       string                         `protobuf:"bytes,2,opt,name=server_version,json=server-version,proto3" json:"server_version,omitempty"`
	SupportedMediaTypes map[string]*structpb.ListValue `` /* 210-byte string literal not displayed */
	// contains filtered or unexported fields
}

protolint:disable MAX_LINE_LENGTH

func (*ServiceState) Descriptor deprecated

func (*ServiceState) Descriptor() ([]byte, []int)

Deprecated: Use ServiceState.ProtoReflect.Descriptor instead.

func (*ServiceState) GetServerVersion

func (x *ServiceState) GetServerVersion() string

func (*ServiceState) GetStatus

func (x *ServiceState) GetStatus() ServiceStatus

func (*ServiceState) GetSupportedMediaTypes

func (x *ServiceState) GetSupportedMediaTypes() map[string]*structpb.ListValue

func (*ServiceState) MarshalJSON

func (msg *ServiceState) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*ServiceState) ProtoMessage

func (*ServiceState) ProtoMessage()

func (*ServiceState) ProtoReflect

func (x *ServiceState) ProtoReflect() protoreflect.Message

func (*ServiceState) Reset

func (x *ServiceState) Reset()

func (*ServiceState) String

func (x *ServiceState) String() string

func (*ServiceState) UnmarshalJSON

func (msg *ServiceState) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type ServiceStatus

type ServiceStatus int32
const (
	ServiceStatus_SERVICE_STATUS_UNSPECIFIED  ServiceStatus = 0
	ServiceStatus_SERVICE_STATUS_DOWN         ServiceStatus = 1
	ServiceStatus_SERVICE_STATUS_INITIALIZING ServiceStatus = 2
	ServiceStatus_SERVICE_STATUS_READY        ServiceStatus = 3
	ServiceStatus_SERVICE_STATUS_TERMINATING  ServiceStatus = 4
)

func (ServiceStatus) Descriptor

func (ServiceStatus) Enum

func (x ServiceStatus) Enum() *ServiceStatus

func (ServiceStatus) EnumDescriptor deprecated

func (ServiceStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use ServiceStatus.Descriptor instead.

func (ServiceStatus) Number

func (ServiceStatus) String

func (x ServiceStatus) String() string

func (ServiceStatus) Type

type Status

type Status struct {
	Result      bool   `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	ErrorDetail string `protobuf:"bytes,2,opt,name=error_detail,json=errorDetail,proto3" json:"error_detail,omitempty"`
	// contains filtered or unexported fields
}

func (*Status) Descriptor deprecated

func (*Status) Descriptor() ([]byte, []int)

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetErrorDetail

func (x *Status) GetErrorDetail() string

func (*Status) GetResult

func (x *Status) GetResult() bool

func (*Status) MarshalJSON

func (msg *Status) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

func (x *Status) ProtoReflect() protoreflect.Message

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

func (*Status) UnmarshalJSON

func (msg *Status) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type StringList

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

func ListValuetoStringList

func ListValuetoStringList(v *structpb.ListValue) *StringList

func NewStringList

func NewStringList(vs []string) (*StringList, error)

func (StringList) AsListValue

func (o StringList) AsListValue() *structpb.ListValue

func (StringList) AsSlice

func (o StringList) AsSlice() []string

type SubmitEndorsementsRequest

type SubmitEndorsementsRequest struct {
	MediaType string `protobuf:"bytes,1,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
	Data      []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*SubmitEndorsementsRequest) Descriptor deprecated

func (*SubmitEndorsementsRequest) Descriptor() ([]byte, []int)

Deprecated: Use SubmitEndorsementsRequest.ProtoReflect.Descriptor instead.

func (*SubmitEndorsementsRequest) GetData

func (x *SubmitEndorsementsRequest) GetData() []byte

func (*SubmitEndorsementsRequest) GetMediaType

func (x *SubmitEndorsementsRequest) GetMediaType() string

func (*SubmitEndorsementsRequest) MarshalJSON

func (msg *SubmitEndorsementsRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*SubmitEndorsementsRequest) ProtoMessage

func (*SubmitEndorsementsRequest) ProtoMessage()

func (*SubmitEndorsementsRequest) ProtoReflect

func (*SubmitEndorsementsRequest) Reset

func (x *SubmitEndorsementsRequest) Reset()

func (*SubmitEndorsementsRequest) String

func (x *SubmitEndorsementsRequest) String() string

func (*SubmitEndorsementsRequest) UnmarshalJSON

func (msg *SubmitEndorsementsRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type SubmitEndorsementsResponse

type SubmitEndorsementsResponse struct {
	Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*SubmitEndorsementsResponse) Descriptor deprecated

func (*SubmitEndorsementsResponse) Descriptor() ([]byte, []int)

Deprecated: Use SubmitEndorsementsResponse.ProtoReflect.Descriptor instead.

func (*SubmitEndorsementsResponse) GetStatus

func (x *SubmitEndorsementsResponse) GetStatus() *Status

func (*SubmitEndorsementsResponse) MarshalJSON

func (msg *SubmitEndorsementsResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*SubmitEndorsementsResponse) ProtoMessage

func (*SubmitEndorsementsResponse) ProtoMessage()

func (*SubmitEndorsementsResponse) ProtoReflect

func (*SubmitEndorsementsResponse) Reset

func (x *SubmitEndorsementsResponse) Reset()

func (*SubmitEndorsementsResponse) String

func (x *SubmitEndorsementsResponse) String() string

func (*SubmitEndorsementsResponse) UnmarshalJSON

func (msg *SubmitEndorsementsResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

type UnimplementedVTSServer

type UnimplementedVTSServer struct {
}

UnimplementedVTSServer must be embedded to have forward compatible implementations.

func (UnimplementedVTSServer) GetAttestation

func (UnimplementedVTSServer) GetEARSigningPublicKey

func (UnimplementedVTSServer) GetEARSigningPublicKey(context.Context, *emptypb.Empty) (*PublicKey, error)

func (UnimplementedVTSServer) GetServiceState

func (UnimplementedVTSServer) GetSupportedProvisioningMediaTypes

func (UnimplementedVTSServer) GetSupportedProvisioningMediaTypes(context.Context, *emptypb.Empty) (*MediaTypeList, error)

func (UnimplementedVTSServer) GetSupportedVerificationMediaTypes

func (UnimplementedVTSServer) GetSupportedVerificationMediaTypes(context.Context, *emptypb.Empty) (*MediaTypeList, error)

type UnsafeVTSServer

type UnsafeVTSServer interface {
	// contains filtered or unexported methods
}

UnsafeVTSServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to VTSServer will result in compilation errors.

type VTSClient

type VTSClient interface {
	// Return the summary state of the service.
	GetServiceState(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ServiceState, error)
	// Returns attestation information -- evidences, endorsed claims, trust
	// vector, etc -- for the provided attestation token data.
	GetAttestation(ctx context.Context, in *AttestationToken, opts ...grpc.CallOption) (*AppraisalContext, error)
	GetSupportedVerificationMediaTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*MediaTypeList, error)
	GetSupportedProvisioningMediaTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*MediaTypeList, error)
	SubmitEndorsements(ctx context.Context, in *SubmitEndorsementsRequest, opts ...grpc.CallOption) (*SubmitEndorsementsResponse, error)
	// Returns the public key used to sign evidence.
	GetEARSigningPublicKey(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PublicKey, error)
}

VTSClient is the client API for VTS service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewVTSClient

func NewVTSClient(cc grpc.ClientConnInterface) VTSClient

type VTSServer

type VTSServer interface {
	// Return the summary state of the service.
	GetServiceState(context.Context, *emptypb.Empty) (*ServiceState, error)
	// Returns attestation information -- evidences, endorsed claims, trust
	// vector, etc -- for the provided attestation token data.
	GetAttestation(context.Context, *AttestationToken) (*AppraisalContext, error)
	GetSupportedVerificationMediaTypes(context.Context, *emptypb.Empty) (*MediaTypeList, error)
	GetSupportedProvisioningMediaTypes(context.Context, *emptypb.Empty) (*MediaTypeList, error)
	SubmitEndorsements(context.Context, *SubmitEndorsementsRequest) (*SubmitEndorsementsResponse, error)
	// Returns the public key used to sign evidence.
	GetEARSigningPublicKey(context.Context, *emptypb.Empty) (*PublicKey, error)
	// contains filtered or unexported methods
}

VTSServer is the server API for VTS service. All implementations must embed UnimplementedVTSServer for forward compatibility

Jump to

Keyboard shortcuts

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