shared

package
v0.0.0-...-ea89e96 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GRPCPortWs        = ":40001"
	GRPCPortMedia     = ":40011"
	GRPCPortFile      = ":40021"
	GRPCPortDevice    = ":40031"
	GRPCAddressMedia  = "localhost" + GRPCPortMedia
	GRPCAddressWs     = "localhost" + GRPCPortWs
	GRPCAddressFile   = "localhost" + GRPCPortFile
	GRPCAddressDevice = "localhost" + GRPCPortDevice
	EchoPort          = 4000
)
View Source
const (
	VlcPlay         = "vlcPlay"
	VlcStop         = "vlcStop"
	VlcPause        = "vlcPause"
	VlcPauseOn      = "vlcPauseOn"
	VlcPauseOff     = "vlcPauseOff"
	VlcPlayNext     = "vlcPlayNext"
	VlcPlayPrevious = "vlcPlayPrevious"
)
View Source
const (
	DataRoomCommon = "common"
	DataRoomLiving = "living"
	DataRoomBed    = "bed"

	DataObjectVlc    = "vlc"
	DataObjectClient = "client"
	DataObjectFile   = "file"
	DataObjectDevice = "device"

	DataObjectLight     = "light"
	DataObjectProjector = "projector"
	DataObjectAircon    = "aircon"
	DataObjectMonitor   = "monitor"
	DataObjectTV        = "tv"

	DataKeyStatus        = "status"
	DataKeyPlayList      = "playList"
	DataKeyEnter         = "enter"
	DataKeyMember        = "member"
	DataKeyLeave         = "leave"
	DataKeyProgress      = "progress"
	DataKeyIsDownloading = "isDownloading"
	DataKeyFiles         = "files"
	DataKeyDevices       = "devices"

	DataKeyWarmTemperature = "warmTemperature"
	DataKeyCoolTemperature = "coolTemperature"
)
View Source
const (
	Download = "download"
	Valid    = "valid"
)
View Source
const (
	JsonPath      = "./save/db.json"
	VideoParePath = "./public/video/"
	VideoFilePath = VideoParePath + "video/"
	TempFilePath  = VideoParePath + "temp/"
	AnimeFilePath = VideoParePath + "anime/"
)
View Source
const (
	DefaultLightStatus           = "lightPower"
	DefaultAirconStatus          = "airconStop"
	DefaultAirconWarmTemperature = 23
	DefaultAirconCoolTemperature = 18
)

Variables

This section is empty.

Functions

func DeviceContain

func DeviceContain(str string) bool

func PostFile

func PostFile(address, filename string, src multipart.File) (*cpb.ResponsePostFile, error)

func ReceiveContent

func ReceiveContent(address, message string) *cpb.ReceiveContentResponse

func SendContent

func SendContent(address string, request *cpb.SendContentRequest) *cpb.SendContentResponse

Types

type CommonContent

type CommonContent struct {
	Room   string
	Object string
	Key    string
	Value  string
}

CommonContent ...

Jump to

Keyboard shortcuts

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