Documentation ¶
Index ¶
- Variables
- func SetupLogger(spec *config.Specification)
- type Controller
- func (c *Controller) ExitHandler() chan bool
- func (c *Controller) FileHandler(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
- func (c *Controller) ListStreamHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (c *Controller) SendError(w http.ResponseWriter, err error, status int)
- func (c *Controller) StartStreamHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- type ErrDTO
- type IManager
- type Manager
- type StreamDto
- type SummariseDto
Constants ¶
This section is empty.
Variables ¶
var ErrDirectoryNotCreated = errors.New("Could not create directory for URI")
ErrDirectoryNotCreated is sent when the system cannot create the directory for the URI
var ErrTimeout = errors.New("Timeout error")
ErrTimeout describes an error related to timing out
var ErrUnexpected = errors.New("Unexpected error")
ErrUnexpected describes an unexpected error
Functions ¶
func SetupLogger ¶
func SetupLogger(spec *config.Specification)
SetupLogger sets the logger for the proper settings based on the environment
Types ¶
type Controller ¶ added in v1.1.0
type Controller struct {
// contains filtered or unexported fields
}
Controller holds all handler functions for the API
func GetRouter ¶
func GetRouter(config *config.Specification) (*httprouter.Router, *Controller)
GetRouter returns the return for the application
func NewController ¶ added in v1.1.0
func NewController(spec *config.Specification, fileServer http.Handler) *Controller
NewController creates a new instance of Controller
func (*Controller) ExitHandler ¶ added in v1.1.0
func (c *Controller) ExitHandler() chan bool
ExitHandler is a function that can recognise when the application is being closed and cleans up all background running processes
func (*Controller) FileHandler ¶ added in v1.1.0
func (c *Controller) FileHandler(w http.ResponseWriter, req *http.Request, ps httprouter.Params)
FileHandler is HTTP handler for direct file requests
func (*Controller) ListStreamHandler ¶ added in v1.1.0
func (c *Controller) ListStreamHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
ListStreamHandler is the HTTP handler of the /list call
func (*Controller) SendError ¶ added in v1.1.0
func (c *Controller) SendError(w http.ResponseWriter, err error, status int)
SendError sends an error to the client
func (*Controller) StartStreamHandler ¶ added in v1.1.0
func (c *Controller) StartStreamHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
StartStreamHandler is an HTTP handler for the /start endpoint
type ErrDTO ¶ added in v1.1.0
type ErrDTO struct {
Error string `json:"error"`
}
ErrDTO describes a DTO that has a message as an error
type IManager ¶ added in v1.1.0
IManager is the interface for the manager object that handles the start of the transcoding process
type Manager ¶ added in v1.1.0
type Manager struct {
// contains filtered or unexported fields
}
Manager is describes a new object that has the start function
func NewManager ¶ added in v1.1.0
NewManager returns a new instance of a manager
type StreamDto ¶ added in v1.1.0
type StreamDto struct {
URI string `json:"uri"`
}
StreamDto describes an uri where the client can access the stream
type SummariseDto ¶ added in v1.1.0
SummariseDto describes each stream and their state of running