structs

package
v2.12.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2024 License: MIT Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelContactData

type ChannelContactData struct {
	PubkeyHash  string `json:"hashedPk"`
	LastSeen    string `json:"lastSeen"`
	IsLocal     bool   `json:"local"`
	IsModerator bool   `json:"moderator"`
	Nick        string `json:"nick"`
	Pubkey      string `json:"pk"`
}

ChannelContactData - channel contact data

type ChannelData

type ChannelData struct {
	HideInCommonList bool   `json:"HideInCommonList"` // example: false
	CreatedOn        string `json:"created"`          // 2022-09-09T05:47:52.972Z
	ModifiedOn       string `json:"modified"`         // 2022-09-09T05:47:52.973Z
	Description      string `json:"description"`
	GeoTag           string `json:"geotag"`
	HashTags         string `json:"hashtags"`
	Languages        string `json:"languages"`
	Owner            string `json:"owner"`
	ReadOnly         bool   `json:"readonly"`
	ReadOnlyPrivacy  bool   `json:"readonly_privacy"`
	Title            string `json:"title"`
	Type             string `json:"type"` // public
}

type ChannelMessage

type ChannelMessage struct {
	ID          int64  `json:"id"`
	DateTime    string `json:"dateTime"`
	PubkeyHash  string `json:"hashedPk"`
	IsIncoming  bool   `json:"isIncoming"`
	MessageType int    `json:"messageType"`
	Nick        string `json:"nick"`    // message author nick
	Pubkey      string `json:"pk"`      // can be empty
	Text        string `json:"text"`    // message text
	TopicID     string `json:"topicId"` // for reply
}

ChannelMessage - channel message data

type ContactData

type ContactData struct {
	AuthStatus int    `json:"authorizationStatus"`
	AvatarHash string `json:"avatarMd5"`
	Group      string `json:"group"`
	PubkeyHash string `json:"hashedPk"`
	IsFriend   bool   `json:"isFriend"`
	Nick       string `json:"nick"`
	Pubkey     string `json:"pk"`
	Status     int    `json:"status"`
}

ContactData - user contact data

func (*ContactData) IsAway

func (d *ContactData) IsAway() bool

IsAway - is contact away?

func (*ContactData) IsDoNotDisturb

func (d *ContactData) IsDoNotDisturb() bool

IsDoNotDisturb - is contact marked to do not disturb mode?

func (*ContactData) IsInvisible

func (d *ContactData) IsInvisible() bool

IsInvisible - is contact invisible?

func (*ContactData) IsOffline

func (d *ContactData) IsOffline() bool

IsOffline - is contact offline?

func (*ContactData) IsOnline

func (d *ContactData) IsOnline() bool

IsOnline - is contact online?

type CryptonFinanceInfo

type CryptonFinanceInfo struct {
	CardCreatePriceDefault        float64 `json:"cardCreatePrice"`
	CardCreatePrice1Symbol        float64 `json:"cardCreatePrice10"`
	CardCreatePrice2Symbols       float64 `json:"cardCreatePrice100"`
	CardCreatePrice3Symbols       float64 `json:"cardCreatePrice1000"`
	CardCreatePrice4Symbols       float64 `json:"cardCreatePrice10000"`
	CardsCreationEnabled          bool    `json:"cardsCreationEnabled"`
	CardsMaxActive                uint    `json:"cardsMaxActive"`
	CardsMaxPerDay                uint    `json:"cardsMaxPerDay"`
	InvestorMinAmount             int64   `json:"investorMinAmount"`
	InvoicesDefaultTtl            uint    `json:"invoicesDefaultTtl"`
	InvoicesEnabled               bool    `json:"invoicesEnabled"`
	InvoicesMaxTotal              uint    `json:"invoicesMaxTotal"`
	InvoicesMaxTotalFromMerchant  uint    `json:"invoicesMaxTotalFromMerchant"`
	InvoicesMinAmount             float64 `json:"invoicesMinAmount"`
	TransferCardFee               float64 `json:"transferCardFee"`
	TransferCheckFee              bool    `json:"transferCheckFee"`
	TransferExternalFee           float64 `json:"transferExternalFee"`
	TransferInternalFee           float64 `json:"transferInternalFee"`
	TransfersEnabled              bool    `json:"transfersEnabled"`
	UnsDefaultTtl                 uint    `json:"unsDefaultTtl"`
	UnsDeleteNameFee              float64 `json:"unsDeleteNameFee"`
	UnsModifyNameFee              float64 `json:"unsModifyNameFee"`
	UnsName1SymbolRegistrationFee float64 `json:"unsName1RegistrationFee"`
	UnsName2SymbolRegistrationFee float64 `json:"unsName2RegistrationFee"`
	UnsName3SymbolRegistrationFee float64 `json:"unsName3RegistrationFee"`
	UnsName4SymbolRegistrationFee float64 `json:"unsName4RegistrationFee"`
	UnsProxyEnabled               bool    `json:"unsProxyEnabled"`
	UnsTransferFee                float64 `json:"unsTransferFee"`
	VouchersCreateEnabled         bool    `json:"vouchersCreateEnabled"`
	VouchersMaxActive             uint    `json:"vouchersMaxActive"`
	VouchersMaxPerBatch           uint    `json:"vouchersMaxPerBatch"`
	VouchersMinAmount             float64 `json:"vouchersMinAmount"`
	VouchersMinPerBatch           uint    `json:"vouchersMinPerBatch"`
	VouchersUseEnabled            bool    `json:"vouchersUseEnabled"`
}

