types

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package types include common data structures used in multiple packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseResponse

type BaseResponse[T any] struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	TTL     int    `json:"ttl"`
	Data    T      `json:"data"`
}

type DanmakuServerInfoResponse

type DanmakuServerInfoResponse = BaseResponse[danmakuInfo]

type IpNetType

type IpNetType string
var (
	IPv6Net IpNetType = "ipv6"
	IPv4Net IpNetType = "ipv4"
	IP64    IpNetType = "any"
)

func (IpNetType) GetDialNetString

func (t IpNetType) GetDialNetString() string

GetDialNetString returns the string accepted by net.Dialer::DialContext

func (IpNetType) String

func (t IpNetType) String() string

type LiveList

type LiveList struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	TTL     int    `json:"ttl"`
	Data    struct {
		Count int `json:"count"`
		Data  []struct {
			Face     string `json:"face"`
			Link     string `json:"link"`
			Roomid   RoomId `json:"roomid"`
			Roomname string `json:"roomname"`
			Nickname string `json:"nickname"`
		} `json:"data"`
	} `json:"data"`
}

type LiveStatus

type LiveStatus int
const (
	Inactive  LiveStatus = 0
	Streaming LiveStatus = 1
	Playback  LiveStatus = 2
)

func (LiveStatus) IsStreaming

func (s LiveStatus) IsStreaming() bool

func (LiveStatus) String

func (s LiveStatus) String() string

type RoomId

type RoomId uint64

type RoomPlayInfoResponse

type RoomPlayInfoResponse = BaseResponse[roomPlayInfo]

type RoomProfileResponse

type RoomProfileResponse = BaseResponse[roomProfile]

type RoomUrlInfoResponse

type RoomUrlInfoResponse = BaseResponse[roomUrlInfo]

type StreamingUrlInfo

type StreamingUrlInfo struct {
	URL        string `json:"url"`
	Length     int    `json:"length"`
	Order      int    `json:"order"`
	StreamType int    `json:"stream_type"`
	P2pType    int    `json:"p2p_type"`
}

type WebBannerResponse

type WebBannerResponse = BaseResponse[interface{}]

Jump to

Keyboard shortcuts

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