pki

package
v0.0.0-...-367b6cc Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: MPL-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const Key = "pki"

Variables

View Source
var (
	Configuration_KeyAlgorithm_name = map[int32]string{
		0: "RSA",
		1: "ECDSA",
	}
	Configuration_KeyAlgorithm_value = map[string]int32{
		"RSA":   0,
		"ECDSA": 1,
	}
)

Enum value maps for Configuration_KeyAlgorithm.

View Source
var File_adapters_pki_pki_proto protoreflect.FileDescriptor

Functions

func RegisterPKIServiceServer

func RegisterPKIServiceServer(s *grpc.Server, srv PKIServiceServer)

Types

type Adapter

type Adapter struct {
	UnimplementedPKIServiceServer
	// contains filtered or unexported fields
}

func New

func New() *Adapter

func (*Adapter) Attach

func (a *Adapter) Attach()

func (*Adapter) CreateCertificate

func (a *Adapter) CreateCertificate(ctx context.Context, in *CertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error)

func (*Adapter) Detach

func (a *Adapter) Detach()

func (*Adapter) Initialize

func (a *Adapter) Initialize()

func (*Adapter) Register

func (a *Adapter) Register() (string, interface{})

type CertificateRequest

type CertificateRequest struct {
	Hosts                  []string `protobuf:"bytes,1,rep,name=hosts,proto3" json:"hosts,omitempty"`
	DurationSeconds        int64    `protobuf:"varint,2,opt,name=duration_seconds,json=durationSeconds,proto3" json:"duration_seconds,omitempty"`
	SerialNumber           int64    `protobuf:"varint,3,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"`
	SubjectOrganization    []string `protobuf:"bytes,4,rep,name=subject_organization,json=subjectOrganization,proto3" json:"subject_organization,omitempty"`
	IsCa                   bool     `protobuf:"varint,5,opt,name=is_ca,json=isCa,proto3" json:"is_ca,omitempty"`
	PemCertificateFilePath string   `` /* 131-byte string literal not displayed */
	PemPrivateKeyFilePath  string   `` /* 130-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*CertificateRequest) Descriptor deprecated

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

Deprecated: Use CertificateRequest.ProtoReflect.Descriptor instead.

func (*CertificateRequest) GetDurationSeconds

func (x *CertificateRequest) GetDurationSeconds() int64

func (*CertificateRequest) GetHosts

func (x *CertificateRequest) GetHosts() []string

func (*CertificateRequest) GetIsCa

func (x *CertificateRequest) GetIsCa() bool

func (*CertificateRequest) GetPemCertificateFilePath

func (x *CertificateRequest) GetPemCertificateFilePath() string

func (*CertificateRequest) GetPemPrivateKeyFilePath

func (x *CertificateRequest) GetPemPrivateKeyFilePath() string

func (*CertificateRequest) GetSerialNumber

func (x *CertificateRequest) GetSerialNumber() int64

func (*CertificateRequest) GetSubjectOrganization

func (x *CertificateRequest) GetSubjectOrganization() []string

func (*CertificateRequest) ProtoMessage

func (*CertificateRequest) ProtoMessage()

func (*CertificateRequest) ProtoReflect

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

func (*CertificateRequest) Reset

func (x *CertificateRequest) Reset()

func (*CertificateRequest) String

func (x *CertificateRequest) String() string

type CertificateResponse

type CertificateResponse struct {
	PemCertificate []byte `protobuf:"bytes,1,opt,name=pem_certificate,json=pemCertificate,proto3" json:"pem_certificate,omitempty"`
	PemPrivateKey  []byte `protobuf:"bytes,2,opt,name=pem_private_key,json=pemPrivateKey,proto3" json:"pem_private_key,omitempty"`
	// contains filtered or unexported fields
}

func (*CertificateResponse) Descriptor deprecated

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

Deprecated: Use CertificateResponse.ProtoReflect.Descriptor instead.

func (*CertificateResponse) GetPemCertificate

func (x *CertificateResponse) GetPemCertificate() []byte

func (*CertificateResponse) GetPemPrivateKey

func (x *CertificateResponse) GetPemPrivateKey() []byte

func (*CertificateResponse) ProtoMessage

func (*CertificateResponse) ProtoMessage()

func (*CertificateResponse) ProtoReflect

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

func (*CertificateResponse) Reset

func (x *CertificateResponse) Reset()

func (*CertificateResponse) String

func (x *CertificateResponse) String() string

type Configuration

type Configuration struct {
	KeyAlgorithm        Configuration_KeyAlgorithm `` /* 149-byte string literal not displayed */
	RsaBits             uint32                     `protobuf:"varint,2,opt,name=rsa_bits,json=rsaBits,proto3" json:"rsa_bits,omitempty"`
	CertificateRequests []*CertificateRequest      `protobuf:"bytes,3,rep,name=certificate_requests,json=certificateRequests,proto3" json:"certificate_requests,omitempty"`
	// contains filtered or unexported fields
}

func (*Configuration) Descriptor deprecated

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

Deprecated: Use Configuration.ProtoReflect.Descriptor instead.

func (*Configuration) GetCertificateRequests

func (x *Configuration) GetCertificateRequests() []*CertificateRequest

func (*Configuration) GetKeyAlgorithm

func (x *Configuration) GetKeyAlgorithm() Configuration_KeyAlgorithm

func (*Configuration) GetRsaBits

func (x *Configuration) GetRsaBits() uint32

func (*Configuration) ProtoMessage

func (*Configuration) ProtoMessage()

func (*Configuration) ProtoReflect

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

func (*Configuration) Reset

func (x *Configuration) Reset()

func (*Configuration) String

func (x *Configuration) String() string

type Configuration_KeyAlgorithm

type Configuration_KeyAlgorithm int32
const (
	Configuration_RSA   Configuration_KeyAlgorithm = 0
	Configuration_ECDSA Configuration_KeyAlgorithm = 1
)

func (Configuration_KeyAlgorithm) Descriptor

func (Configuration_KeyAlgorithm) Enum

func (Configuration_KeyAlgorithm) EnumDescriptor deprecated

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

Deprecated: Use Configuration_KeyAlgorithm.Descriptor instead.

func (Configuration_KeyAlgorithm) Number

func (Configuration_KeyAlgorithm) String

func (Configuration_KeyAlgorithm) Type

type PKIServiceClient

type PKIServiceClient interface {
	CreateCertificate(ctx context.Context, in *CertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error)
}

PKIServiceClient is the client API for PKIService 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 NewPKIServiceClient

func NewPKIServiceClient(cc grpc.ClientConnInterface) PKIServiceClient

type PKIServiceServer

type PKIServiceServer interface {
	CreateCertificate(context.Context, *CertificateRequest) (*CertificateResponse, error)
	// contains filtered or unexported methods
}

PKIServiceServer is the server API for PKIService service. All implementations must embed UnimplementedPKIServiceServer for forward compatibility

type UnimplementedPKIServiceServer

type UnimplementedPKIServiceServer struct {
}

UnimplementedPKIServiceServer must be embedded to have forward compatible implementations.

func (*UnimplementedPKIServiceServer) CreateCertificate

Jump to

Keyboard shortcuts

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