epgstation

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelItem

type ChannelItem struct {
	ID                 int64  `json:"id"`
	ServiceID          int    `json:"serviceId"`
	NetworkID          int    `json:"networkId"`
	Name               string `json:"name"`
	HalfWidthName      string `json:"halfWidthName"`
	RemoteControlKeyID *int   `json:"remoteControlKeyId"`
	HasLogoData        bool   `json:"hasLogoData"`
	ChannelType        string `json:"channelType"`
	Channel            string `json:"channel"`
}

type Client

type Client struct {
	URL           *url.URL
	HTTPClient    *http.Client
	DefaultHeader http.Header
	Logger        log.Logger
}

func NewClient

func NewClient(urlString string) (*Client, error)

func (*Client) GetChannels

func (c *Client) GetChannels(ctx context.Context) (*GetChannelsResponse, error)

func (*Client) GetEncode added in v0.1.1

func (c *Client) GetEncode(ctx context.Context, opts GetEncodeOpts) (*GetEncodeResponse, error)

func (*Client) GetReservesCnts added in v0.1.1

func (c *Client) GetReservesCnts(ctx context.Context) (*GetReservesCntsResponse, error)

func (*Client) GetSchedules

func (c *Client) GetSchedules(ctx context.Context, opts GetSchedulesOpts) (*GetSchedulesResponse, error)

func (*Client) GetStorages

func (c *Client) GetStorages(ctx context.Context) (*GetStoragesResponse, error)

func (*Client) GetStreams

func (c *Client) GetStreams(ctx context.Context, opts GetStreamsOpts) (*GetStreamsResponse, error)

func (*Client) GetVersion

func (c *Client) GetVersion(ctx context.Context) (*GetVersionResponse, error)

type DropLogFile added in v0.1.1

type DropLogFile struct {
	ID            int64 `json:"id"`
	ErrorCnt      int64 `json:"errorCnt"`
	DropCnt       int64 `json:"dropCnt"`
	ScramblingCnt int64 `json:"scramblingCnt"`
}

type EncodeInfo added in v0.1.1

type EncodeInfo struct {
	RunningItems []EncodeProgramItem `json:"runningItems"`
	WaitItems    []EncodeProgramItem `json:"waitItems"`
}

type EncodeProgramItem added in v0.1.1

type EncodeProgramItem struct {
	ID       int64        `json:"id"`
	Mode     string       `json:"mode"`
	Recorded RecordedItem `json:"recorded"`
	Percent  *float64     `json:"percent"`
	Log      *string      `json:"log"`
}

type GetChannelsResponse

type GetChannelsResponse []ChannelItem

type GetEncodeOpts added in v0.1.1

type GetEncodeOpts struct {
	IsHalfWidth bool `url:"isHalfWidth"`
}

type GetEncodeResponse added in v0.1.1

type GetEncodeResponse EncodeInfo

type GetReservesCntsResponse added in v0.1.1

type GetReservesCntsResponse ReserveCnts

type GetSchedulesOpts

type GetSchedulesOpts struct {
	StartAt          int64 `url:"startAt"`
	EndAt            int64 `url:"endAt"`
	NeedsRawExtended *bool `url:"needsRawExtended"`
	IsFree           *bool `url:"isFree"`
	IsHalfWidth      bool  `url:"isHalfWidth"`
	GR               bool
	BS               bool
	CS               bool
	SKY              bool
}

type GetSchedulesResponse

type GetSchedulesResponse []Schedule

type GetStoragesResponse

type GetStoragesResponse StorageInfo

type GetStreamsOpts

type GetStreamsOpts struct {
	IsHalfWidth bool `url:"isHalfWidth"`
}

type GetStreamsResponse

type GetStreamsResponse StreamInfo

type GetVersionResponse

type GetVersionResponse struct {
	Version string `json:"version"`
}

type RecordedItem added in v0.1.1

