Documentation
¶
Index ¶
- Constants
- Variables
- func CheckToIgnore(filePath string) bool
- func GetValueFromContentsBlock(tlsConn *tls.Conn) (contents_type string, contents string, n int, err error)
- func InitSessionServer(tlsConn *tls.Conn, UserCollection *mgo.Collection, username string) ([]byte, error)
- func ReadData(tlsConn *tls.Conn) (metadata GBServerDatabase.FileMetadata, contents string, operation_int int, ...)
- func SendData(conn *tls.Conn, file GBServerWatch.OutputData, operation_const int) error
- func WriteContentsToConn(conn *tls.Conn, content_type string, contents string) (int, error)
Constants ¶
View Source
const ( FILE_ADDED_CONST = iota FILE_MODIFIED_CONST FILE_DELETED_CONST ERR_CONST EOF_CONST PING_CONST DISCONNECT_CONST PING = "." // Sent when pinging the server. )
Variables ¶
View Source
var ( // Files_to_ignore_mac lists that files with the following substrings should be ignored. Files_to_ignore_mac []string = []string{".DS_Store", ".sb-", ".function.m.swp", ".localized"} )
Functions ¶
func CheckToIgnore ¶
CheckToIgnore checks if the given file should be sent to the Gopherbox filesystem. Currently only works with Mac files that should be ignored.
func GetValueFromContentsBlock ¶
func GetValueFromContentsBlock(tlsConn *tls.Conn) (contents_type string, contents string, n int, err error)
GetValueFromContentsBlock returns the contents type in the header, as well as the contents contained within.
func InitSessionServer ¶
func ReadData ¶
func ReadData(tlsConn *tls.Conn) (metadata GBServerDatabase.FileMetadata, contents string, operation_int int, err error)
ReadData reads from the conn and returns the metadata, contents, and intended operation of the data, according to the Gopherbox file transfer scheme.
func SendData ¶
func SendData(conn *tls.Conn, file GBServerWatch.OutputData, operation_const int) error
SendData sends the conn the metadata and contents of the file, according to the Gopherbox file transfer scheme.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.