api

package
v2.6.12 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbList

type AbList struct {
	Peers     []*model.AddressBook `json:"peers,omitempty"`
	Tags      []string             `json:"tags,omitempty"`
	TagColors string               `json:"tag_colors,omitempty"`
}

type GroupPeerPayload

type GroupPeerPayload struct {
	Id       string           `json:"id"`
	Info     *PeerPayloadInfo `json:"info"`
	Status   int              `json:"status"`
	User     string           `json:"user"`
	UserName string           `json:"user_name"`
	Note     string           `json:"note"`
}

GroupPeerPayload https://github.com/rustdesk/rustdesk/blob/master/flutter/lib/common/hbbs/hbbs.dart#L64

	String id = '';
	Map<String, dynamic> info = {};
	int? status;
	String user = '';
	String user_name = '';
	String note = '';

 PeerPayload.fromJson(Map<String, dynamic> json)
      : id = json['id'] ?? '',
        info = (json['info'] is Map<String, dynamic>) ? json['info'] : {},
        status = json['status'],
        user = json['user'] ?? '',
        user_name = json['user_name'] ?? '',
        note = json['note'] ?? '';

	static Peer toPeer(GroupPeerPayload p) {
	    return Peer.fromJson({
	      "id": p.id,
	      'loginName': p.user_name,
	      "username": p.info['username'] ?? '',
	      "platform": _platform(p.info['os']),
	      "hostname": p.info['device_name'],
	    });
	  }

func (*GroupPeerPayload) FromAddressBook

func (gpp *GroupPeerPayload) FromAddressBook(a *model.AddressBook, username string)

func (*GroupPeerPayload) FromPeer

func (gpp *GroupPeerPayload) FromPeer(p *model.Peer, username string)

type LoginRes

type LoginRes struct {
	Type        string      `json:"type"`
	AccessToken string      `json:"access_token"`
	User        UserPayload `json:"user"`
	Secret      string      `json:"secret,omitempty"`
	TfaType     string      `json:"tfa_type,omitempty"`
}
class HttpType {
  static const kAuthReqTypeAccount = "account";
  static const kAuthReqTypeMobile = "mobile";
  static const kAuthReqTypeSMSCode = "sms_code";
  static const kAuthReqTypeEmailCode = "email_code";
  static const kAuthReqTypeTfaCode = "tfa_code";

  static const kAuthResTypeToken = "access_token";
  static const kAuthResTypeEmailCheck = "email_check";
  static const kAuthResTypeTfaCheck = "tfa_check";
}

type PeerPayloadInfo

type PeerPayloadInfo struct {
	DeviceName string `json:"device_name"`
	Os         string `json:"os"`
	Username   string `json:"username"`
}

type SharedProfilesPayload

type SharedProfilesPayload struct {
	Guid  string `json:"guid"`
	Name  string `json:"name"`
	Owner string `json:"owner"`
	Note  string `json:"note"`
	Rule  int    `json:"rule"`
}

type UserPayload

type UserPayload struct {
	Name    string                 `json:"name"`
	Email   string                 `json:"email"`
	Note    string                 `json:"note"`
	IsAdmin *bool                  `json:"is_admin"`
	Status  int                    `json:"status"`
	Info    map[string]interface{} `json:"info"`
}

UserPayload String name = ”; String email = ”; String note = ”; UserStatus status; bool isAdmin = false;

func (*UserPayload) FromUser

func (up *UserPayload) FromUser(user *model.User) *UserPayload

type WebClientPeerInfoPayload

type WebClientPeerInfoPayload struct {
	Username string `json:"username"`
	Hostname string `json:"hostname"`
	Platform string `json:"platform"`
	Hash     string `json:"hash"`
	Id       string `json:"id"`
}

type WebClientPeerPayload

type WebClientPeerPayload struct {
	ViewStyle string                   `json:"view-style"`
	Tm        int64                    `json:"tm"`
	Info      WebClientPeerInfoPayload `json:"info"`
	Tmppwd    string                   `json:"tmppwd"`
}

func (*WebClientPeerPayload) FromAddressBook

func (wcpp *WebClientPeerPayload) FromAddressBook(a *model.AddressBook)

func (*WebClientPeerPayload) FromShareRecord

func (wcpp *WebClientPeerPayload) FromShareRecord(sr *model.ShareRecord)

Jump to

Keyboard shortcuts

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