Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadRequest = errors.New("bad request") ErrInternalServerError = errors.New("internal server error") )
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action string
const ( ActionVodMovieCategories Action = "get_vod_categories" ActionVodMovieStreams Action = "get_vod_streams" ActionVodSeriesCategories Action = "get_series_categories" ActionVodSeriesStreams Action = "get_series" ActionLiveCategories Action = "get_live_categories" ActionLiveStreams Action = "get_live_streams" ActionGetVodInfo Action = "get_vod_info" ActionNone Action = "" )
type ActionHandler ¶
type NoneActionHandler ¶
type NoneActionHandler struct {
// contains filtered or unexported fields
}
func (*NoneActionHandler) Action ¶
func (nah *NoneActionHandler) Action() Action
func (*NoneActionHandler) HandleAction ¶
func (nah *NoneActionHandler) HandleAction(w http.ResponseWriter, r *http.Request) error
type NoneActionResponse ¶
type NoneActionResponse struct { UserInfo UserInfo `json:"userInfo"` ServerInfo ServerInfo `json:"serverInfo"` }
type ServerInfo ¶
type ServerInfo struct { Version string `json:"version"` URL string `json:"url"` Port string `json:"port"` HTTPSPort string `json:"https_port"` ServerProtocol string `json:"server_protocol"` RtmpPort string `json:"rtmp_port"` TimeNow string `json:"time_now"` Timezone string `json:"timezone"` Revision int `json:"revision"` TimestampNow int `json:"timestamp_now"` Xui bool `json:"xui"` }
type ServerInfoFetcher ¶
type ServerInfoFetcher interface {
FetchServerInfo() (ServerInfo, error)
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(uf UserFetcher, sif ServerInfoFetcher) *Service
type UserFetcher ¶
type UserInfo ¶
type UserInfo struct { Username string `json:"username"` Password string `json:"password"` Message string `json:"message"` Status string `json:"status"` ExpDate string `json:"exp_date"` IsTrial string `json:"is_trial"` ActiveCons string `json:"activeCons"` CreatedAt string `json:"created_at"` MaxConnections string `json:"max_connections"` AllowedOutputFormats []string `json:"allowed_output_formats"` Auth int `json:"auth"` }
Click to show internal directories.
Click to hide internal directories.