grpc

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_grpc_xca_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "main.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Sign",
			Handler:    _Service_Sign_Handler,
		},
		{
			MethodName: "Version",
			Handler:    _Service_Version_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "grpc/xca.proto",
}

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

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type ServiceClient

type ServiceClient interface {
	Sign(ctx context.Context, in *TLSRequest, opts ...grpc.CallOption) (*TLSResponse, error)
	Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionResponse, error)
}

ServiceClient is the client API for Service 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 NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	Sign(context.Context, *TLSRequest) (*TLSResponse, error)
	Version(context.Context, *emptypb.Empty) (*VersionResponse, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type TLSRequest

type TLSRequest struct {
	CN      string   `protobuf:"bytes,1,opt,name=CN,proto3" json:"CN,omitempty"`
	Domains []string `protobuf:"bytes,2,rep,name=Domains,proto3" json:"Domains,omitempty"`
	IPs     []string `protobuf:"bytes,3,rep,name=IPs,proto3" json:"IPs,omitempty"`
	Days    int64    `protobuf:"varint,4,opt,name=Days,proto3" json:"Days,omitempty"`
	KeyBits int64    `protobuf:"varint,5,opt,name=KeyBits,proto3" json:"KeyBits,omitempty"`
	// contains filtered or unexported fields
}

func (*TLSRequest) Descriptor deprecated

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

Deprecated: Use TLSRequest.ProtoReflect.Descriptor instead.

func (*TLSRequest) GetCN

func (x *TLSRequest) GetCN() string

func (*TLSRequest) GetDays

func (x *TLSRequest) GetDays() int64

func (*TLSRequest) GetDomains

func (x *TLSRequest) GetDomains() []string

func (*TLSRequest) GetIPs

func (x *TLSRequest) GetIPs() []string

func (*TLSRequest) GetKeyBits

func (x *TLSRequest) GetKeyBits() int64

func (*TLSRequest) ProtoMessage

func (*TLSRequest) ProtoMessage()

func (*TLSRequest) ProtoReflect

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

func (*TLSRequest) Reset

func (x *TLSRequest) Reset()

func (*TLSRequest) String

func (x *TLSRequest) String() string

type TLSResponse

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

func (*TLSResponse) Descriptor deprecated

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

Deprecated: Use TLSResponse.ProtoReflect.Descriptor instead.

func (*TLSResponse) GetCert

func (x *TLSResponse) GetCert() string

func (*TLSResponse) GetKey

func (x *TLSResponse) GetKey() string

func (*TLSResponse) ProtoMessage

func (*TLSResponse) ProtoMessage()

func (*TLSResponse) ProtoReflect

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

func (*TLSResponse) Reset

func (x *TLSResponse) Reset()

func (*TLSResponse) String

func (x *TLSResponse) String() string

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) Sign

func (UnimplementedServiceServer) Version

type UnsafeServiceServer

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

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

type VersionResponse

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

func (*VersionResponse) Descriptor deprecated

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

Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead.

func (*VersionResponse) GetVersion

func (x *VersionResponse) GetVersion() string

func (*VersionResponse) ProtoMessage

func (*VersionResponse) ProtoMessage()

func (*VersionResponse) ProtoReflect

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

func (*VersionResponse) Reset

func (x *VersionResponse) Reset()

func (*VersionResponse) String

func (x *VersionResponse) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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