protos

package
v0.0.0-...-89602ce Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_certifier_service_proto protoreflect.FileDescriptor

Functions

func RegisterCertifierServer

func RegisterCertifierServer(s *grpc.Server, srv CertifierServer)

Types

type AddCertRequest

type AddCertRequest struct {
	Id       *protos.Identity `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	CertDer  []byte           `protobuf:"bytes,2,opt,name=cert_der,json=certDer,proto3" json:"cert_der,omitempty"` // signed certificate in DER encoding
	CertType protos.CertType  `protobuf:"varint,3,opt,name=cert_type,json=certType,proto3,enum=magma.orc8r.CertType" json:"cert_type,omitempty"`
	// contains filtered or unexported fields
}

func (*AddCertRequest) Descriptor deprecated

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

Deprecated: Use AddCertRequest.ProtoReflect.Descriptor instead.

func (*AddCertRequest) GetCertDer

func (x *AddCertRequest) GetCertDer() []byte

func (*AddCertRequest) GetCertType

func (x *AddCertRequest) GetCertType() protos.CertType

func (*AddCertRequest) GetId

func (x *AddCertRequest) GetId() *protos.Identity

func (*AddCertRequest) ProtoMessage

func (*AddCertRequest) ProtoMessage()

func (*AddCertRequest) ProtoReflect

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

func (*AddCertRequest) Reset

func (x *AddCertRequest) Reset()

func (*AddCertRequest) String

func (x *AddCertRequest) String() string

type CertificateInfo

type CertificateInfo struct {
	Id        *protos.Identity     `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	NotBefore *timestamp.Timestamp `protobuf:"bytes,2,opt,name=not_before,json=notBefore,proto3" json:"not_before,omitempty"`
	NotAfter  *timestamp.Timestamp `protobuf:"bytes,3,opt,name=not_after,json=notAfter,proto3" json:"not_after,omitempty"`
	CertType  protos.CertType      `protobuf:"varint,4,opt,name=cert_type,json=certType,proto3,enum=magma.orc8r.CertType" json:"cert_type,omitempty"`
	// contains filtered or unexported fields
}

func (*CertificateInfo) Descriptor deprecated

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

Deprecated: Use CertificateInfo.ProtoReflect.Descriptor instead.

func (*CertificateInfo) GetCertType

func (x *CertificateInfo) GetCertType() protos.CertType

func (*CertificateInfo) GetId

func (x *CertificateInfo) GetId() *protos.Identity

func (*CertificateInfo) GetNotAfter

func (x *CertificateInfo) GetNotAfter() *timestamp.Timestamp

func (*CertificateInfo) GetNotBefore

func (x *CertificateInfo) GetNotBefore() *timestamp.Timestamp

func (*CertificateInfo) ProtoMessage

func (*CertificateInfo) ProtoMessage()

func (*CertificateInfo) ProtoReflect

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

func (*CertificateInfo) Reset

func (x *CertificateInfo) Reset()

func (*CertificateInfo) String

func (x *CertificateInfo) String() string

type CertificateInfoMap

