identity

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultNilService

type DefaultNilService struct{}

func (*DefaultNilService) GetPluginInfo

func (s *DefaultNilService) GetPluginInfo() (PluginInfo, error)

type DefaultUnimplementedService

type DefaultUnimplementedService struct{}

func (*DefaultUnimplementedService) GetPluginInfo

func (s *DefaultUnimplementedService) GetPluginInfo() (*PluginInfo, error)

type IdentityPlugin

type IdentityPlugin struct {
	plugin.NetRPCUnsupportedPlugin

	Service IdentityService
}

func (*IdentityPlugin) Client

func (p *IdentityPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)

func (*IdentityPlugin) Server

func (p *IdentityPlugin) Server(*plugin.MuxBroker) (interface{}, error)

type IdentityService

type IdentityService interface {
	GetPluginInfo() (*PluginInfo, error)
}

type PluginInfo

type PluginInfo struct {
	Name     string              `json:"name"`
	Version  string              `json:"version"`
	Author   string              `json:"author,omitempty"`
	Metadata map[string]string   `json:"metadata,omitempty"`
	Services []PluginServiceInfo `json:"services"`
}

type PluginServiceInfo

type PluginServiceInfo struct {
	Name        string            `json:"service"`
	Type        PluginServiceType `json:"type"`
	Description string            `json:"description"`
}

func GetPluginServiceInfo

func GetPluginServiceInfo(name string, services []PluginServiceInfo) (*PluginServiceInfo, bool)

type PluginServiceType

type PluginServiceType string
const (
	IdentityServiceType PluginServiceType = "identity"
	ToolServiceType     PluginServiceType = "tool"
	CacheServiceType    PluginServiceType = "cache"
)

type RpcClient

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

func (*RpcClient) GetPluginInfo

func (c *RpcClient) GetPluginInfo() (*PluginInfo, error)

type RpcServer

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

func (*RpcServer) GetPluginInfo

func (s *RpcServer) GetPluginInfo(_ struct{}, resp *PluginInfo) error

Jump to

Keyboard shortcuts

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