api

package
v0.0.0-...-6c925ee Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MountApiService

func MountApiService[AS ApiService[R], R any](srv *server.RemoteXServer) gin.HandlerFunc

Types

type ApiService

type ApiService[R any] interface {
	Handle(c *gin.Context, srv *server.RemoteXServer) (resp R, err error)
}

type NodeDto

type NodeDto struct {
	NodeId       string `json:"node_id"`
	ConnectionId string `json:"connection_id,omitempty"`
	Name         string `json:"name"`
	Address      string `json:"address"`
	Status       string `json:"status"`
	IsLocal      bool   `json:"is_local"`
}

func NodeToDto

func NodeToDto(n *node.Node) *NodeDto

func NodesToDto

func NodesToDto(nodes []*node.Node) []*NodeDto

type RemoteXAPI

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

func NewRemoteXAPI

func NewRemoteXAPI(srv *server.RemoteXServer) *RemoteXAPI

func (*RemoteXAPI) SetupHttpServer

func (a *RemoteXAPI) SetupHttpServer() *gin.Engine

type Ret

type Ret struct {
	ErrNo  uint64 `json:"err_no"`
	ErrMsg string `json:"err_msg"`
	Data   any    `json:"data"`
}

Jump to

Keyboard shortcuts

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