Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallPlatformPayload ¶ added in v0.1.9
type CallPlatformPayload struct {
Response interface{} `json:"response,omitempty"`
Source string `json:"source,omitempty"`
}
CallPlatformPayload is the public HTTP success payload for platform calls.
type CallPlatformRequest ¶
type CallPlatformRequest struct {
Platform string `json:"platform"` // Platform name, e.g., "quicksdk"
Method string `json:"method"` // API method name
Request string `json:"request"` // Request parameters (JSON string format)
}
CallPlatformRequest represents a request to call a platform
type CallPlatformResponse ¶
type CallPlatformResponse struct {
Code int `json:"code"`
Message string `json:"message"`
Response interface{} `json:"response,omitempty"` // Response from the platform
Source string `json:"source,omitempty"` // extension
}
CallPlatformResponse represents the response for calling a platform
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) ListMethods ¶
ListMethods handles the request to list platform methods
func (*Handler) ListPlatforms ¶
ListPlatforms handles the request to list platforms
type ListPlatformMethodsPayload ¶ added in v0.1.9
type ListPlatformMethodsPayload struct {
Methods []string `json:"methods,omitempty"`
Source string `json:"source,omitempty"`
}
ListPlatformMethodsPayload is the public HTTP success payload for listing methods.
type ListPlatformMethodsResponse ¶
type ListPlatformMethodsResponse struct {
Code int `json:"code"`
Message string `json:"message"`
Methods []string `json:"methods,omitempty"`
Source string `json:"source,omitempty"` // extension
}
ListPlatformMethodsResponse represents the response for listing platform methods
type ListPlatformsPayload ¶ added in v0.1.9
type ListPlatformsPayload struct {
Platforms []PlatformInfo `json:"platforms,omitempty"`
}
ListPlatformsPayload is the public HTTP success payload for listing platforms.
type ListPlatformsResponse ¶
type ListPlatformsResponse struct {
Code int `json:"code"`
Message string `json:"message"`
Platforms []PlatformInfo `json:"platforms,omitempty"`
}
ListPlatformsResponse represents the response for listing platforms
type PlatformInfo ¶
type PlatformInfo struct {
Name string `json:"name"`
Version string `json:"version"`
Enabled bool `json:"enabled"`
Methods []string `json:"methods"`
Source string `json:"source,omitempty"` // extension
}
PlatformInfo represents information about a platform
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(svcCtx *svc.ServiceContext) *Service
func (*Service) Call ¶
func (s *Service) Call(ctx context.Context, req *CallPlatformRequest) (*CallPlatformResponse, error)
Call calls a platform method
func (*Service) ListMethods ¶
func (s *Service) ListMethods(ctx context.Context, platform string) (*ListPlatformMethodsResponse, error)
ListMethods lists methods for a platform
func (*Service) ListPlatforms ¶
func (s *Service) ListPlatforms(ctx context.Context) (*ListPlatformsResponse, error)
ListPlatforms lists all available platforms