responses_client

package
v0.0.0-...-3cefd1f Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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 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 FileResponse struct {
	Filename string `json:"filename"`
	MetaHash string `json:"meta-hash"`
	Size     uint64 `json:"size"`
}

type GetIdResponse

type GetIdResponse struct {
	Id string `json:"id"`
}

type PeerResponse

type PeerResponse struct {
	Address string `json:"address"`
}

Jump to

Keyboard shortcuts

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