platform

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

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 NewHandler(service *Service) *Handler

func (*Handler) Call

func (h *Handler) Call(c *gin.Context)

Call handles the request to call a platform method

func (*Handler) List

func (h *Handler) List(c *gin.Context)

func (*Handler) ListMethods

func (h *Handler) ListMethods(c *gin.Context)

ListMethods handles the request to list platform methods

func (*Handler) ListPlatforms

func (h *Handler) ListPlatforms(c *gin.Context)

ListPlatforms handles the request to list platforms

func (*Handler) Methods

func (h *Handler) Methods(c *gin.Context)

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

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

Jump to

Keyboard shortcuts

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