type FinanceHistoryData

type FinanceHistoryData struct{}

type FinanceInfo

type FinanceInfo struct {
	CRP  CryptonFinanceInfo `json:"CRP"`
	UUSD UUSDFinanceInfo    `json:"USD"`

	ProofOfStake      bool `json:"PoS"`
	EnableToUseMining bool `json:"enableToUseMining"`
	MinintPeriod      int  `json:"miningPeriod"`
	SettingsVersion   int  `json:"settingsVersion"`
}

type GetChannelsTask

type GetChannelsTask struct {
	// optional
	SearchFilter string             // part of channel name or channel ID, etc
	ChannelType  consts.ChannelType // by default: 0 - registered
	FromDate     time.Time
	ToDate       time.Time
	SortBy       consts.SortChannelsBy
}

type GetFinanceHistoryTask

type GetFinanceHistoryTask struct {
	// optional
	Currency          string    `json:"currency"`
	Filters           string    `json:"filters"`
	ReferenceNumber   string    `json:"referenceNumber"`
	FromDate          time.Time `json:"fromDate"`
	ToDate            time.Time `json:"toDate"`
	BatchID           int       `json:"batchId"`
	FromAmount        float64   `json:"fromAmount"`
	ToAmount          float64   `json:"toAmount"`
	SourcePubkey      string    `json:"sourcePk"`
	DestinationPubkey string    `json:"destinationPk"`
	QueryOffset       uint      `json:"offset"`
	QueryLimitRows    uint      `json:"limitRows"`
}

type InstantMessage

type InstantMessage struct {
	ID               int         `json:"id"`
	DateTime         string      `json:"dateTime"`
	File             interface{} `json:"file"`
	MessageType      int         `json:"messageType"`
	Nick             string      `json:"nick"`             // message author nick
	Pubkey           string      `json:"pk"`               // can be empty
	ReadDateTime     *string     `json:"readDateTime"`     // can be nil when message is unread
	ReceivedDateTime string      `json:"receivedDateTime"` // when message delivered
	Text             string      `json:"text"`             // message text
}

InstantMessage - contact message

type ModeratorRights added in v2.5.0

type ModeratorRights struct {
	CanBan            bool `json:"ban"`
	CanDeleteMessages bool `json:"delete"`
	CanPinMessages    bool `json:"promote"`
}

type OwnContactData

type OwnContactData struct {
	AvatarHash string `json:"avatarMd5"`
	FirstName  string `json:"firstName"`
	LastName   string `json:"lastName"`
	PubkeyHash string `json:"hashedPk"`
	IsFriend   bool   `json:"isFriend"`
	Mood       string `json:"moodMessage"`
	Nick       string `json:"nick"`
	Pubkey     string `json:"pk"`
	Status     int    `json:"status"`
}

OwnContactData - own account data

type PeerInfo added in v2.0.2

type PeerInfo struct {
	Direction int    `json:"direction"`
	Address   string `json:"remoteAddress"`
}

type PeersInfoContainer added in v2.0.4

type PeersInfoContainer struct {
	Connections []PeerInfo `json:"connections"`
}

type ProfileStatus

type ProfileStatus struct {
	Mood       string `json:"mood"`
	Status     string `json:"status"`
	StatusCode int    `json:"status_code"`
}

func (ProfileStatus) IsAway

func (d ProfileStatus) IsAway() bool

IsAway - is contact away?

func (ProfileStatus) IsDoNotDisturb

func (d ProfileStatus) IsDoNotDisturb() bool

