Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) ButtonChanged(ctx context.Context, executor, page, button int, value bool) error
- func (c *Client) FaderChanged(ctx context.Context, executor, page int, value float64) error
- func (c *Client) KeyStatuses(keys ...string) (map[string]KeyStatus, error)
- func (c *Client) Playbacks(page int, ranges []PlaybacksRange) ([]ServerPlaybacks, error)
- func (c *Client) SendCommand(ctx context.Context, command string) error
- func (c *Client) SendKey(ctx context.Context, key KeyName, pressed bool) error
- func (c *Client) Start(ctx context.Context) (Stopper, error)
- func (c *Client) WriteJSON(data interface{}) error
- type ClientHanshake
- type ClientRequestCommand
- type ClientRequestGeneric
- type ClientRequestGetData
- type ClientRequestKeyName
- type ClientRequestLogin
- type ClientRequestPlaybacks
- type ClientRequestPlaybacksUserInput
- type ExecButtonViewMode
- type ItemType
- type KeyName
- type KeyStatus
- type PlaybackResonse
- type PlaybacksItemType
- type PlaybacksRange
- type RequestType
- type ServerLoginParams
- type ServerLoginResponse
- type ServerPlayback
- type ServerPlaybackCues
- type ServerPlaybackExecutorBlock
- type ServerPlaybackExecutorBlocks
- type ServerPlaybackProgress
- type ServerPlaybackTextItem
- type ServerPlaybacks
- type ServerResponseGeneric
- type ServerResponseGetData
- type ServerResponsePlayback
- type ServerStatus
- type Stopper
Constants ¶
View Source
const ( KeyName0 KeyName = "0" KeyName1 KeyName = "1" KeyName2 KeyName = "2" KeyName3 KeyName = "3" KeyName4 KeyName = "4" KeyName5 KeyName = "5" KeyName6 KeyName = "6" KeyName7 KeyName = "7" KeyName8 KeyName = "8" KeyName9 KeyName = "9" KeyNameOn KeyName = "ON" KeyNameOff KeyName = "OFF" KeyNameHighlight KeyName = "HIGH" KeyNameSolo KeyName = "SOLO" KeyNameSelect KeyName = "SELECT" KeyStatusOff KeyStatus = "off" KeyStatusOn KeyStatus = "on" KeyStatusBlink KeyStatus = "blink" )
View Source
const ( RequestTypeGetData RequestType = "getdata" RequestTypeLogin RequestType = "login" RequestTypePlaybacks RequestType = "playbacks" RequestTypeClose RequestType = "close" RequestTypePlaybacksUserInput RequestType = "playbacks_userInput" RequestTypeKeyname RequestType = "keyname" RequestTypeCommand RequestType = "command" ExecButtonViewModeFader ExecButtonViewMode = 1 )
Variables ¶
View Source
var InvalidPasswordError error = fmt.Errorf("Invalid password")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ButtonChanged ¶
func (*Client) FaderChanged ¶
func (*Client) KeyStatuses ¶
func (*Client) Playbacks ¶
func (c *Client) Playbacks(page int, ranges []PlaybacksRange) ([]ServerPlaybacks, error)
func (*Client) SendCommand ¶
type ClientHanshake ¶
type ClientHanshake struct {
Session int `json:"session"`
}
type ClientRequestCommand ¶
type ClientRequestCommand struct { ClientRequestGeneric Command string `json:"command"` }
type ClientRequestGeneric ¶
type ClientRequestGeneric struct { RequestType RequestType `json:"requestType"` Session int `json:"session"` MaxRequests int `json:"maxRequests"` }
type ClientRequestGetData ¶
type ClientRequestGetData struct { ClientRequestGeneric Data string `json:"data"` }
type ClientRequestKeyName ¶
type ClientRequestKeyName struct { ClientRequestGeneric KeyName KeyName `json:"keyname"` Value int `json:"value"` CommandLineText string `json:"cmdlinetext"` AutoSubmit bool `json:"autoSubmit"` }
type ClientRequestLogin ¶
type ClientRequestLogin struct { ClientRequestGeneric Username string `json:"username"` Password string `json:"password"` }
type ClientRequestPlaybacks ¶
type ClientRequestPlaybacks struct { ClientRequestGeneric PageIndex int `json:"pageIndex"` // Page selected StartIndex []int `json:"startIndex"` // For the different ranges: executors to select (start index) ItemsCount []int `json:"itemsCount"` // For the different ranges: executors to select (count) ItemsType []int `json:"itemsType"` // ??? View int `json:"view"` // ??? ExecButtonViewMode ExecButtonViewMode `json:"execButtonViewMode"` ButtonsViewMode int `json:"buttonsViewMode"` // ??? }
type ExecButtonViewMode ¶
type ExecButtonViewMode int
type PlaybackResonse ¶
type PlaybackResonse struct { Response []ServerPlaybacks Error error }
type PlaybacksItemType ¶
type PlaybacksItemType int
const ( PlaybacksItemTypeFader PlaybacksItemType = 2 PlaybacksItemTypeButton PlaybacksItemType = 3 )
type PlaybacksRange ¶
type PlaybacksRange struct { Index int Count int ItemType PlaybacksItemType }
type RequestType ¶
type RequestType string
type ServerLoginParams ¶
type ServerLoginResponse ¶
type ServerPlayback ¶
type ServerPlayback struct { Index ServerPlaybackTextItem `json:"i"` ObjectType ServerPlaybackTextItem `json:"oType"` ObjectIndex ServerPlaybackTextItem `json:"oI"` TextTop ServerPlaybackTextItem `json:"tt"` HeaderBackgroundColor string `json:"bC"` HeaderBorderColor string `json:"bdC"` Cues ServerPlaybackCues `json:"cues"` CombinedItems int `json:"combinedItems"` IsExec int `json:"iExec"` IsRun int `json:"isRun"` ExecutorBlocks []ServerPlaybackExecutorBlocks `json:"executorBlocks"` // Why an array here ??? }
type ServerPlaybackCues ¶
type ServerPlaybackCues struct { BackgroundColor string `json:"bC"` Items []ServerPlaybackTextItem `json:"items"` }
type ServerPlaybackExecutorBlock ¶
type ServerPlaybackExecutorBlock struct { ID int `json:"id"` Text string `json:"t"` S bool `json:"s"` // ??? Color string `json:"color"` BorderColor string `json:"bdC"` LeftLed interface{} `json:"leftLED"` // Seems to never be filled RightLed interface{} `json:"rightLED"` // Same TypeText string `json:"tt"` // Only on faders Value float64 `json:"v"` // Only on faders ValueText string `json:"vT"` // Only on faders Min float64 `json:"min"` // Only on faders Max float64 `json:"max"` // Only on faders }
type ServerPlaybackExecutorBlocks ¶
type ServerPlaybackExecutorBlocks struct { Button1 *ServerPlaybackExecutorBlock `json:"button1"` Button2 *ServerPlaybackExecutorBlock `json:"button2"` Button3 *ServerPlaybackExecutorBlock `json:"button3"` Fader *ServerPlaybackExecutorBlock `json:"fader"` }
type ServerPlaybackProgress ¶
type ServerPlaybackTextItem ¶
type ServerPlaybackTextItem struct { Text string `json:"t"` Color string `json:"c"` Progress *ServerPlaybackProgress `json:"pgs"` }
type ServerPlaybacks ¶
type ServerPlaybacks struct { ItemsType int `json:"itemsType"` // ??? CntPages int `json:"cntPages"` // ??? Items [][]ServerPlayback `json:"items"` // Items per fader groups (fader groups are 5 fader wide) }
type ServerResponseGeneric ¶
type ServerResponseGeneric struct { ResponseType RequestType `json:"responseType"` Realtime bool `json:"realtime"` WorldIndex int `json:"worldIndex"` }
type ServerResponseGetData ¶
type ServerResponseGetData struct { ServerResponseGeneric Data []map[string]string `json:"data"` }
type ServerResponsePlayback ¶
type ServerResponsePlayback struct { ServerResponseGeneric ResponseSubType int `json:"responseSubType"` // ??? IPage int `json:"iPage"` // ??? ItemGroups []ServerPlaybacks `json:"itemGroups"` // 1 ServerPlaybacks per requested ranges }
type ServerStatus ¶
Click to show internal directories.
Click to hide internal directories.