ipc

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Command string   `json:"command"`
	Data    string   `json:"data"`
	Args    []string `json:"args"`
}

The type we use for sending messages to moshd

type Response

type Response struct {
	Responses []ResponseItem `json:"items"`
}

In some rare cases we need to get multiple reponses from moshd at once

func SendMessageToDaemon

func SendMessageToDaemon(message Message) Response

func (*Response) Add

func (r *Response) Add(ri ResponseItem)

func (*Response) First

func (r *Response) First() ResponseItem

type ResponseItem

type ResponseItem struct {
	Code        string `json:"code"`
	Message     string `json:"message"`
	Status      string `json:"status"`
	Song        string `json:"song"`
	Artist      string `json:"artist"`
	Album       string `json:"album"`
	CurrentTime string `json:"currenttime"`
	TotalTime   string `json:"totaltime"`
	Image       string `json:"image"`
}

The type we use for responses from moshd

Jump to

Keyboard shortcuts

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