type RecordedItem struct {
	ID                 int64              `json:"id"`
	RuleID             *int64             `json:"ruleId"`
	ProgramID          *int64             `json:"programId"`
	ChannelID          int64              `json:"channelId"`
	StartAt            int64              `json:"startAt"`
	EndAt              int64              `json:"endAt"`
	Name               string             `json:"name"`
	Description        *string            `json:"description"`
	Extended           *string            `json:"extended"`
	RawExtended        *map[string]string `json:"rawExtended"`
	Genre1             *int               `json:"genre1"`
	SubGenre1          *int               `json:"subGenre1"`
	Genre2             *int               `json:"genre2"`
	SubGenre2          *int               `json:"subGenre2"`
	Genre3             *int               `json:"genre3"`
	SubGenre3          *int               `json:"subGenre3"`
	VideoType          *string            `json:"videoType"`
	VideoResolution    *string            `json:"videoResolution"`
	VideoStreamContent *int               `json:"videoStreamContent"`
	VideoComponentType *int               `json:"videoComponentType"`
	AudioSamplingRate  *int               `json:"audioSamplingRate"`
	AudioComponentType *int               `json:"audioComponentType"`
	IsRecording        bool               `json:"isRecording"`
	Thumbnails         *[]int64           `json:"thumbnails"`
	VideoFiles         *[]VideoFile       `json:"videoFiles"`
	DropLogFile        *DropLogFile       `json:"dropLogFile"`
	Tags               *[]RecordedTag     `json:"tags"`
	IsEncoding         bool               `json:"isEncoding"`
	IsProtected        bool               `json:"isProtected"`
}

type RecordedTag added in v0.1.1

type RecordedTag struct {
	ID    int64  `json:"id"`
	Name  string `json:"name"`
	Color string `json:"color"`
}

type Records added in v0.1.1

type Records struct {
	Records []RecordedItem `json:"records"`
	Total   int64          `json:"total"`
}

type ReserveCnts added in v0.1.1

type ReserveCnts struct {
	Normal    int64 `json:"normal"`
	Conflicts int64 `json:"conflicts"`
	Skips     int64 `json:"skips"`
	Overlaps  int64 `json:"overlaps"`
}

type Schedule

type Schedule struct {
	Channel  ScheduleChannelItem   `json:"channel"`
	Programs []ScheduleProgramItem `json:"programs"`
}

type ScheduleChannelItem

type ScheduleChannelItem struct {
	ID                 int64  `json:"id"`
	ServiceID          int    `json:"serviceId"`
	NetworkID          int    `json:"networkId"`
	Name               string `json:"name"`
	RemoteControlKeyID *int   `json:"remoteControlKeyId"`
	HasLogoData        bool   `json:"hasLogoData"`
	ChannelType        string `json:"channelType"`
}

type ScheduleProgramItem

type ScheduleProgramItem struct {
	ID                 int64              `json:"id"`
	ChannelID          int64              `json:"channelId"`
	StartAt            int64              `json:"startAt"`
	EndAt              int64              `json:"endAt"`
	IsFree             bool               `json:"isFree"`
	Name               string             `json:"name"`
	Description        *string            `json:"description"`
	Extended           *string            `json:"extended"`
	RawExtended        *map[string]string `json:"rawExtended"`
	Genre1             *int               `json:"genre1"`
	SubGenre1          *int               `json:"subGenre1"`
	Genre2             *int               `json:"genre2"`
	SubGenre2          *int               `json:"subGenre2"`
	Genre3             *int               `json:"genre3"`
	SubGenre3          *int               `json:"subGenre3"`
	VideoType          *string            `json:"videoType"`
	VideoResolution    *string            `json:"videoResolution"`
	VideoStreamContent *int               `json:"videoStreamContent"`
	VideoComponentType *int               `json:"videoComponentType"`
	AudioSamplingRate  *int               `json:"audioSamplingRate"`
	AudioComponentType *int               `json:"audioComponentType"`
}

type StorageInfo

type StorageInfo struct {
	Items []StorageItem `json:"items"`
}

type StorageItem

type StorageItem struct {
	Name      string `json:"name"`
	Available int64  `json:"available"`
	Used      int64  `json:"used"`
	Total     int64  `json:"total"`
}

type StreamInfo

type StreamInfo struct {
	Items []StreamInfoItem `json:"items"`
}

type StreamInfoItem

type StreamInfoItem struct {
	StreamID    int                `json:"streamId"`
	Type        string             `json:"type"`
	Mode        int                `json:"mode"`
	IsEnable    bool               `json:"isEnable"`
	ChannelID   int64              `json:"channelId"`
	Name        string             `json:"name"`
	StartAt     int64              `json:"startAt"`
	EndAt       int64              `json:"endAt"`
	Description *string            `json:"description"`
	Extended    *string            `json:"extended"`
	RawExtended *map[string]string `json:"rawExtended"`
	VideoFileID *int               `json:"videoFileId"`
	RecordedID  *int               `json:"recordedId"`
}

type VideoFile added in v0.1.1

type VideoFile struct {
	ID       int64  `json:"id"`
	Name     string `json:"name"`
	Filename string `json:"filename"`
	Type     string `json:"type"`
	Size     int64  `json:"size"`
}

Jump to

Keyboard shortcuts

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