server

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package server implements a fake MPD server that's used to test gompd client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen(network, addr string, listening chan bool)

Listen starts the server on the network network and address addr. Once the server has started, a value is sent to listening channel.

Types

type Attrs

type Attrs map[string]string

Attrs is a set of attributes returned by MPD.

type Sticker

type Sticker struct {
	Name, Value string
}

func NewSticker

func NewSticker(name, value string) *Sticker

func (*Sticker) String

func (s *Sticker) String() string

type Stickers

type Stickers map[string]*Sticker

func NewStickers

func NewStickers() Stickers

func (Stickers) Delete

func (ss Stickers) Delete(name string)

func (Stickers) Get

func (ss Stickers) Get(name string) *Sticker

func (Stickers) Set

func (ss Stickers) Set(name, value string)

func (Stickers) Sorted

func (ss Stickers) Sorted() []*Sticker

Jump to

Keyboard shortcuts

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