Documentation
¶
Index ¶
- func ToJSON(data interface{}) string
- type DeviceInfo
- type Erebrus
- type FlowId
- type FlowIdType
- type FormData
- type IPInfo
- type IpGeoAddress
- type Node
- type NodeAppends
- type NodeDwifi
- type NodeDwifiResponse
- type NodeResponse
- type OSInfo
- type Subscription
- type TStripePiType
- type User
- type UserFeedback
- type UserStripePi
- type WifiNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DeviceInfo ¶
type DeviceInfo struct { MACAddress string `json:"macAddress"` IPAddress string `json:"ipAddress"` ConnectedAt time.Time `json:"connectedAt"` TotalConnectedTime time.Duration `json:"totalConnectedTime"` Connected bool `json:"connected"` LastChecked time.Time `json:"lastChecked"` DefaultGateway string `json:"defaultGateway"` Manufacturer string `json:"manufacturer"` InterfaceName string `json:"interfaceName"` HostSSID string `json:"hostSSID"` }
type Erebrus ¶
type Erebrus struct { UUID string `gorm:"primary_key" json:"UUID"` Name string `json:"name"` WalletAddress string `json:"walletAddress"` UserId string `json:"userId,omitempty"` Region string `json:"region"` NodeId string `json:"nodeId"` Domain string `json:"domain"` CollectionId string `json:"collectionId"` CreatedAt time.Time `json:"created_at"` Chain string `json:"chainName"` }
type FlowId ¶
type FlowId struct { FlowIdType FlowIdType `sql:"flow_id_type"` UserId string FlowId string `gorm:"primary_key"` RelatedRoleId string WalletAddress string }
TODO: Make relations for field `relatedRoleId`
type FlowIdType ¶
type FlowIdType string
const ( AUTH FlowIdType = "AUTH" ROLE FlowIdType = "ROLE" )
func (*FlowIdType) Scan ¶
func (fit *FlowIdType) Scan(value interface{}) error
type FormData ¶
type FormData struct { ID uint `gorm:"primaryKey"` Email string `json:"email" binding:"required"` TelegramID string `json:"telegram_id"` Name string `json:"name" binding:"required"` RanNodeBefore bool `json:"ran_node_before"` ProjectName string `json:"project_name"` ProjectID string `json:"project_id"` WalletAddress string `json:"wallet_address"` TwitterID string `json:"twitter_id"` Region string `json:"region"` Chain string `json:"chain"` }
type IPInfo ¶
type IPInfo struct { IPv4Addresses []string // IPv4 Addresses IPv6Addresses []string // IPv6 Addresses }
IPInfo struct to store IP information
type IpGeoAddress ¶
type Node ¶
type Node struct { //using for db operation PeerId string `json:"peerId" gorm:"primaryKey"` Name string `json:"name"` HttpPort string `json:"httpPort"` Host string `json:"host"` //domain PeerAddress string `json:"peerAddress"` Region string `json:"region"` Status string `json:"status"` // offline 1, online 2, maintainance 3,block 4 DownloadSpeed float64 `json:"downloadSpeed"` UploadSpeed float64 `json:"uploadSpeed"` RegistrationTime int64 `json:"registrationTime"` //StartTimeStamp LastPing int64 `json:"lastPing"` Chain string `json:"chainName"` WalletAddress string `json:"walletAddress"` Version string `json:"version"` CodeHash string `json:"codeHash"` SystemInfo string `json:"systemInfo" gorm:"type:jsonb"` IpInfo string `json:"ipinfo" gorm:"type:jsonb"` IpGeoData string `json:"ipGeoData" gorm:"type:jsonb"` }
type NodeAppends ¶
type NodeAppends struct { PeerId string `json:"peerId" gorm:"primaryKey"` Name string `json:"name"` HttpPort string `json:"httpPort"` Host string `json:"host"` //domain PeerAddress string `json:"peerAddress"` Region string `json:"region"` Status string `json:"status"` // offline 1, online 2, maintainance 3,block 4 DownloadSpeed float64 `json:"downloadSpeed"` UploadSpeed float64 `json:"uploadSpeed"` RegistrationTime int64 `json:"registrationTime"` //StartTimeStamp LastPing int64 `json:"lastPing"` Chain string `json:"chain"` WalletAddress string `json:"walletAddress"` Version string `json:"version"` CodeHash string `json:"codeHash"` SystemInfo OSInfo `json:"systemInfo"` IpInfo IPInfo `json:"ipinfo"` }
type NodeDwifi ¶
type NodeDwifi struct { ID uint `json:"id" gorm:"primaryKey"` Gateway string `json:"gateway"` Status string `json:"-"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Password string `json:"password"` Location string `json:"location"` Price_per_min string `json:"price_per_min"` Wallet_address string `json:"wallet_address"` Chain_name string `json:"chain_name"` }
type NodeDwifiResponse ¶
type NodeDwifiResponse struct { ID uint `json:"id"` Gateway string `json:"gateway"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Status []DeviceInfo `json:"status"` Password string `json:"password"` Location string `json:"location"` Price_per_min string `json:"price_per_min"` Wallet_address string `json:"wallet_address"` Chain_name string `json:"chain_name"` }
type NodeResponse ¶
type NodeResponse struct { Id string `json:"id" gorm:"primaryKey"` Name string `json:"name"` HttpPort string `json:"httpPort"` Domain string `json:"domain"` NodeName string `json:"nodename"` Chain string `json:"chainName"` Address string `json:"address"` Region string `json:"region"` Status string `json:"status"` DownloadSpeed float64 `json:"downloadSpeed"` UploadSpeed float64 `json:"uploadSpeed"` StartTimeStamp int64 `json:"startTimeStamp"` LastPingedTimeStamp int64 `json:"lastPingedTimeStamp"` WalletAddressSui string `json:"walletAddress"` WalletAddressSolana string `json:"walletAddressSol"` IpInfoIP string `json:"ipinfoip"` IpInfoCity string `json:"ipinfocity"` IpInfoCountry string `json:"ipinfocountry"` IpInfoLocation string `json:"ipinfolocation"` IpInfoOrg string `json:"ipinfoorg"` IpInfoPostal string `json:"ipinfopostal"` IpInfoTimezone string `json:"ipinfotimezone"` }
type Subscription ¶
type User ¶
type User struct { UserId string `gorm:"primary_key" json:"userId,omitempty"` Name string `json:"name,omitempty"` WalletAddress *string `json:"walletAddress,omitempty"` Discord string `json:"discord"` Twitter string `json:"twitter"` FlowIds []FlowId `gorm:"foreignkey:UserId" json:"-"` ProfilePictureUrl string `json:"profilePictureUrl,omitempty"` Country string `json:"country,omitempty"` Feedbacks []UserFeedback `gorm:"foreignkey:UserId" json:"userFeedbacks"` EmailId *string `json:"emailId,omitempty"` }
type UserFeedback ¶
type UserStripePi ¶
type WifiNode ¶
type WifiNode struct { gorm.Model NodeName string `json:"node_name"` Location string `json:"location"` WifiPassword string `json:"wifi_password"` WalletAddress string `json:"wallet_address"` NodeType string `json:"node_type"` //The type of WiFi node (e.g., public, private, business). Ssid string `json:"ssid"` }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.