utils

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 20 Imported by: 5

Documentation

Index

Constants

View Source
const (
	TranscoderConsumerDurable = "transcoderWorker"
	// RecorderKeyPrefix format: recorder_<recorderId>-FIELD_<field>
	RecorderKeyPrefix = "recorder_"
	// RecorderKeyFieldPrefix is the separator between the recorderId and the field.
	RecorderKeyFieldPrefix = "-FIELD_"
)

Variables

This section is empty.

Functions

func AssignLTIV1CustomParams

func AssignLTIV1CustomParams(params *url.Values, claims *plugnmeet.LtiClaims)

func FormatRecorderKey added in v1.2.1

func FormatRecorderKey(recorderId, field string) string

FormatRecorderKey generates a key for a specific recorder's field within the consolidated bucket. The format will be `recorder_<recorderId>-FIELD_<field>`.

func GenerateRandomStrings

func GenerateRandomStrings(n int) string

func GenerateSecureRandomStrings

func GenerateSecureRandomStrings(n int) (string, error)

func GetFilesFromDir

func GetFilesFromDir(path, ext, s string) ([]string, error)

func NkeyOptionFromSeedText added in v1.0.13

func NkeyOptionFromSeedText(seedText string) (nats.Option, error)

NkeyOptionFromSeedText creates a NATS NKey option from a raw seed string.

func ParseFileSizeToBytes added in v1.3.0

func ParseFileSizeToBytes(sizeStr string) (uint64, error)

func ParseRecorderKey added in v1.2.1

func ParseRecorderKey(key string) (recorderId, field string, ok bool)

ParseRecorderKey extracts the recorderId and field from a consolidated key.

func PrepareCommonWebhookNotifyEvent

func PrepareCommonWebhookNotifyEvent(event *livekit.WebhookEvent) *plugnmeet.CommonNotifyEvent

func PrepareDefaultRoomFeatures

func PrepareDefaultRoomFeatures(r *plugnmeet.CreateRoomReq)

PrepareDefaultRoomFeatures will initialize all the features and lock settings with default values this ensure that none of the feature has nil values

func PrepareLTIV1RoomCreateReq

func PrepareLTIV1RoomCreateReq(c *plugnmeet.LtiClaims) *plugnmeet.CreateRoomReq

func SendCommonProtoJsonResponse

func SendCommonProtoJsonResponse(c fiber.Ctx, s bool, m string, statusCode plugnmeet.StatusCode) error

func SendCommonProtobufResponse

func SendCommonProtobufResponse(c fiber.Ctx, s bool, m string) error

func SendProtoJsonResponse

func SendProtoJsonResponse(c fiber.Ctx, res proto.Message) error

func SendProtobufResponse

func SendProtobufResponse(c fiber.Ctx, res proto.Message) error

func SetCreateRoomDefaultValues

func SetCreateRoomDefaultValues(r *plugnmeet.CreateRoomReq, maxSize, maxSizeWhiteboardFile uint64, allowedTypes []string, allowedNotepad bool)

func SetDefaultRoomSettings

func SetDefaultRoomSettings(s *RoomDefaultSettings, r *plugnmeet.CreateRoomReq)

func SetRoomDefaultLockSettings

func SetRoomDefaultLockSettings(r *plugnmeet.CreateRoomReq)

Types

type RecorderInfo added in v1.2.1

type RecorderInfo struct {
	RecorderId      string
	MaxLimit        int64
	CurrentProgress int64
	LastPing        int64
	TotalCores      int64
	CpuScore        float64
}

type RoomDefaultSettings

type RoomDefaultSettings struct {
	MaxParticipants                    *uint32 `yaml:"max_participants"`
	MaxDuration                        *uint64 `yaml:"max_duration"`
	MaxNumBreakoutRooms                *uint32 `yaml:"max_num_breakout_rooms"`
	MaxPreloadedWhiteboardFileSize     *string `yaml:"max_preloaded_wb_file_size"`
	MaxPreloadedWhiteboardFileSizeByte *uint64 `yaml:"-"`
}

Jump to

Keyboard shortcuts

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