config

package
v0.0.0-...-db02598 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Merge

func Merge(defaults *Config, res *livekit.RecordingReservation) (string, error)

Creates a recorder config by combining service defaults with reservation request

Types

type Config

type Config struct {
	Redis      RedisConfig               `yaml:"redis"`
	ApiKey     string                    `yaml:"api_key"`
	ApiSecret  string                    `yaml:"api_secret"`
	WsUrl      string                    `yaml:"ws_url"`
	S3         S3Config                  `yaml:"s3"`
	HealthPort int                       `yaml:"health_port"`
	Options    *livekit.RecordingOptions `yaml:"options"`
	LogLevel   string                    `yaml:"log_level"`
	Test       bool                      `yaml:"-"`
}

func NewConfig

func NewConfig(confString string, c *cli.Context) (*Config, error)

func TestConfig

func TestConfig() *Config

type RedisConfig

type RedisConfig struct {
	Address  string `yaml:"address"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	DB       int    `yaml:"db"`
}

type Request

type Request struct {
	ApiKey    string         `json:"api_key,omitempty"`
	ApiSecret string         `json:"api_secret,omitempty"`
	Input     *RequestInput  `json:"input,omitempty"`
	Output    *RequestOutput `json:"output,omitempty"`
	Options   interface{}    `json:"options,omitempty"`
}

type RequestInput

type RequestInput struct {
	Template *RequestTemplate `json:"template,omitempty"`
	Url      string           `json:"url,omitempty"`
}

type RequestOutput

type RequestOutput struct {
	S3   *RequestS3 `json:"s3,omitempty"`
	Rtmp string     `json:"rtmp,omitempty"`
}

type RequestS3

type RequestS3 struct {
	Bucket    string `json:"bucket,omitempty"`
	Key       string `json:"key,omitempty"`
	AccessKey string `json:"access_key,omitempty"`
	Secret    string `json:"secret,omitempty"`
}

type RequestTemplate

type RequestTemplate struct {
	Layout   string `json:"layout,omitempty"`
	WsUrl    string `json:"ws_url,omitempty"`
	Token    string `json:"token,omitempty"`
	RoomName string `json:"room_name,omitempty"`
}

type S3Config

type S3Config struct {
	AccessKey string `yaml:"access_key"`
	Secret    string `yaml:"secret"`
}

Jump to

Keyboard shortcuts

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