data

package
v0.0.0-...-a73d9ad Latest Latest
Warning

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

Go to latest
Published: May 10, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stream

type Stream struct {
	Name            string       `json:"name"`
	ID              int          `json:"id"`
	Slug            string       `json:"slug"`
	Links           []StreamLink `json:"links"`
	Keywords        string       `json:"keywords"`
	Channels        string       `json:"channels"`
	UpdateFrequency int          `json:"update_frequency"`
	VideoLength     int          `json:"video_length"`
	IsNews          bool         `json:"is_news"`
	IsAuto          bool
}

Stream struct for parsing WebUIAPi responses

func (*Stream) IsAutoStream

func (s *Stream) IsAutoStream() bool

IsAutoStream returns true if stream is for botService

func (*Stream) ToStreamItem

func (s *Stream) ToStreamItem() StreamItem

ToStreamItem converts Stream struct into StreamItem

type StreamItem

type StreamItem struct {
	sync.RWMutex
	ID     int
	Name   string
	Slug   string
	IsAuto bool
	Links  *list.List
}

StreamItem storage for stream

type StreamLink struct {
	URL string `json:"url"`
}

StreamLink used for parsing json urls

type StreamStorage

type StreamStorage struct {
	sync.RWMutex
	Items map[int]StreamItem
}

StreamStorage storage for multiple StreamItems

func NewStreamStorage

func NewStreamStorage() *StreamStorage

NewStreamStorage initializes a new storage

Jump to

Keyboard shortcuts

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