videoworker

package
v0.0.0-...-342a630 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReplayFileURL = "/api/v2/replay/sessions/%s/task/"
)
View Source
const UserProfileURL = "/api/v1/users/profile/"

Variables

This section is empty.

Functions

func StructToMapString

func StructToMapString(m interface{}) map[string]string

Types

type Client

type Client struct {
	BaseURL string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(baseUrl string, key model.AccessKey, Insecure bool) *Client

func (*Client) CreateReplayTask

func (s *Client) CreateReplayTask(sessionId string, file string, meta ReplayMeta) (res Task, err error)

type ProfileAuth

type ProfileAuth struct {
	KeyID    string
	SecretID string
}

func (*ProfileAuth) Sign

func (auth *ProfileAuth) Sign(r *http.Request) error

type ReplayMeta

type ReplayMeta struct {
	SessionId     string `json:"session_id"`
	ComponentType string `json:"component_type"`
	FileType      string `json:"file_type"`
	SessionDate   string `json:"session_date"` //  格式是 "2006-01-02"
	MaxFrame      int    `json:"max_frame"`
	Width         int    `json:"width"`
	Height        int    `json:"height"`
	Bitrate       int    `json:"bitrate"` // 1 或者 2
}

type Task

type Task struct {
	Id          string `json:"id"`
	RootDir     string `json:"root_dir"`
	DateCreated string `json:"date_created"`

	SessionId     string `json:"session_id"`
	ComponentType string `json:"component_type"`
	FileType      string `json:"file_type"`
	SessionDate   string `json:"session_date"` //  格式是 "2006-01-02"
	MaxFrame      int    `json:"max_frame"`
	Width         int    `json:"width"`
	Height        int    `json:"height"`
	Bitrate       int    `json:"bitrate"`

	ReplayMp4Path string `json:"replay_mp4_path"`
	ReplayPath    string `json:"replay_path"`
	Status        string `json:"status"`
	Error         string `json:"error"`
}

Jump to

Keyboard shortcuts

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