grpcserver

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CA_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "edgeca.CA",
	HandlerType: (*CAServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RequestPolicy",
			Handler:    _CA_RequestPolicy_Handler,
		},
		{
			MethodName: "GenerateCertificate",
			Handler:    _CA_GenerateCertificate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "edgeca.proto",
}

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

View Source
var File_edgeca_proto protoreflect.FileDescriptor

Functions

func RegisterCAServer

func RegisterCAServer(s grpc.ServiceRegistrar, srv CAServer)

func StartGrpcServer

func StartGrpcServer(port int, useSDS bool)

StartGrpcServer starts up the gRPC server

Types

type CAClient

type CAClient interface {
	RequestPolicy(ctx context.Context, in *PolicyRequest, opts ...grpc.CallOption) (*PolicyReply, error)
	GenerateCertificate(ctx context.Context, in *CertificateRequest, opts ...grpc.CallOption) (*CertificateReply, error)
}

CAClient is the client API for CA 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 NewCAClient

func NewCAClient(cc grpc.ClientConnInterface) CAClient

type CAServer

type CAServer interface {
	RequestPolicy(context.Context, *PolicyRequest) (*PolicyReply, error)
	GenerateCertificate(context.Context, *CertificateRequest) (*CertificateReply, error)
	// contains filtered or unexported methods
}

CAServer is the server API for CA service. All implementations must embed UnimplementedCAServer for forward compatibility

type CertificateReply

type CertificateReply struct {
	Certificate string `protobuf:"bytes,1,opt,name=certificate,proto3" json:"certificate,omitempty"`
	PrivateKey  string `protobuf:"bytes,2,opt,name=privateKey,proto3" json:"privateKey,omitempty"`
	// contains filtered or unexported fields
}

func (*CertificateReply) Descriptor deprecated

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

Deprecated: Use CertificateReply.ProtoReflect.Descriptor instead.

func (*CertificateReply) GetCertificate

func (x *CertificateReply) GetCertificate() string

func (*CertificateReply) GetPrivateKey

func (x *CertificateReply) GetPrivateKey() string

func (*CertificateReply) ProtoMessage

func (*CertificateReply) ProtoMessage()

func (*CertificateReply) ProtoReflect

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

func (*CertificateReply) Reset

func (x *CertificateReply) Reset()

func (*CertificateReply) String

func (x *CertificateReply) String() string

type CertificateRequest

type CertificateRequest struct {
	Csr       string `protobuf:"bytes,1,opt,name=csr,proto3" json:"csr,omitempty"`
	AuthToken string `protobuf:"bytes,2,opt,name=authToken,proto3" json:"authToken,omitempty"`
	// contains filtered or unexported fields
}

func (*CertificateRequest) Descriptor deprecated

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

Deprecated: Use CertificateRequest.ProtoReflect.Descriptor instead.

func (*CertificateRequest) GetAuthToken

func (x *CertificateRequest) GetAuthToken() string

func (*CertificateRequest) GetCsr

func (x *CertificateRequest) GetCsr() 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 PolicyReply

type PolicyReply struct {
	Policy                    string `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"`
	DefaultOrganization       string `protobuf:"bytes,2,opt,name=defaultOrganization,proto3" json:"defaultOrganization,omitempty"`
	DefaultOrganizationalUnit string `protobuf:"bytes,3,opt,name=defaultOrganizationalUnit,proto3" json:"defaultOrganizationalUnit,omitempty"`
	DefaultProvince           string `protobuf:"bytes,4,opt,name=defaultProvince,proto3" json:"defaultProvince,omitempty"`
	DefaultLocality           string `protobuf:"bytes,5,opt,name=defaultLocality,proto3" json:"defaultLocality,omitempty"`
	DefaultCountry            string `protobuf:"bytes,6,opt,name=defaultCountry,proto3" json:"defaultCountry,omitempty"`
	// contains filtered or unexported fields
}

func (*PolicyReply) Descriptor deprecated

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

Deprecated: Use PolicyReply.ProtoReflect.Descriptor instead.

func (*PolicyReply) GetDefaultCountry

func (x *PolicyReply) GetDefaultCountry() string

func (*PolicyReply) GetDefaultLocality

func (x *PolicyReply) GetDefaultLocality() string

func (*PolicyReply) GetDefaultOrganization

func (x *PolicyReply) GetDefaultOrganization() string

func (*PolicyReply) GetDefaultOrganizationalUnit

func (x *PolicyReply) GetDefaultOrganizationalUnit() string

func (*PolicyReply) GetDefaultProvince

func (x *PolicyReply) GetDefaultProvince() string

func (*PolicyReply) GetPolicy

func (x *PolicyReply) GetPolicy() string

func (*PolicyReply) ProtoMessage

func (*PolicyReply) ProtoMessage()

func (*PolicyReply) ProtoReflect

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

func (*PolicyReply) Reset

func (x *PolicyReply) Reset()

func (*PolicyReply) String

func (x *PolicyReply) String() string

type PolicyRequest

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

func (*PolicyRequest) Descriptor deprecated

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

Deprecated: Use PolicyRequest.ProtoReflect.Descriptor instead.

func (*PolicyRequest) ProtoMessage

func (*PolicyRequest) ProtoMessage()

func (*PolicyRequest) ProtoReflect

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

func (*PolicyRequest) Reset

func (x *PolicyRequest) Reset()

func (*PolicyRequest) String

func (x *PolicyRequest) String() string

type UnimplementedCAServer

type UnimplementedCAServer struct {
}

UnimplementedCAServer must be embedded to have forward compatible implementations.

func (UnimplementedCAServer) GenerateCertificate

func (UnimplementedCAServer) RequestPolicy

type UnsafeCAServer

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

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

Jump to

Keyboard shortcuts

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