IsDoNotDisturb - is contact marked to do not disturb mode?

func (ProfileStatus) IsInvisible

func (d ProfileStatus) IsInvisible() bool

IsInvisible - is contact invisible?

func (ProfileStatus) IsOffline

func (d ProfileStatus) IsOffline() bool

IsOffline - is contact offline?

func (ProfileStatus) IsOnline

func (d ProfileStatus) IsOnline() bool

IsOnline - is contact online?

type SearchChannelData

type SearchChannelData struct {
	AvatarID    string `json:"avatarId"`    // example: defAvatar_F10383EA72AC6263C21F356CD8D2E2A2
	ChannelID   string `json:"channelid"`   // F10383EA72AC6263C21F356CD8D2E2A2
	CreatedOn   string `json:"created"`     // 2022-01-28T16:11:39.144Z
	Description string `json:"description"` // can be empty
	IsJoined    bool   `json:"isjoined"`    // false
	IsPrivate   bool   `json:"isprivate"`   // true
	EditedOn    string `json:"modified"`    // 2022-01-28T16:11:39.145Z
	Name        string `json:"name"`        // Monica
	OwnerPubkey string `json:"owner"`       // 1B742E8D8DAE682ADD2568BE25B23F35BA7A8BFC1D5D3BCA0EE219A754A48201
}

type SendPaymentTask

type SendPaymentTask struct {
	// required
	To     string  `json:"to"`     // pubkey, nickname or card ID
	Amount float64 `json:"amount"` // more than zero, no more than 9 decimal places

	// optional
	CurrencyTag string `json:"currency"`   // example: "CRP", "UUSD". by default: "CRP"
	FromCardID  string `json:"fromCardID"` // specify here your card ID
	Comment     string `json:"comment"`
}

type SetWsStateTask

type SetWsStateTask struct {
	Enabled       bool   `json:"enabled"`
	Port          int    `json:"port"`
	EnableSSL     bool   `json:"enablessl"`
	Notifications string `json:"notifications"` // example: "contact, wallet" example2: "all"
}

type SystemInfo

type SystemInfo struct {
	BuildABI               string `json:"buildAbi"`
	BuildCPUArchitecture   string `json:"buildCpuArchitecture"`
	BuildNumber            string `json:"build_number"`
	CurrentCPUArchitecture string `json:"currentCpuArchitecture"`
	NetCoreRate            int    `json:"netCoreRate"`
	NetworkCores           int    `json:"networkCores"`
	NetworkEnabled         bool   `json:"networkEnabled"`
	NumberOfConnections    int    `json:"numberOfConnections"`
	PacketCacheSize        int    `json:"packetCacheSize"`
	Uptime                 string `json:"uptime"`
}

type UNSSyncInfo added in v2.10.0

type UNSSyncInfo struct {
	LastRegisteredName  string `json:"last_record_names_registered"`
	PeersConnectedCount int    `json:"peers_connected"`
	CurrentState        string `json:"state"`
	LocalBlocksCount    int    `json:"local_blocks"`
	TotalBlocksCount    int    `json:"total_blocks"`
}

type UUSDFinanceInfo

type UUSDFinanceInfo struct {
	TransferExternalFee   float64 `json:"transferExternalFee"`
	TransferInternalFee   float64 `json:"transferInternalFee"`
	TransfersEnabled      bool    `json:"transfersEnabled"`
	VouchersCreateEnabled bool    `json:"vouchersCreateEnabled"`
	VouchersMaxActive     uint    `json:"vouchersMaxActive"`
	VouchersMaxPerBatch   uint    `json:"vouchersMaxPerBatch"`
	VouchersMinAmount     float64 `json:"vouchersMinAmount"`
	VouchersMinPerBatch   uint    `json:"vouchersMinPerBatch"`
	VouchersUseEnabled    bool    `json:"vouchersUseEnabled"`
}

type WsChannelMessage

type WsChannelMessage struct {
	ID          int64  `json:"id"`
	ChannelName string `json:"channel"`
	ChannelID   string `json:"channelid"`
	DateTime    string `json:"dateTime"`
	PubkeyHash  string `json:"hashedPk"`
	IsIncoming  bool   `json:"isIncoming"`
	MessageType int    `json:"messageType"`
	Nick        string `json:"nick"`    // message author nick
	Pubkey      string `json:"pk"`      // can be empty
	Text        string `json:"text"`    // message text
	TopicID     string `json:"topicId"` // for reply
}

WsChannelMessage - channel message data

Jump to

Keyboard shortcuts

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