schema

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

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	Server  Server `json:"server"`
	Target  Target `json:"target"`
	CaPem   string `json:"ca_pem"`
	CertPem string `json:"cert_pem"`
	KeyPem  string `json:"key_pem"`
}

func ParseClientConfig

func ParseClientConfig(attrs map[string]interface{}) (*ClientConfig, error)

func (*ClientConfig) LoadServerTarget

func (a *ClientConfig) LoadServerTarget(data []byte) (*ClientConfig, error)

func (*ClientConfig) String

func (a *ClientConfig) String() string

type ControlClient

type ControlClient struct {
	PeerId    string `json:"peer_id"`
	Uuid      string `json:"uuid"`
	UserUuid  string `json:"user_uuid"`
	Name      string `json:"name"`
	ClientCid string `json:"client_cid"`
}

ControlClient Controller Client

func (*ControlClient) ToClientOrder

func (a *ControlClient) ToClientOrder(ctx context.Context, key []byte) (*ClientConfig, error)

ToClientOrder

type ControlClientData

type ControlClientData struct {
	List     ControlClients  `json:"list"`
	Paginate ControlPaginate `json:"paginate"`
}

ControlClientData

type ControlClientResult

type ControlClientResult struct {
	ControlCommonResult
	Data ControlClientData
}

ControlClientResult Client list

type ControlClients

type ControlClients []*ControlClient

type ControlCommonResult

type ControlCommonResult struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

ControlCommonResult

type ControlLoginResult

type ControlLoginResult struct {
	ControlCommonResult
	Data string `json:"data"`
}

ControlLoginResult Device login

type ControlMachineAuthResult

type ControlMachineAuthResult struct {
	ControlCommonResult
	Data string `json:"data"`
}

func (*ControlMachineAuthResult) GetCode

func (a *ControlMachineAuthResult) GetCode() string

GetCode

type ControlPaginate

type ControlPaginate struct {
	Total    int `json:"total"`
	Current  int `json:"current"`
	PageSize int `json:"pageSize"`
}

ControlPaginate

type ControlUserDetail

type ControlUserDetail struct {
	Uuid   string `json:"uuid"`
	Status string `json:"status"`
}

ControlUserDetail Login user information

type MetaData

type MetaData struct {
	Ip   string `json:"ip"`
	Loc  string `json:"loc"`
	Colo string `json:"colo"`
}

type NextServer

type NextServer struct {
	Host string
	Port string
}

NextServer

type Resource

type Resource struct {
	UUID string `json:"uuid"`
	Name string `json:"name"`
	Type string `json:"type"`
	Host string `json:"host"`
	Port string `json:"port"`
}

func (*Resource) CheckPort

func (a *Resource) CheckPort(targetPort int) bool

CheckPort Checking the Target Port eg:8080;9090;3000-4000

type Resources

type Resources []*Resource

func (Resources) VerifyResources

func (a Resources) VerifyResources(target Target) bool

Verify that the access resource exists

type Server

type Server struct {
	Host string `json:"host"`
	Port int    `json:"port"`
}

type ServerInfo

type ServerInfo struct {
	PeerAddress string     `json:"peer_address"`
	PeerId      string     `json:"peer_id"`
	Addr        string     `json:"addr"`
	Port        int        `json:"port"`
	MetaData    MetaData   `json:"meta_data"`
	GasPrice    int        `json:"price"`
	Type        ServerType `json:"type"`
}

func (*ServerInfo) String

func (a *ServerInfo) String() string

type ServerType

type ServerType string
const ServerTypeProvider ServerType = "provider"

type StatusText

type StatusText string

StatusText Define status text

func (StatusText) String

func (t StatusText) String() string

type Target

type Target struct {
	Host string `json:"host"`
	Port int    `json:"port"`
}

Jump to

Keyboard shortcuts

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