controller

package
v0.0.0-...-056259c Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

MIT License -----------

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpServeSPA

func HttpServeSPA(listen string, path string)

Types

type Auth

type Auth struct {
	Token    string
	Username string
	Expires  time.Time
}

type HttpdHandler

type HttpdHandler struct {
	// contains filtered or unexported fields
}

func Httpd

func Httpd(root http.Dir) *HttpdHandler

func (*HttpdHandler) ServeHTTP

func (dh *HttpdHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Server

type Server struct {
	Handle          *grpc.Server
	HandleTrackerd  *grpc.Server
	ListenPort      int
	EnableTls       bool
	TlsKey          string
	TlsCert         string
	ConfigFile      string
	DbConnectString string
	DbDriver        string
	StaticDataPath  string
	PipeFilePath    string
	StaticDataPort  int
	AuthTokens      []Auth
	SensorReport    pbtd.SensorReport
	// contains filtered or unexported fields
}

func (*Server) AddEvent

func (s *Server) AddEvent(ctx context.Context, in *pbtd.Event) (*pbtd.EventResponse, error)

func (*Server) AddSensor

func (*Server) AddVideoEvent

func (s *Server) AddVideoEvent(ctx context.Context, in *pbtd.VideoEvent) (*pbtd.VideoEventResponse, error)

func (*Server) Close

func (s *Server) Close()

func (*Server) ConnectDb

func (s *Server) ConnectDb() error

func (*Server) GetConfig

func (s *Server) GetConfig(ctx context.Context, in *pb.GetConfigReq) (*pb.GetConfigResp, error)

func (*Server) GetContainerList

func (s *Server) GetContainerList(ctx context.Context, in *pb.GetContainerListReq) (*pb.GetContainerListResp, error)

func (*Server) GetContainerLog

func (s *Server) GetContainerLog(ctx context.Context, in *pb.GetContainerLogReq) (*pb.GetContainerLogResp, error)

func (*Server) GetEvents

func (s *Server) GetEvents(ctx context.Context, in *pb.GetEventsReq) (*pb.GetEventsResp, error)

func (*Server) GetIsConfigured

func (s *Server) GetIsConfigured(ctx context.Context, in *pb.GetIsConfiguredReq) (*pb.GetIsConfiguredResp, error)

func (*Server) GetSensorReport

func (s *Server) GetSensorReport(ctx context.Context, in *pb.SensorReportReq) (*pb.SensorReport, error)

func (*Server) GetSensorReports

func (s *Server) GetSensorReports(ctx context.Context, in *pb.GetSensorReportsReq) (*pb.GetSensorReportsResp, error)

func (*Server) GetVideoEvents

func (s *Server) GetVideoEvents(ctx context.Context, in *pb.GetVideoEventsReq) (*pb.GetVideoEventsResp, error)

func (*Server) IssueCommand

func (s *Server) IssueCommand(ctx context.Context, in *pb.IssueCommandReq) (*pb.IssueCommandResp, error)

func (*Server) Login

func (s *Server) Login(ctx context.Context, in *pb.LoginReq) (*pb.LoginResp, error)

func (*Server) OpenConfig

func (s *Server) OpenConfig() (err error)

func (*Server) Register

func (s *Server) Register(ctx context.Context, in *pbtd.TrackerInfo) (*pbtd.RegisterResponse, error)

func (*Server) SetConfig

func (s *Server) SetConfig(ctx context.Context, in *pb.SetConfigReq) (*pb.SetConfigResp, error)

func (*Server) Start

func (s *Server) Start()

func (*Server) StartFileServer

func (s *Server) StartFileServer() error

Jump to

Keyboard shortcuts

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