type CertificateInfoMap struct {
	Certificates map[string]*CertificateInfo `` /* 165-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*CertificateInfoMap) Descriptor deprecated

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

Deprecated: Use CertificateInfoMap.ProtoReflect.Descriptor instead.

func (*CertificateInfoMap) GetCertificates

func (x *CertificateInfoMap) GetCertificates() map[string]*CertificateInfo

func (*CertificateInfoMap) ProtoMessage

func (*CertificateInfoMap) ProtoMessage()

func (*CertificateInfoMap) ProtoReflect

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

func (*CertificateInfoMap) Reset

func (x *CertificateInfoMap) Reset()

func (*CertificateInfoMap) String

func (x *CertificateInfoMap) String() string

type CertifierClient

type CertifierClient interface {
	// Returns the cert of the requested CA
	GetCA(ctx context.Context, in *GetCARequest, opts ...grpc.CallOption) (*protos.CACert, error)
	// Signs and adds a new certificate to the store.
	// Returns signed certificate.
	//
	SignAddCertificate(ctx context.Context, in *protos.CSR, opts ...grpc.CallOption) (*protos.Certificate, error)
	// Returns the CertificateInfo for a certificate.
	// Throws NOT_FOUND if the certificate is missing.
	//
	GetIdentity(ctx context.Context, in *protos.Certificate_SN, opts ...grpc.CallOption) (*CertificateInfo, error)
	// Revoke an existing certificate.
	// If the certificate does not exist or is expired, this request is ignored.
	//
	RevokeCertificate(ctx context.Context, in *protos.Certificate_SN, opts ...grpc.CallOption) (*protos.Void, error)
	// Add provided Certificate (AddCertRequest.cert_der) into Certifier table and
	// associates its Serial Number with given Identity (AddCertRequest.id)
	AddCertificate(ctx context.Context, in *AddCertRequest, opts ...grpc.CallOption) (*protos.Void, error)
	// Finds & returns Serial Numbers of all Certificates associated with the
	// given Identity
	FindCertificates(ctx context.Context, in *protos.Identity, opts ...grpc.CallOption) (*SerialNumbers, error)
	// Returns serial numbers of all certificates in the table
	ListCertificates(ctx context.Context, in *protos.Void, opts ...grpc.CallOption) (*SerialNumbers, error)
	// Returns all registered Certificates
	GetAll(ctx context.Context, in *protos.Void, opts ...grpc.CallOption) (*CertificateInfoMap, error)
	// cleanup expired certificates
	//
	CollectGarbage(ctx context.Context, in *protos.Void, opts ...grpc.CallOption) (*protos.Void, error)
}

CertifierClient is the client API for Certifier service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewCertifierClient

func NewCertifierClient(cc grpc.ClientConnInterface) CertifierClient

type CertifierServer

type CertifierServer interface {
	// Returns the cert of the requested CA
	GetCA(context.Context, *GetCARequest) (*protos.CACert, error)
	// Signs and adds a new certificate to the store.
	// Returns signed certificate.
	//
	SignAddCertificate(context.Context, *protos.CSR) (*protos.Certificate, error)
	// Returns the CertificateInfo for a certificate.
	// Throws NOT_FOUND if the certificate is missing.
	//
	GetIdentity(context.Context, *protos.Certificate_SN) (*CertificateInfo, error)
	// Revoke an existing certificate.
	// If the certificate does not exist or is expired, this request is ignored.
	//
	RevokeCertificate(context.Context, *protos.Certificate_SN) (*protos.Void, error)
	// Add provided Certificate (AddCertRequest.cert_der) into Certifier table and
	// associates its Serial Number with given Identity (AddCertRequest.id)
	AddCertificate(context.Context, *AddCertRequest) (*protos.Void, error)
	// Finds & returns Serial Numbers of all Certificates associated with the
	// given Identity
	FindCertificates(context.Context, *protos.Identity) (*SerialNumbers, error)
	// Returns serial numbers of all certificates in the table
	ListCertificates(context.Context, *protos.Void) (*SerialNumbers, error)
	// Returns all registered Certificates
	GetAll(context.Context, *protos.Void) (*CertificateInfoMap, error)
	// cleanup expired certificates
	//
	CollectGarbage(context.Context, *protos.Void) (*protos.Void, error)
}

CertifierServer is the server API for Certifier service.

type GetCARequest

type GetCARequest struct {
	CertType protos.CertType `protobuf:"varint,1,opt,name=cert_type,json=certType,proto3,enum=magma.orc8r.CertType" json:"cert_type,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCARequest) Descriptor deprecated

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

Deprecated: Use GetCARequest.ProtoReflect.Descriptor instead.

func (*GetCARequest) GetCertType

func (x *GetCARequest) GetCertType() protos.CertType

func (*GetCARequest) ProtoMessage

func (*GetCARequest) ProtoMessage()

func (*GetCARequest) ProtoReflect

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

func (*GetCARequest) Reset

func (x *GetCARequest) Reset()

func (*GetCARequest) String

func (x *GetCARequest) String() string

type SerialNumbers

type SerialNumbers struct {
	Sns []string `protobuf:"bytes,1,rep,name=sns,proto3" json:"sns,omitempty"`
	// contains filtered or unexported fields
}

func (*SerialNumbers) Descriptor deprecated

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

Deprecated: Use SerialNumbers.ProtoReflect.Descriptor instead.

func (*SerialNumbers) GetSns

func (x *SerialNumbers) GetSns() []string

func (*SerialNumbers) ProtoMessage

func (*SerialNumbers) ProtoMessage()

func (*SerialNumbers) ProtoReflect

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

func (*SerialNumbers) Reset

func (x *SerialNumbers) Reset()

func (*SerialNumbers) String

func (x *SerialNumbers) String() string

type UnimplementedCertifierServer

type UnimplementedCertifierServer struct {
}

UnimplementedCertifierServer can be embedded to have forward compatible implementations.

func (*UnimplementedCertifierServer) AddCertificate

func (*UnimplementedCertifierServer) CollectGarbage

func (*UnimplementedCertifierServer) FindCertificates

func (*UnimplementedCertifierServer) GetAll

func (*UnimplementedCertifierServer) GetCA

func (*UnimplementedCertifierServer) GetIdentity

func (*UnimplementedCertifierServer) ListCertificates

func (*UnimplementedCertifierServer) RevokeCertificate

func (*UnimplementedCertifierServer) SignAddCertificate

Jump to

Keyboard shortcuts

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