Documentation ¶
Index ¶
- type ClientResponse
- func NewContactResponse(origin string, policy *bluemonday.Policy) *ClientResponse
- func NewDownloadedFileResponse(file *files.FileType, policy *bluemonday.Policy) *ClientResponse
- func NewGetIdResponse(id string, policy *bluemonday.Policy) *ClientResponse
- func NewIndexedFileResponse(file *files.FileType, policy *bluemonday.Policy) *ClientResponse
- func NewPeerResponse(peer *peers.Peer, policy *bluemonday.Policy) *ClientResponse
- func NewPrivateResponse(msg *packets_gossiper.PrivateMessage, policy *bluemonday.Policy) *ClientResponse
- func NewRumorResponse(msg *packets_gossiper.RumorMessage, policy *bluemonday.Policy) *ClientResponse
- func NewSearchedFileResponse(metadata *files.SearchMetadata, policy *bluemonday.Policy) *ClientResponse
- type ContactResponse
- type FileResponse
- type GetIdResponse
- type PeerResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientResponse ¶
type ClientResponse struct { GetId *GetIdResponse `json:"get-id"` Peer *PeerResponse `json:"peer"` Rumor *packets_gossiper.RumorMessage `json:"rumor"` Private *packets_gossiper.PrivateMessage `json:"private"` Contact *ContactResponse `json:"contact"` IndexedFile *FileResponse `json:"indexed-file"` DownloadedFile *FileResponse `json:"downloaded-file"` SearchedFile *FileResponse `json:"searched-file"` }
func NewContactResponse ¶
func NewContactResponse(origin string, policy *bluemonday.Policy) *ClientResponse
func NewDownloadedFileResponse ¶
func NewDownloadedFileResponse(file *files.FileType, policy *bluemonday.Policy) *ClientResponse
func NewGetIdResponse ¶
func NewGetIdResponse(id string, policy *bluemonday.Policy) *ClientResponse
func NewIndexedFileResponse ¶
func NewIndexedFileResponse(file *files.FileType, policy *bluemonday.Policy) *ClientResponse
func NewPeerResponse ¶
func NewPeerResponse(peer *peers.Peer, policy *bluemonday.Policy) *ClientResponse
func NewPrivateResponse ¶
func NewPrivateResponse(msg *packets_gossiper.PrivateMessage, policy *bluemonday.Policy) *ClientResponse
func NewRumorResponse ¶
func NewRumorResponse(msg *packets_gossiper.RumorMessage, policy *bluemonday.Policy) *ClientResponse
func NewSearchedFileResponse ¶
func NewSearchedFileResponse(metadata *files.SearchMetadata, policy *bluemonday.Policy) *ClientResponse
type ContactResponse ¶
type ContactResponse struct {
Origin string `json:"origin"`
}
type FileResponse ¶
type GetIdResponse ¶
type GetIdResponse struct {
Id string `json:"id"`
}
type PeerResponse ¶
type PeerResponse struct {
Address string `json:"address"`
}
Click to show internal directories.
Click to hide internal directories.