Documentation ¶
Index ¶
- Variables
- func InitProviderPlugins(name string, arg []string, Logger hclog.Logger) error
- func NewProviderPlugin(name string, arg []string, Logger hclog.Logger) *plugin.Client
- type GRPCClient
- type GRPCServer
- func (s *GRPCServer) GetUserInfo(ctx context.Context, req *providerpb.GetUserInfoReq) (*providerpb.GetUserInfoResp, error)
- func (s *GRPCServer) Init(ctx context.Context, req *providerpb.InitReq) (*providerpb.Enpty, error)
- func (s *GRPCServer) NewAuthURL(ctx context.Context, req *providerpb.NewAuthURLReq) (*providerpb.NewAuthURLResp, error)
- func (s *GRPCServer) Provider(ctx context.Context, req *providerpb.Enpty) (*providerpb.ProviderResp, error)
- type ProviderPlugin
Constants ¶
This section is empty.
Variables ¶
View Source
var HandshakeConfig = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "BASIC_PLUGIN",
MagicCookieValue: "hello",
}
Functions ¶
func InitProviderPlugins ¶
func NewProviderPlugin ¶
Types ¶
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
func (*GRPCClient) GetUserInfo ¶
func (*GRPCClient) Init ¶
func (c *GRPCClient) Init(o provider.Oauth2Option)
func (*GRPCClient) NewAuthURL ¶
func (*GRPCClient) Provider ¶
func (c *GRPCClient) Provider() provider.OAuth2Provider
type GRPCServer ¶
type GRPCServer struct { providerpb.UnimplementedOauth2PluginServer Impl provider.ProviderInterface }
func (*GRPCServer) GetUserInfo ¶
func (s *GRPCServer) GetUserInfo(ctx context.Context, req *providerpb.GetUserInfoReq) (*providerpb.GetUserInfoResp, error)
func (*GRPCServer) Init ¶
func (s *GRPCServer) Init(ctx context.Context, req *providerpb.InitReq) (*providerpb.Enpty, error)
func (*GRPCServer) NewAuthURL ¶
func (s *GRPCServer) NewAuthURL(ctx context.Context, req *providerpb.NewAuthURLReq) (*providerpb.NewAuthURLResp, error)
func (*GRPCServer) Provider ¶
func (s *GRPCServer) Provider(ctx context.Context, req *providerpb.Enpty) (*providerpb.ProviderResp, error)
type ProviderPlugin ¶
type ProviderPlugin struct { plugin.Plugin Impl provider.ProviderInterface }
func (*ProviderPlugin) GRPCClient ¶
func (p *ProviderPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
func (*ProviderPlugin) GRPCServer ¶
func (p *ProviderPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
Click to show internal directories.
Click to hide internal directories.