Documentation
¶
Overview ¶
Package platform provides third-party platform integration support.
Index ¶
- func MarshalRequest(v interface{}) ([]byte, error)
- func UnmarshalResponse(data []byte, v interface{}) error
- type Config
- type Loader
- type ProviderEntry
- type Server
- func (s *Server) CallPlatform(ctx context.Context, req *platformv1.CallPlatformRequest) (*platformv1.CallPlatformResponse, error)
- func (s *Server) ListPlatformMethods(ctx context.Context, req *platformv1.ListPlatformMethodsRequest) (*platformv1.ListPlatformMethodsResponse, error)
- func (s *Server) ListPlatforms(ctx context.Context, req *platformv1.ListPlatformsRequest) (*platformv1.ListPlatformsResponse, error)
- func (s *Server) ReloadPlatformConfig(ctx context.Context, req *emptypb.Empty) (*platformv1.ReloadPlatformConfigResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalRequest ¶
MarshalRequest converts a struct to JSON bytes for the request.
func UnmarshalResponse ¶
UnmarshalResponse parses JSON response bytes into a struct.
Types ¶
type Config ¶
type Config struct {
Platforms map[string]ProviderEntry `yaml:"platforms"`
}
Config represents the platforms configuration file structure.
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader loads and manages platform providers from configuration.
func (*Loader) GetProvider ¶
GetProvider returns a provider by name.
func (*Loader) ListProviders ¶
ListProviders returns all loaded providers.
type ProviderEntry ¶
type ProviderEntry struct {
Enabled bool `yaml:"enabled"`
Type string `yaml:"type"`
Config map[string]interface{} `yaml:"config"`
}
ProviderEntry represents a single provider entry in the config.
type Server ¶
type Server struct {
platformv1.UnimplementedPlatformServiceServer
// contains filtered or unexported fields
}
Server implements the PlatformService gRPC server.
func (*Server) CallPlatform ¶
func (s *Server) CallPlatform(ctx context.Context, req *platformv1.CallPlatformRequest) (*platformv1.CallPlatformResponse, error)
CallPlatform invokes a method on a third-party platform.
func (*Server) ListPlatformMethods ¶
func (s *Server) ListPlatformMethods(ctx context.Context, req *platformv1.ListPlatformMethodsRequest) (*platformv1.ListPlatformMethodsResponse, error)
ListPlatformMethods returns the methods supported by a platform.
func (*Server) ListPlatforms ¶
func (s *Server) ListPlatforms(ctx context.Context, req *platformv1.ListPlatformsRequest) (*platformv1.ListPlatformsResponse, error)
ListPlatforms returns all available platforms.
func (*Server) ReloadPlatformConfig ¶
func (s *Server) ReloadPlatformConfig(ctx context.Context, req *emptypb.Empty) (*platformv1.ReloadPlatformConfigResponse, error)
ReloadPlatformConfig reloads the platform configuration.
Directories
¶
| Path | Synopsis |
|---|---|
|
monitoring
|
|
|
Package openapi provides a generic provider for OpenAPI/Swagger based services.
|
Package openapi provides a generic provider for OpenAPI/Swagger based services. |
|
Package provider provides a pluggable interface for third-party platform integrations.
|
Package provider provides a pluggable interface for third-party platform integrations. |
|
Package quicksdk provides a client for the QuickSDK open API.
|
Package quicksdk provides a client for the QuickSDK open API. |
|
Package ratelimit provides rate limiting utilities for platform providers.
|
Package ratelimit provides rate limiting utilities for platform providers. |