Documentation ¶
Index ¶
Constants ¶
const DefaultConfigFile = "config.json"
DefaultConfigFile is the default configuration file path
const DefaultHTTPSCertFile = "server.cert"
DefaultHTTPSCertFile is the default path to the SSL certificate
const DefaultHTTPSKeyFile = "server.key"
DefaultHTTPSKeyFile is the default path to the SSL key
const DefaultOutputDirectory = "./out"
DefaultOutputDirectory is the default output directory for generated content
Variables ¶
This section is empty.
Functions ¶
func GetTranscoderCommand ¶
GetTranscoderCommand produces an instruction for the transcode phase to execute
func WriteConfig ¶
WriteConfig saves a fakeOrigin config as a pretty-printed json file
Types ¶
type Config ¶
type Config struct { ServerConf ServerInfo `json:"server"` Endpoints []Endpoint `json:"endpoints"` }
Config defines the application configuration
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig generates a basic default configuration
func LoadAndGenerateDefaultConfig ¶
LoadAndGenerateDefaultConfig loads the config from a given json file and puts a default value in place if you havn't stored anything
func ProcessConfig ¶
ProcessConfig processes the config loaded from disk, or generated the first time. This must be called before the config can be used to transcode or serve.
type Endpoint ¶
type Endpoint struct { ID string `json:"id"` DiskID string `json:"override_disk_id,omitempty"` Source string `json:"source"` OutputDirectory string `json:"outputdir,omitifempty"` EndpointType Type `json:"type"` ManualCommand []string `json:"manual_command,omitempty"` DefaultHeaders map[string][]string `json:"default_headers,omitempty"` NoCache bool `json:"no_cache,omitempty"` ABRManifests []string `json:"abr_manifests,omitempty"` }
Endpoint defines all kinds of endpoints to be served
type ServerInfo ¶
type ServerInfo struct { HTTPListeningPort int `json:"http_port"` HTTPSListeningPort int `json:"https_port"` SSLCert string `json:"ssl_cert"` SSLKey string `json:"ssl_key"` BindingAddress string `json:"binding_address"` CrossdomainFile string `json:"crossdomain_xml_file"` }
ServerInfo contains relevant info for serving content
type Type ¶
type Type int
Type models the supported types of endpoints
Type models the supported types of endpoints
func (Type) MarshalJSON ¶
MarshalJSON is generated so Type satisfies json.Marshaler.
func (*Type) UnmarshalJSON ¶
UnmarshalJSON is generated so Type satisfies json.Unmarshaler.