Documentation
¶
Index ¶
- Constants
- Variables
- func Abs(i int) int
- func Atoi(s string) (i int)
- func ConfigFrom(path string)
- func CopyFile(dst, src string) (int64, error)
- func CreateSoap(body interface{}) string
- func Debug(s string, args ...interface{})
- func DumpConfig(config EyegoConfig)
- func EachLine(r io.Reader, f func(string) interface{}) (rv []interface{}, err error)
- func GenerateSNonce() string
- func Handler(w http.ResponseWriter, r *http.Request)
- func Info(s string, args ...interface{})
- func Init(w io.Writer, _level LogLevel)
- func LogError(s string, args ...interface{})
- func ParseSoap(s string, target interface{})
- func SetConfig(_config EyegoConfig)
- func Trace(s string, args ...interface{})
- func Warn(s string, args ...interface{})
- func WriteGeotag(mediaFile string, location LocationResult) string
- func WriteSoap(body interface{}, writer io.Writer)
- type AccessPointSighting
- type AccessPointSightingInfo
- type BlockNotifyingReader
- type Card
- type ChecksumReader
- type EyegoConfig
- type GetPhotoStatus
- type GetPhotoStatusResponse
- type Header
- type Location
- type LocationResult
- type LogLevel
- type MarkLastPhotoInRoll
- type MarkLastPhotoInRollResponse
- type NewPhoto
- type ParsedLog
- type PowerOn
- type PoweredCycle
- type Reader
- type SoapStartSession
- type SoapStartSessionResponse
- type UnknownLine
- type UploadPhoto
- type UploadPhotoResponse
- type WifiAccessPoints
Constants ¶
View Source
const ( // Types TypeReg = '0' // regular file TypeRegA = '\x00' // regular file TypeLink = '1' // hard link TypeSymlink = '2' // symbolic link TypeChar = '3' // character device node TypeBlock = '4' // block device node TypeDir = '5' // directory TypeFifo = '6' // fifo node TypeCont = '7' // reserved TypeXHeader = 'x' // extended header TypeXGlobalHeader = 'g' // global extended header )
Variables ¶
View Source
var ( TRACE = LogLevel{/* contains filtered or unexported fields */} DEBUG = LogLevel{/* contains filtered or unexported fields */} INFO = LogLevel{/* contains filtered or unexported fields */} WARN = LogLevel{/* contains filtered or unexported fields */} ERROR = LogLevel{/* contains filtered or unexported fields */} )
View Source
var (
ErrHeader = errors.New("archive/tar: invalid tar header")
)
View Source
var (
LOC_BASE_URL = "https://www.googleapis.com/geolocation/v1/geolocate"
)
Functions ¶
func ConfigFrom ¶
func ConfigFrom(path string)
func CreateSoap ¶
func CreateSoap(body interface{}) string
func DumpConfig ¶
func DumpConfig(config EyegoConfig)
func GenerateSNonce ¶
func GenerateSNonce() string
func SetConfig ¶
func SetConfig(_config EyegoConfig)
func WriteGeotag ¶
func WriteGeotag(mediaFile string, location LocationResult) string
Types ¶
type AccessPointSighting ¶
type AccessPointSightingInfo ¶
type BlockNotifyingReader ¶
type BlockNotifyingReader struct {
// contains filtered or unexported fields
}
func NewBlockNotifyingReader ¶
func NewBlockNotifyingReader(_delegate io.Reader, _blockSize int, _notifier func([]byte)) BlockNotifyingReader
type Card ¶
func (Card) Credential ¶
type ChecksumReader ¶
type ChecksumReader struct {
// contains filtered or unexported fields
}
func NewChecksumReader ¶
func NewChecksumReader(r io.Reader) ChecksumReader
func (ChecksumReader) Checksum ¶
func (cr ChecksumReader) Checksum(uploadKey string) string
type EyegoConfig ¶
type EyegoConfig struct { TargetDir string `json:"target_dir"` GoogleAPIKey string `json:"google_api_key"` Cards []Card `json:"cards"` }
func Config ¶
func Config() EyegoConfig
type GetPhotoStatus ¶
type GetPhotoStatusResponse ¶
type Header ¶
type Header struct { Name string // name of header file entry Mode int64 // permission and mode bits Uid int // user id of owner Gid int // group id of owner Size int64 // length in bytes ModTime time.Time // modified time Typeflag byte // type of header entry Linkname string // target name of link Uname string // user name of owner Gname string // group name of owner Devmajor int64 // major number of character or block device Devminor int64 // minor number of character or block device AccessTime time.Time // access time ChangeTime time.Time // status change time }
A Header represents a single header in a tar archive. Some fields may not be populated.
type LocationResult ¶
type LocationResult struct { Location Location `json:"location"` Accuracy float64 `json:"accuracy"` }
func GPSCoordinates ¶
func GPSCoordinates(aps []AccessPointSightingInfo) (lr LocationResult, err error)
type LogLevel ¶
type LogLevel struct {
// contains filtered or unexported fields
}
func LogLevelFromName ¶
type MarkLastPhotoInRoll ¶
type ParsedLog ¶
type ParsedLog struct {
Cycles []PoweredCycle
}
func (ParsedLog) AccessPoints ¶
func (p ParsedLog) AccessPoints(photoName string) []AccessPointSightingInfo
type PoweredCycle ¶
type PoweredCycle struct { Photos map[string][]NewPhoto AccessPoints map[string][]AccessPointSighting }
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
A Reader provides sequential access to the contents of a tar archive. A tar archive consists of a sequence of files. The Next method advances to the next file in the archive (including the first), and then it can be treated as an io.Reader to access the file's data.
Example:
tr := tar.NewReader(r) for { hdr, err := tr.Next() if err == io.EOF { // end of tar archive break } if err != nil { // handle error } io.Copy(data, tr) }
func NewTarReader ¶
NewReader creates a new Reader reading from r.
type SoapStartSession ¶
type UnknownLine ¶
type UnknownLine struct {
Content string
}
type UploadPhoto ¶
type UploadPhotoResponse ¶
type WifiAccessPoints ¶
type WifiAccessPoints struct { AccessPoints []AccessPointSightingInfo `json:"wifiAccessPoints"` ConsiderIp bool `json:"considerIp"` }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.