app

package
v0.0.0-...-e88ebdc Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteData

func DeleteData(w http.ResponseWriter, req *http.Request) error

func Download

func Download(url, filepath string, getdata bool) ([]byte, string, error)

func HandleSubtitleMaster

func HandleSubtitleMaster(slikeId, path string, srt []SrtReq) (string, error)

func InitTelegraf

func InitTelegraf(w http.ResponseWriter, req *http.Request) map[string]string

func UpdateData

func UpdateData(w http.ResponseWriter, req *http.Request) error

Types

type APIResponse

type APIResponse struct {
	Status  bool        `json:"status"`
	Error   int         `json:"error"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

func DeleteAPI

func DeleteAPI(w http.ResponseWriter, req *http.Request) APIResponse

func GetAPI

func GetAPI(w http.ResponseWriter, req *http.Request) APIResponse

func PostAPI

func PostAPI(w http.ResponseWriter, req *http.Request) APIResponse

error handling done in controllers whcih was not done before

func PutAPI

func PutAPI(w http.ResponseWriter, req *http.Request) APIResponse

type Cover

type Cover struct {
	Front struct {
		Type    string `json:"type"`
		Videoid string `json:"videoid"`
		Src     struct {
			Poster string `json:"poster"`
			Thumb  string `json:"thumb"`
			Player string `json:"player"`
		} `json:"src"`
	} `json:"front"`
	Back struct {
		Type    string `json:"type"`
		Videoid string `json:"videoid"`
		Src     struct {
			Poster string `json:"poster"`
			Thumb  string `json:"thumb"`
			Player string `json:"player"`
		} `json:"src"`
	} `json:"back"`
}

type Flavors

type Flavors struct {
	Flavor  string `json:"flavor"`
	Type    string `json:"type"`
	URL     string `json:"url"`
	Bitrate string `json:"bitrate,omitempty"`
	Width   string `json:"width,omitempty"`
	Height  string `json:"height,omitempty"`
}

type Index

type Index struct {
	Resolution string `json:"resolution"`
	Sid        string `json:"sid"`
	Type       string `json:"type"`
	// Playlist   *m3u8.MasterPlaylist `json:"playlist"`
	URL     *url.URL `json:"url"`
	Bitrate string   `json:"bitrate,omitempty"`
	Width   string   `json:"width,omitempty"`
	Height  string   `json:"height,omitempty"`
}

type Markers

type Markers struct {
	ID               string        `json:"_id"`
	Name             string        `json:"name"`
	At               string        `json:"at"`
	Image            string        `json:"image"`
	Thumb            string        `json:"thumb"`
	Poster           string        `json:"poster"`
	CustomThumb      string        `json:"custom_thumb"`
	CustomPlayer     string        `json:"custom_player"`
	CustomPoster     string        `json:"custom_poster"`
	Duration         int           `json:"duration"`
	Length           int           `json:"length"`
	Vendor           int           `json:"vendor"`
	VendorName       interface{}   `json:"vendor_name"`
	Subtitle         []interface{} `json:"subtitle"`
	Ag               string        `json:"AG"`
	Description      string        `json:"description"`
	Title            string        `json:"title"`
	IsLive           int           `json:"isLive"`
	Simulive         int           `json:"simulive"`
	AudioOnly        int           `json:"audioOnly"`
	SimulivePlaylist bool          `json:"simulivePlaylist"`
	StartTime        int64         `json:"startTime,omitempty"`
	EndTime          int64         `json:"endTime,omitempty"`
	ServerTime       string        `json:"serverTime"`
	Cdn              struct {
		Ak string `json:"AK"`
	} `json:"cdn"`
	Imagereel struct {
		Rr int   `json:"rr"`
		Rc int   `json:"rc"`
		Tw int   `json:"tw"`
		Th int   `json:"th"`
		Tc []int `json:"tc"`
	} `json:"imagereel"`
	Flavors           []Flavors   `json:"flavors"`
	Payload           []Source    `json:"payload"`
	CustomSocialImage interface{} `json:"custom_social_image"`
	Tags              string      `json:"tags"`
	Istranscode       interface{} `json:"istranscode"`
}

type Media

type Media struct {
	ID     string `json:"_id"`
	Source Source `json:"_source"`
}

type NewFlavors

type NewFlavors struct {
	Flavor  string `json:"flavor"`
	Type    string `json:"type"`
	URL     string `json:"url"`
	Bitrate string `json:"bitrate,omitempty"`
	Width   string `json:"width,omitempty"`
	Height  string `json:"height,omitempty"`
}

type Source

type Source struct {
	St              string        `json:"_st"`
	Channel         string        `json:"channel"`
	IncludeProducts []interface{} `json:"includeProducts"`
	Stitle          string        `json:"stitle"`
	MediaType       string        `json:"media_type"`
	ID              int           `json:"id"`
	Contenttypes    string        `json:"contenttypes"`
	Images          struct {
		Thumb           string `json:"thumb"`
		Poster          string `json:"poster"`
		Player          string `json:"player"`
		CustomPlayer    string `json:"custom_player"`
		CustomPoster    string `json:"custom_poster"`
		CustomPosterall string `json:"custom_posterall"`
		CustomThumb     string `json:"custom_thumb"`
	} `json:"images"`
	FileStatus  int    `json:"file_status"`
	At          string `json:"at"`
	Status      int    `json:"status"`
	Vendor      int    `json:"vendor"`
	Audio       int    `json:"audio"`
	Product     string `json:"product"`
	Created     string `json:"created"`
	Description string `json:"description"`
	Video       int    `json:"video"`
	Title       string `json:"title"`
	Sid         string `json:"sid"`
	Duration    int    `json:"duration"`
}

type SrtReq

type SrtReq struct {
	Name    string `json:"name"`
	Default bool   `json:"dafault"`
	Code    string `json:"code"`
	Path    string `json:"path"`
}

type StreamData

type StreamData struct {
	ID           string        `json:"_id"`
	Kid          interface{}   `json:"_kid"`
	Name         string        `json:"name"`
	At           string        `json:"at"`
	Image        string        `json:"image"`
	Thumb        string        `json:"thumb"`
	Poster       string        `json:"poster"`
	CustomThumb  string        `json:"custom_thumb"`
	CustomPlayer string        `json:"custom_player"`
	CustomPoster string        `json:"custom_poster"`
	IsPrime      int           `json:"isPrime"`
	Duration     int           `json:"duration"`
	Length       int           `json:"length"`
	Vendor       int           `json:"vendor"`
	VendorName   interface{}   `json:"vendor_name"`
	Subtitle     []interface{} `json:"subtitle"`
	Ag           string        `json:"AG"`
	IsLive       int           `json:"isLive"`
	AudioOnly    int           `json:"audioOnly"`
	Cdn          struct {
		Ak string `json:"AK"`
	} `json:"cdn"`
	Imagereel struct {
		Rr int   `json:"rr"`
		Rc int   `json:"rc"`
		Tw int   `json:"tw"`
		Th int   `json:"th"`
		Tc []int `json:"tc"`
	} `json:"imagereel"`
	Flavors           []NewFlavors `json:"flavors"`
	CustomSocialImage interface{}  `json:"custom_social_image"`
	Tags              string       `json:"tags"`
	Istranscode       interface{}  `json:"istranscode"`
}

type Todo

type Todo struct {
	ID   int
	Task string
}

func GetData

func GetData(w http.ResponseWriter, req *http.Request) ([]Todo, error)

func PostData

func PostData(w http.ResponseWriter, req *http.Request) ([]Todo, error)

Jump to

Keyboard shortcuts

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