// Code generated by protoc-gen-go-spire. DO NOT EDIT.

package plugin

import (
	pluginsdk "github.com/spiffe/spire-plugin-sdk/pluginsdk"
	grpc "google.golang.org/grpc"
)

func PluginInitPluginServer(server PluginInitServer) pluginsdk.PluginServer {
	return pluginInitPluginServer{PluginInitServer: server}
}

type pluginInitPluginServer struct {
	PluginInitServer
}

func (s pluginInitPluginServer) Type() string {
	return "PluginInit"
}

func (s pluginInitPluginServer) GRPCServiceName() string {
	return "spire.common.plugin.PluginInit"
}

func (s pluginInitPluginServer) RegisterServer(server *grpc.Server) interface{} {
	RegisterPluginInitServer(server, s.PluginInitServer)
	return s.PluginInitServer
}

type PluginInitPluginClient struct {
	PluginInitClient
}

func (s PluginInitPluginClient) Type() string {
	return "PluginInit"
}

func (c *PluginInitPluginClient) IsInitialized() bool {
	return c.PluginInitClient != nil
}

func (c *PluginInitPluginClient) GRPCServiceName() string {
	return "spire.common.plugin.PluginInit"
}

func (c *PluginInitPluginClient) InitClient(conn grpc.ClientConnInterface) interface{} {
	c.PluginInitClient = NewPluginInitClient(conn)
	return c.PluginInitClient
}
