Documentation ¶
Index ¶
- Constants
- func AsyncCall(typ CmdType, id, clientHandle uint32, payload []byte)
- func CmdResultLoop(cb CmdResultLoopCB)
- func GetURL(url string) (string, error)
- func Hello()
- func NextTime() string
- func ReadLoop(cb ReadLoopCB)
- func ReadStr() string
- func SetTag(newt string)
- func WriteStr(s string)
- type CmdResult
- type CmdResultLoopCB
- type CmdType
- type CommentPostArgs
- type ConfirmFileDownload
- type ConfirmFileDownloadReply
- type FileDownloadProgress
- type GCAddressBookEntry
- type GCInvitation
- type GCMessage
- type GCMessageToSend
- type GCRemoveUserArgs
- type GetRemoteFileArgs
- type IDInit
- type InitClient
- type InviteToGC
- type LNBalances
- type LNChannelPoint
- type LNCloseChannelRequest
- type LNInitDcrlnd
- type LNNewWalletSeed
- type LNPayInvoiceRequest
- type LNReqChannelArgs
- type LNReqChannelEstValue
- type LNTryExternalDcrlnd
- type LocalInfo
- type LocalRenameArgs
- type MediateIDArgs
- type PM
- type PayTipArgs
- type PostActionArgs
- type PostReceived
- type PostStatusReceived
- type PostSubscriptionResult
- type ReadLoopCB
- type ReadPostArgs
- type RemoteUser
- type SendFileArgs
- type ServerCert
- type ServerSessState
- type ShareFileArgs
- type UnshareFileArgs
- type UserContentList
- type UserPostList
Constants ¶
View Source
const ( CTUnknown CmdType = 0x00 CTHello = 0x01 CTInitClient = 0x02 CTInvite = 0x03 CTDecodeInvite = 0x04 CTAcceptInvite = 0x05 CTPM = 0x06 CTAddressBook = 0x07 CTLocalID = 0x08 CTAcceptServerCert = 0x09 CTRejectServerCert = 0x0a CTNewGroupChat = 0x0b CTInviteToGroupChat = 0x0c CTAcceptGCInvite = 0x0d CTGetGC = 0x0e CTGCMsg = 0x0f CTListGCs = 0x10 CTListUserContent = 0x14 CTGetUserContent = 0x15 CTPayTip = 0x16 CTSubscribeToPosts = 0x17 CTUnsubscribeToPosts = 0x18 CTGCRemoveUser = 0x19 CTKXReset = 0x20 CTListPosts = 0x21 CTReadPost = 0x22 CTReadPostUpdates = 0x23 CTGetUserNick = 0x24 CTCommentPost = 0x25 CTGetLocalInfo = 0x26 CTRequestMediateID = 0x27 CTKXSearchPostAuthor = 0x28 CTRelayPostToAll = 0x29 CTCreatePost = 0x30 CTGCGetBlockList = 0x31 CTGCAddToBlockList = 0x32 CTGCRemoveFromBlockList = 0x33 CTGCPart = 0x34 CTGCKill = 0x35 CTBlockUser = 0x36 CTIgnoreUser = 0x37 CTUnignoreUser = 0x38 CTIsIgnored = 0x39 CTListSubscribers = 0x3a CTListSubscriptions = 0x3b CTListDownloads = 0x3c CTLNGetInfo = 0x3d CTLNListChannels = 0x3e CTLNListPendingChannels = 0x3f CTLNGenInvoice = 0x40 CTLNPayInvoice = 0x41 CTLNGetServerNode = 0x42 CTLNQueryRoute = 0x43 CTLNGetBalances = 0x44 CTLNDecodeInvoice = 0x45 CTLNListPeers = 0x46 CTLNConnectToPeer = 0x47 CTLNDisconnectFromPeer = 0x48 CTLNOpenChannel = 0x49 CTLNCloseChannel = 0x4a CTLNTryConnect = 0x4b CTLNInitDcrlnd = 0x4c CTLNRunDcrlnd = 0x4d CTCaptureDcrlndLog = 0x4e CTLNGetDepositAddr = 0x4f CTLNRequestRecvCapacity = 0x50 CTLNConfirmPayReqRecvChan = 0x51 CTConfirmFileDownload = 0x52 CTFTSendFile = 0x53 CTEstimatePostSize = 0x54 CTLNStopDcrlnd = 0x55 CTStopClient = 0x56 CTListPayStats = 0x57 CTSummUserPayStats = 0x58 CTClearPayStats = 0x59 CTListUserPosts = 0x5a CTGetUserPost = 0x5b CTLocalRename = 0x5c CTGoOnline = 0x5d CTRemainOffline = 0x5e CTLNGetNodeInfo = 0x5f CTCreateLockFile = 0x60 CTCloseLockFile = 0x61 CTSkipWalletCheck = 0x62 CTLNRestoreMultiSCB = 0x63 CTLNSaveMultiSCB = 0x64 NTInviteReceived = 0x1001 NTInviteAccepted = 0x1002 NTInviteErrored = 0x1003 NTPM = 0x1004 NTLocalIDNeeded = 0x1005 NTConfServerCert = 0x1006 NTServerSessChanged = 0x1007 NTNOP = 0x1008 NTInvitedToGC = 0x1009 NTUserAcceptedGCInvite = 0x100a NTGCListUpdated = 0x100b NTGCMessage = 0x100c NTKXCompleted = 0x100d NTTipReceived = 0x100e NTPostReceived = 0x100f NTFileDownloadConfirm = 0x1010 NTFileDownloadCompleted = 0x1011 NTFileDownloadProgress = 0x1012 NTPostStatusReceived = 0x1013 NTLogLine = 0x1014 NTLNInitialChainSyncUpdt = 0x1015 NTLNConfPayReqRecvChan = 0x1016 NTConfFileDownload = 0x1017 NTLNDcrlndStopped = 0x1018 NTClientStopped = 0x1019 NTUserPostsList = 0x101a NTUserContentList = 0x101b NTRemoteSubChanged = 0x101c )
View Source
const ( ConnStateOffline = 0 ConnStateCheckingWallet = 1 ConnStateOnline = 2 )
Variables ¶
This section is empty.
Functions ¶
func CmdResultLoop ¶
func CmdResultLoop(cb CmdResultLoopCB)
func ReadLoop ¶
func ReadLoop(cb ReadLoopCB)
Types ¶
type CmdResult ¶
func NextCmdResult ¶
func NextCmdResult() *CmdResult
type CmdResultLoopCB ¶
type CmdResultLoopCB interface {
F(*CmdResult)
}
type CommentPostArgs ¶
type CommentPostArgs struct { From clientintf.UserID `json:"from"` PID clientintf.PostID `json:"pid"` Comment string `json:"comment"` Parent *clientintf.PostID `json:"parent,omitempty"` }
type ConfirmFileDownload ¶
type ConfirmFileDownload struct { UID clientintf.UserID `json:"uid"` FID zkidentity.ShortID `json:"fid"` Metadata rpc.FileMetadata `json:"metadata"` }
type ConfirmFileDownloadReply ¶
type ConfirmFileDownloadReply struct { FID zkidentity.ShortID `json:"fid"` Reply bool `json:"reply"` }
type FileDownloadProgress ¶
type FileDownloadProgress struct { UID clientintf.UserID `json:"uid"` FID clientdb.FileID `json:"fid"` Metadata rpc.FileMetadata `json:"metadata"` NbMissingChunks int `json:"nb_missing_chunks"` }
type GCAddressBookEntry ¶
type GCAddressBookEntry struct { ID zkidentity.ShortID `json:"id"` Name string `json:"name"` Members []clientintf.UserID `json:"members"` }
type GCInvitation ¶
type GCInvitation struct { Inviter RemoteUser `json:"inviter"` IID uint64 `json:"iid"` Name string `json:"name"` }
type GCMessageToSend ¶
type GCMessageToSend struct { GC zkidentity.ShortID `json:"gc"` Msg string `json:"msg"` }
type GCRemoveUserArgs ¶
type GCRemoveUserArgs struct { GC zkidentity.ShortID `json:"gc"` UID clientintf.UserID `json:"uid"` }
type GetRemoteFileArgs ¶
type GetRemoteFileArgs struct { UID clientintf.UserID `json:"uid"` FID zkidentity.ShortID `json:"fid"` }
type InitClient ¶
type InitClient struct { ServerAddr string `json:"server_addr"` DBRoot string `json:"dbroot"` DownloadsDir string `json:"downloads_dir"` LNRPCHost string `json:"ln_rpc_host"` LNTLSCertPath string `json:"ln_tls_cert_path"` LNMacaroonPath string `json:"ln_macaroon_path"` LogFile string `json:"log_file"` MsgsRoot string `json:"msgs_root"` DebugLevel string `json:"debug_level"` WantsLogNtfns bool `json:"wants_log_ntfns"` }
type InviteToGC ¶
type InviteToGC struct { GC zkidentity.ShortID `json:"gc"` UID clientdb.UserID `json:"uid"` }
type LNBalances ¶
type LNBalances struct { Channel *lnrpc.ChannelBalanceResponse `json:"channel"` Wallet *lnrpc.WalletBalanceResponse `json:"wallet"` }
type LNChannelPoint ¶
type LNCloseChannelRequest ¶
type LNCloseChannelRequest struct { ChannelPoint LNChannelPoint `json:"channel_point"` Force bool `json:"force"` }
type LNInitDcrlnd ¶
type LNNewWalletSeed ¶
type LNPayInvoiceRequest ¶
type LNReqChannelArgs ¶
type LNReqChannelEstValue ¶
type LNReqChannelEstValue struct { Amount uint64 `json:"amount"` ServerPolicy lpclient.ServerPolicy `json:"server_policy"` }
type LNTryExternalDcrlnd ¶
type LocalInfo ¶
type LocalInfo struct { ID clientintf.UserID `json:"id"` Nick string `json:"nick"` }
type LocalRenameArgs ¶
type LocalRenameArgs struct { ID zkidentity.ShortID `json:"id"` NewName string `json:"new_name"` IsGC bool `json:"is_gc"` }
type MediateIDArgs ¶
type MediateIDArgs struct { Mediator clientintf.UserID `json:"mediator"` Target clientintf.UserID `json:"target"` }
type PM ¶
type PM struct { UID clientintf.UserID `json:"sid"` // sid == source id Msg string `json:"msg"` Mine bool `json:"mine"` TimeStamp int64 `json:"timestamp"` }
type PayTipArgs ¶
type PayTipArgs struct { UID clientintf.UserID `json:"uid"` Amount float64 `json:"amount"` }
type PostActionArgs ¶
type PostActionArgs struct { From clientintf.UserID `json:"from"` PID clientintf.PostID `json:"pid"` }
type PostReceived ¶
type PostReceived struct { UID clientintf.UserID `json:"uid"` PostMeta rpc.PostMetadata `json:"post_meta"` }
type PostStatusReceived ¶
type PostStatusReceived struct { PostFrom clientintf.UserID `json:"post_from"` PID clientintf.PostID `json:"pid"` StatusFrom clientintf.UserID `json:"status_from"` Status rpc.PostMetadataStatus `json:"status"` Mine bool `json:"mine"` }
type PostSubscriptionResult ¶ added in v0.1.3
type PostSubscriptionResult struct { ID zkidentity.ShortID `json:"id"` WasSubRequest bool `json:"was_sub_request"` Error string `json:"error"` }
type ReadLoopCB ¶
type ReadLoopCB interface {
F(string)
}
type ReadPostArgs ¶
type ReadPostArgs struct { From clientintf.UserID `json:"from"` PID clientintf.PostID `json:"pid"` }
type RemoteUser ¶
type SendFileArgs ¶
type SendFileArgs struct { UID clientintf.UserID `json:"uid"` Filepath string `json:"filepath"` }
type ServerCert ¶
type ServerSessState ¶
type ShareFileArgs ¶
type ShareFileArgs struct {}
type UnshareFileArgs ¶
type UnshareFileArgs struct {}
type UserContentList ¶
type UserContentList struct { UID clientintf.UserID `json:"uid"` Files []clientdb.RemoteFile `json:"files"` }
type UserPostList ¶
type UserPostList struct { UID clientintf.UserID `json:"uid"` Posts []rpc.PostListItem `json:"posts"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.