Documentation ¶
Index ¶
- Variables
- func RegisterBuildHandler(s server.Server, hdlr BuildHandler, opts ...server.HandlerOption) error
- func RegisterCacheHandler(s server.Server, hdlr CacheHandler, opts ...server.HandlerOption) error
- func RegisterTaskHandler(s server.Server, hdlr TaskHandler, opts ...server.HandlerOption) error
- type Audio
- func (*Audio) Descriptor() ([]byte, []int)
- func (m *Audio) GetDuration() int64
- func (m *Audio) GetFile() string
- func (m *Audio) GetOffset() int64
- func (*Audio) ProtoMessage()
- func (m *Audio) Reset()
- func (m *Audio) String() string
- func (m *Audio) XXX_DiscardUnknown()
- func (m *Audio) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Audio) XXX_Merge(src proto.Message)
- func (m *Audio) XXX_Size() int
- func (m *Audio) XXX_Unmarshal(b []byte) error
- type BuildHandler
- type BuildOptions
- func (*BuildOptions) Descriptor() ([]byte, []int)
- func (m *BuildOptions) GetFps() int32
- func (m *BuildOptions) GetResolution() string
- func (*BuildOptions) ProtoMessage()
- func (m *BuildOptions) Reset()
- func (m *BuildOptions) String() string
- func (m *BuildOptions) XXX_DiscardUnknown()
- func (m *BuildOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BuildOptions) XXX_Merge(src proto.Message)
- func (m *BuildOptions) XXX_Size() int
- func (m *BuildOptions) XXX_Unmarshal(b []byte) error
- type BuildResponse
- func (*BuildResponse) Descriptor() ([]byte, []int)
- func (m *BuildResponse) GetStatus() *Status
- func (m *BuildResponse) GetTaskID() string
- func (*BuildResponse) ProtoMessage()
- func (m *BuildResponse) Reset()
- func (m *BuildResponse) String() string
- func (m *BuildResponse) XXX_DiscardUnknown()
- func (m *BuildResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BuildResponse) XXX_Merge(src proto.Message)
- func (m *BuildResponse) XXX_Size() int
- func (m *BuildResponse) XXX_Unmarshal(b []byte) error
- type BuildService
- type BuildStatus
- type CacheHandler
- type CacheResponse
- func (*CacheResponse) Descriptor() ([]byte, []int)
- func (m *CacheResponse) GetFile() string
- func (m *CacheResponse) GetStatus() *Status
- func (*CacheResponse) ProtoMessage()
- func (m *CacheResponse) Reset()
- func (m *CacheResponse) String() string
- func (m *CacheResponse) XXX_DiscardUnknown()
- func (m *CacheResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CacheResponse) XXX_Merge(src proto.Message)
- func (m *CacheResponse) XXX_Size() int
- func (m *CacheResponse) XXX_Unmarshal(b []byte) error
- type CacheService
- type Cache_StreamSaveService
- type Cache_StreamSaveStream
- type CancelRequest
- func (*CancelRequest) Descriptor() ([]byte, []int)
- func (m *CancelRequest) GetTaskID() string
- func (*CancelRequest) ProtoMessage()
- func (m *CancelRequest) Reset()
- func (m *CancelRequest) String() string
- func (m *CancelRequest) XXX_DiscardUnknown()
- func (m *CancelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CancelRequest) XXX_Merge(src proto.Message)
- func (m *CancelRequest) XXX_Size() int
- func (m *CancelRequest) XXX_Unmarshal(b []byte) error
- type CancelResponse
- func (*CancelResponse) Descriptor() ([]byte, []int)
- func (m *CancelResponse) GetStatus() *Status
- func (*CancelResponse) ProtoMessage()
- func (m *CancelResponse) Reset()
- func (m *CancelResponse) String() string
- func (m *CancelResponse) XXX_DiscardUnknown()
- func (m *CancelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CancelResponse) XXX_Merge(src proto.Message)
- func (m *CancelResponse) XXX_Size() int
- func (m *CancelResponse) XXX_Unmarshal(b []byte) error
- type CombineRequest
- func (*CombineRequest) Descriptor() ([]byte, []int)
- func (m *CombineRequest) GetVideo() []string
- func (*CombineRequest) ProtoMessage()
- func (m *CombineRequest) Reset()
- func (m *CombineRequest) String() string
- func (m *CombineRequest) XXX_DiscardUnknown()
- func (m *CombineRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CombineRequest) XXX_Merge(src proto.Message)
- func (m *CombineRequest) XXX_Size() int
- func (m *CombineRequest) XXX_Unmarshal(b []byte) error
- type Image
- func (*Image) Descriptor() ([]byte, []int)
- func (m *Image) GetDuration() int64
- func (m *Image) GetFile() string
- func (m *Image) GetOffset() int64
- func (*Image) ProtoMessage()
- func (m *Image) Reset()
- func (m *Image) String() string
- func (m *Image) XXX_DiscardUnknown()
- func (m *Image) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Image) XXX_Merge(src proto.Message)
- func (m *Image) XXX_Size() int
- func (m *Image) XXX_Unmarshal(b []byte) error
- type Notification
- func (*Notification) Descriptor() ([]byte, []int)
- func (m *Notification) GetMessage() string
- func (m *Notification) GetStatus() string
- func (m *Notification) GetTaskID() string
- func (*Notification) ProtoMessage()
- func (m *Notification) Reset()
- func (m *Notification) String() string
- func (m *Notification) XXX_DiscardUnknown()
- func (m *Notification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Notification) XXX_Merge(src proto.Message)
- func (m *Notification) XXX_Size() int
- func (m *Notification) XXX_Unmarshal(b []byte) error
- type QueryRequest
- func (*QueryRequest) Descriptor() ([]byte, []int)
- func (m *QueryRequest) GetTaskID() string
- func (*QueryRequest) ProtoMessage()
- func (m *QueryRequest) Reset()
- func (m *QueryRequest) String() string
- func (m *QueryRequest) XXX_DiscardUnknown()
- func (m *QueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryRequest) XXX_Merge(src proto.Message)
- func (m *QueryRequest) XXX_Size() int
- func (m *QueryRequest) XXX_Unmarshal(b []byte) error
- type QueryResponse
- func (*QueryResponse) Descriptor() ([]byte, []int)
- func (m *QueryResponse) GetBuildLog() string
- func (m *QueryResponse) GetBuildStatus() BuildStatus
- func (m *QueryResponse) GetCreatedAt() int64
- func (m *QueryResponse) GetStatus() *Status
- func (m *QueryResponse) GetUpdatedAt() int64
- func (m *QueryResponse) GetUrl() string
- func (*QueryResponse) ProtoMessage()
- func (m *QueryResponse) Reset()
- func (m *QueryResponse) String() string
- func (m *QueryResponse) XXX_DiscardUnknown()
- func (m *QueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryResponse) XXX_Merge(src proto.Message)
- func (m *QueryResponse) XXX_Size() int
- func (m *QueryResponse) XXX_Unmarshal(b []byte) error
- type RenderRequest
- func (*RenderRequest) Descriptor() ([]byte, []int)
- func (m *RenderRequest) GetAudio() []*Audio
- func (m *RenderRequest) GetDuration() int64
- func (m *RenderRequest) GetImage() []*Image
- func (m *RenderRequest) GetOptions() *BuildOptions
- func (*RenderRequest) ProtoMessage()
- func (m *RenderRequest) Reset()
- func (m *RenderRequest) String() string
- func (m *RenderRequest) XXX_DiscardUnknown()
- func (m *RenderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RenderRequest) XXX_Merge(src proto.Message)
- func (m *RenderRequest) XXX_Size() int
- func (m *RenderRequest) XXX_Unmarshal(b []byte) error
- type SaveRequest
- func (*SaveRequest) Descriptor() ([]byte, []int)
- func (m *SaveRequest) GetData() []byte
- func (m *SaveRequest) GetExtension() string
- func (*SaveRequest) ProtoMessage()
- func (m *SaveRequest) Reset()
- func (m *SaveRequest) String() string
- func (m *SaveRequest) XXX_DiscardUnknown()
- func (m *SaveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SaveRequest) XXX_Merge(src proto.Message)
- func (m *SaveRequest) XXX_Size() int
- func (m *SaveRequest) XXX_Unmarshal(b []byte) error
- type SplitRequest
- func (*SplitRequest) Descriptor() ([]byte, []int)
- func (m *SplitRequest) GetFactor() int32
- func (m *SplitRequest) GetStrategy() SplitStrategy
- func (m *SplitRequest) GetVideo() string
- func (*SplitRequest) ProtoMessage()
- func (m *SplitRequest) Reset()
- func (m *SplitRequest) String() string
- func (m *SplitRequest) XXX_DiscardUnknown()
- func (m *SplitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SplitRequest) XXX_Merge(src proto.Message)
- func (m *SplitRequest) XXX_Size() int
- func (m *SplitRequest) XXX_Unmarshal(b []byte) error
- type SplitStrategy
- type Status
- func (*Status) Descriptor() ([]byte, []int)
- func (m *Status) GetCode() int32
- func (m *Status) GetMessage() string
- func (*Status) ProtoMessage()
- func (m *Status) Reset()
- func (m *Status) String() string
- func (m *Status) XXX_DiscardUnknown()
- func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Status) XXX_Merge(src proto.Message)
- func (m *Status) XXX_Size() int
- func (m *Status) XXX_Unmarshal(b []byte) error
- type StreamSaveRequest
- func (*StreamSaveRequest) Descriptor() ([]byte, []int)
- func (m *StreamSaveRequest) GetData() []byte
- func (m *StreamSaveRequest) GetExtension() string
- func (m *StreamSaveRequest) GetSize() int64
- func (*StreamSaveRequest) ProtoMessage()
- func (m *StreamSaveRequest) Reset()
- func (m *StreamSaveRequest) String() string
- func (m *StreamSaveRequest) XXX_DiscardUnknown()
- func (m *StreamSaveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StreamSaveRequest) XXX_Merge(src proto.Message)
- func (m *StreamSaveRequest) XXX_Size() int
- func (m *StreamSaveRequest) XXX_Unmarshal(b []byte) error
- type TakeRequest
- func (*TakeRequest) Descriptor() ([]byte, []int)
- func (m *TakeRequest) GetTaskID() string
- func (*TakeRequest) ProtoMessage()
- func (m *TakeRequest) Reset()
- func (m *TakeRequest) String() string
- func (m *TakeRequest) XXX_DiscardUnknown()
- func (m *TakeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TakeRequest) XXX_Merge(src proto.Message)
- func (m *TakeRequest) XXX_Size() int
- func (m *TakeRequest) XXX_Unmarshal(b []byte) error
- type TakeResponse
- func (*TakeResponse) Descriptor() ([]byte, []int)
- func (m *TakeResponse) GetData() []byte
- func (m *TakeResponse) GetStatus() *Status
- func (*TakeResponse) ProtoMessage()
- func (m *TakeResponse) Reset()
- func (m *TakeResponse) String() string
- func (m *TakeResponse) XXX_DiscardUnknown()
- func (m *TakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TakeResponse) XXX_Merge(src proto.Message)
- func (m *TakeResponse) XXX_Size() int
- func (m *TakeResponse) XXX_Unmarshal(b []byte) error
- type TaskHandler
- type TaskService
Constants ¶
This section is empty.
Variables ¶
View Source
var BuildStatus_name = map[int32]string{
0: "PENDING",
1: "PROCESSING",
2: "SUCCESS",
3: "FAILED",
4: "CANCELED",
}
View Source
var BuildStatus_value = map[string]int32{
"PENDING": 0,
"PROCESSING": 1,
"SUCCESS": 2,
"FAILED": 3,
"CANCELED": 4,
}
View Source
var SplitStrategy_name = map[int32]string{
0: "SIZE",
1: "TIME",
}
View Source
var SplitStrategy_value = map[string]int32{
"SIZE": 0,
"TIME": 1,
}
Functions ¶
func RegisterBuildHandler ¶
func RegisterBuildHandler(s server.Server, hdlr BuildHandler, opts ...server.HandlerOption) error
func RegisterCacheHandler ¶
func RegisterCacheHandler(s server.Server, hdlr CacheHandler, opts ...server.HandlerOption) error
func RegisterTaskHandler ¶
func RegisterTaskHandler(s server.Server, hdlr TaskHandler, opts ...server.HandlerOption) error
Types ¶
type Audio ¶
type Audio struct { // 音频文件地址 // 网络地址使用http://或https://前缀 // 内置存储使用file://前缀 File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"` // 时间戳的偏移值, 单位为毫秒 Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` // 持续时间, 单位为毫秒,超出此时间的内容会被截断 Duration int64 `protobuf:"varint,3,opt,name=duration,proto3" json:"duration,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
音频
func (*Audio) Descriptor ¶
func (*Audio) GetDuration ¶ added in v1.0.1
func (*Audio) ProtoMessage ¶
func (*Audio) ProtoMessage()
func (*Audio) XXX_DiscardUnknown ¶
func (m *Audio) XXX_DiscardUnknown()
func (*Audio) XXX_Marshal ¶
func (*Audio) XXX_Unmarshal ¶
type BuildHandler ¶
type BuildHandler interface { // 将多个视频合并为一个视频 Combine(context.Context, *CombineRequest, *BuildResponse) error // 将一个视频切割为多个视频 Split(context.Context, *SplitRequest, *BuildResponse) error // 将图片和音频制作为一个视频 Render(context.Context, *RenderRequest, *BuildResponse) error }
type BuildOptions ¶ added in v1.0.9
type BuildOptions struct { //帧率,默认值为24 Fps int32 `protobuf:"varint,1,opt,name=fps,proto3" json:"fps,omitempty"` //分辨率,默认值为 "1920x1080" Resolution string `protobuf:"bytes,2,opt,name=resolution,proto3" json:"resolution,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BuildOptions) Descriptor ¶ added in v1.0.9
func (*BuildOptions) Descriptor() ([]byte, []int)
func (*BuildOptions) GetFps ¶ added in v1.0.9
func (m *BuildOptions) GetFps() int32
func (*BuildOptions) GetResolution ¶ added in v1.0.10
func (m *BuildOptions) GetResolution() string
func (*BuildOptions) ProtoMessage ¶ added in v1.0.9
func (*BuildOptions) ProtoMessage()
func (*BuildOptions) Reset ¶ added in v1.0.9
func (m *BuildOptions) Reset()
func (*BuildOptions) String ¶ added in v1.0.9
func (m *BuildOptions) String() string
func (*BuildOptions) XXX_DiscardUnknown ¶ added in v1.0.9
func (m *BuildOptions) XXX_DiscardUnknown()
func (*BuildOptions) XXX_Marshal ¶ added in v1.0.9
func (m *BuildOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BuildOptions) XXX_Merge ¶ added in v1.0.9
func (m *BuildOptions) XXX_Merge(src proto.Message)
func (*BuildOptions) XXX_Size ¶ added in v1.0.9
func (m *BuildOptions) XXX_Size() int
func (*BuildOptions) XXX_Unmarshal ¶ added in v1.0.9
func (m *BuildOptions) XXX_Unmarshal(b []byte) error
type BuildResponse ¶
type BuildResponse struct { // 状态 Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // 任务ID TaskID string `protobuf:"bytes,2,opt,name=taskID,proto3" json:"taskID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
构建回复
func (*BuildResponse) Descriptor ¶
func (*BuildResponse) Descriptor() ([]byte, []int)
func (*BuildResponse) GetStatus ¶
func (m *BuildResponse) GetStatus() *Status
func (*BuildResponse) GetTaskID ¶
func (m *BuildResponse) GetTaskID() string
func (*BuildResponse) ProtoMessage ¶
func (*BuildResponse) ProtoMessage()
func (*BuildResponse) Reset ¶
func (m *BuildResponse) Reset()
func (*BuildResponse) String ¶
func (m *BuildResponse) String() string
func (*BuildResponse) XXX_DiscardUnknown ¶
func (m *BuildResponse) XXX_DiscardUnknown()
func (*BuildResponse) XXX_Marshal ¶
func (m *BuildResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BuildResponse) XXX_Merge ¶
func (m *BuildResponse) XXX_Merge(src proto.Message)
func (*BuildResponse) XXX_Size ¶
func (m *BuildResponse) XXX_Size() int
func (*BuildResponse) XXX_Unmarshal ¶
func (m *BuildResponse) XXX_Unmarshal(b []byte) error
type BuildService ¶
type BuildService interface { // 将多个视频合并为一个视频 Combine(ctx context.Context, in *CombineRequest, opts ...client.CallOption) (*BuildResponse, error) // 将一个视频切割为多个视频 Split(ctx context.Context, in *SplitRequest, opts ...client.CallOption) (*BuildResponse, error) // 将图片和音频制作为一个视频 Render(ctx context.Context, in *RenderRequest, opts ...client.CallOption) (*BuildResponse, error) }
func NewBuildService ¶
func NewBuildService(name string, c client.Client) BuildService
type BuildStatus ¶
type BuildStatus int32
构建状态
const ( BuildStatus_PENDING BuildStatus = 0 BuildStatus_PROCESSING BuildStatus = 1 BuildStatus_SUCCESS BuildStatus = 2 BuildStatus_FAILED BuildStatus = 3 BuildStatus_CANCELED BuildStatus = 4 )
func (BuildStatus) EnumDescriptor ¶
func (BuildStatus) EnumDescriptor() ([]byte, []int)
func (BuildStatus) String ¶
func (x BuildStatus) String() string
type CacheHandler ¶
type CacheHandler interface { // 将数据转存为文件 Save(context.Context, *SaveRequest, *CacheResponse) error // 将数据转存为文件 StreamSave(context.Context, Cache_StreamSaveStream) error }
type CacheResponse ¶
type CacheResponse struct { // 状态 Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // 文件地址,以file://为前缀 File string `protobuf:"bytes,2,opt,name=file,proto3" json:"file,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
缓存回复
func (*CacheResponse) Descriptor ¶
func (*CacheResponse) Descriptor() ([]byte, []int)
func (*CacheResponse) GetFile ¶
func (m *CacheResponse) GetFile() string
func (*CacheResponse) GetStatus ¶
func (m *CacheResponse) GetStatus() *Status
func (*CacheResponse) ProtoMessage ¶
func (*CacheResponse) ProtoMessage()
func (*CacheResponse) Reset ¶
func (m *CacheResponse) Reset()
func (*CacheResponse) String ¶
func (m *CacheResponse) String() string
func (*CacheResponse) XXX_DiscardUnknown ¶
func (m *CacheResponse) XXX_DiscardUnknown()
func (*CacheResponse) XXX_Marshal ¶
func (m *CacheResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CacheResponse) XXX_Merge ¶
func (m *CacheResponse) XXX_Merge(src proto.Message)
func (*CacheResponse) XXX_Size ¶
func (m *CacheResponse) XXX_Size() int
func (*CacheResponse) XXX_Unmarshal ¶
func (m *CacheResponse) XXX_Unmarshal(b []byte) error
type CacheService ¶
type CacheService interface { // 将数据转存为文件 Save(ctx context.Context, in *SaveRequest, opts ...client.CallOption) (*CacheResponse, error) // 将数据转存为文件 StreamSave(ctx context.Context, opts ...client.CallOption) (Cache_StreamSaveService, error) }
func NewCacheService ¶
func NewCacheService(name string, c client.Client) CacheService
type Cache_StreamSaveService ¶ added in v1.0.13
type Cache_StreamSaveStream ¶ added in v1.0.13
type CancelRequest ¶
type CancelRequest struct { // 任务ID TaskID string `protobuf:"bytes,1,opt,name=taskID,proto3" json:"taskID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
取消请求
func (*CancelRequest) Descriptor ¶
func (*CancelRequest) Descriptor() ([]byte, []int)
func (*CancelRequest) GetTaskID ¶
func (m *CancelRequest) GetTaskID() string
func (*CancelRequest) ProtoMessage ¶
func (*CancelRequest) ProtoMessage()
func (*CancelRequest) Reset ¶
func (m *CancelRequest) Reset()
func (*CancelRequest) String ¶
func (m *CancelRequest) String() string
func (*CancelRequest) XXX_DiscardUnknown ¶
func (m *CancelRequest) XXX_DiscardUnknown()
func (*CancelRequest) XXX_Marshal ¶
func (m *CancelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CancelRequest) XXX_Merge ¶
func (m *CancelRequest) XXX_Merge(src proto.Message)
func (*CancelRequest) XXX_Size ¶
func (m *CancelRequest) XXX_Size() int
func (*CancelRequest) XXX_Unmarshal ¶
func (m *CancelRequest) XXX_Unmarshal(b []byte) error
type CancelResponse ¶
type CancelResponse struct { // 状态 Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
取消回复
func (*CancelResponse) Descriptor ¶
func (*CancelResponse) Descriptor() ([]byte, []int)
func (*CancelResponse) GetStatus ¶
func (m *CancelResponse) GetStatus() *Status
func (*CancelResponse) ProtoMessage ¶
func (*CancelResponse) ProtoMessage()
func (*CancelResponse) Reset ¶
func (m *CancelResponse) Reset()
func (*CancelResponse) String ¶
func (m *CancelResponse) String() string
func (*CancelResponse) XXX_DiscardUnknown ¶
func (m *CancelResponse) XXX_DiscardUnknown()
func (*CancelResponse) XXX_Marshal ¶
func (m *CancelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CancelResponse) XXX_Merge ¶
func (m *CancelResponse) XXX_Merge(src proto.Message)
func (*CancelResponse) XXX_Size ¶
func (m *CancelResponse) XXX_Size() int
func (*CancelResponse) XXX_Unmarshal ¶
func (m *CancelResponse) XXX_Unmarshal(b []byte) error
type CombineRequest ¶
type CombineRequest struct { // 视频文件地址 // 网络地址使用http://或https://前缀 // 内置存储使用file://前缀 Video []string `protobuf:"bytes,1,rep,name=video,proto3" json:"video,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
合并请求
func (*CombineRequest) Descriptor ¶
func (*CombineRequest) Descriptor() ([]byte, []int)
func (*CombineRequest) GetVideo ¶
func (m *CombineRequest) GetVideo() []string
func (*CombineRequest) ProtoMessage ¶
func (*CombineRequest) ProtoMessage()
func (*CombineRequest) Reset ¶
func (m *CombineRequest) Reset()
func (*CombineRequest) String ¶
func (m *CombineRequest) String() string
func (*CombineRequest) XXX_DiscardUnknown ¶
func (m *CombineRequest) XXX_DiscardUnknown()
func (*CombineRequest) XXX_Marshal ¶
func (m *CombineRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CombineRequest) XXX_Merge ¶
func (m *CombineRequest) XXX_Merge(src proto.Message)
func (*CombineRequest) XXX_Size ¶
func (m *CombineRequest) XXX_Size() int
func (*CombineRequest) XXX_Unmarshal ¶
func (m *CombineRequest) XXX_Unmarshal(b []byte) error
type Image ¶
type Image struct { // 图片文件地址 // 网络地址使用http://或https://前缀 // 内置存储使用file://前缀 File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"` // 时间戳的偏移值, 单位为毫秒 Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` // 持续时间, 单位为毫秒,超出此时间的内容会被截断 Duration int64 `protobuf:"varint,3,opt,name=duration,proto3" json:"duration,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
图片
func (*Image) Descriptor ¶
func (*Image) GetDuration ¶ added in v1.0.1
func (*Image) ProtoMessage ¶
func (*Image) ProtoMessage()
func (*Image) XXX_DiscardUnknown ¶
func (m *Image) XXX_DiscardUnknown()
func (*Image) XXX_Marshal ¶
func (*Image) XXX_Unmarshal ¶
type Notification ¶ added in v1.0.3
type Notification struct { // 任务ID TaskID string `protobuf:"bytes,1,opt,name=taskID,proto3" json:"taskID,omitempty"` // 状态 Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // 消息 Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
通知
func (*Notification) Descriptor ¶ added in v1.0.3
func (*Notification) Descriptor() ([]byte, []int)
func (*Notification) GetMessage ¶ added in v1.0.14
func (m *Notification) GetMessage() string
func (*Notification) GetStatus ¶ added in v1.0.3
func (m *Notification) GetStatus() string
func (*Notification) GetTaskID ¶ added in v1.0.3
func (m *Notification) GetTaskID() string
func (*Notification) ProtoMessage ¶ added in v1.0.3
func (*Notification) ProtoMessage()
func (*Notification) Reset ¶ added in v1.0.3
func (m *Notification) Reset()
func (*Notification) String ¶ added in v1.0.3
func (m *Notification) String() string
func (*Notification) XXX_DiscardUnknown ¶ added in v1.0.3
func (m *Notification) XXX_DiscardUnknown()
func (*Notification) XXX_Marshal ¶ added in v1.0.3
func (m *Notification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Notification) XXX_Merge ¶ added in v1.0.3
func (m *Notification) XXX_Merge(src proto.Message)
func (*Notification) XXX_Size ¶ added in v1.0.3
func (m *Notification) XXX_Size() int
func (*Notification) XXX_Unmarshal ¶ added in v1.0.3
func (m *Notification) XXX_Unmarshal(b []byte) error
type QueryRequest ¶
type QueryRequest struct { // 任务ID TaskID string `protobuf:"bytes,1,opt,name=taskID,proto3" json:"taskID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
查询请求
func (*QueryRequest) Descriptor ¶
func (*QueryRequest) Descriptor() ([]byte, []int)
func (*QueryRequest) GetTaskID ¶
func (m *QueryRequest) GetTaskID() string
func (*QueryRequest) ProtoMessage ¶
func (*QueryRequest) ProtoMessage()
func (*QueryRequest) Reset ¶
func (m *QueryRequest) Reset()
func (*QueryRequest) String ¶
func (m *QueryRequest) String() string
func (*QueryRequest) XXX_DiscardUnknown ¶
func (m *QueryRequest) XXX_DiscardUnknown()
func (*QueryRequest) XXX_Marshal ¶
func (m *QueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryRequest) XXX_Merge ¶
func (m *QueryRequest) XXX_Merge(src proto.Message)
func (*QueryRequest) XXX_Size ¶
func (m *QueryRequest) XXX_Size() int
func (*QueryRequest) XXX_Unmarshal ¶
func (m *QueryRequest) XXX_Unmarshal(b []byte) error
type QueryResponse ¶
type QueryResponse struct { // 状态 Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // 构建状态 BuildStatus BuildStatus `protobuf:"varint,2,opt,name=buildStatus,proto3,enum=video.BuildStatus" json:"buildStatus,omitempty"` // 构建日志 BuildLog string `protobuf:"bytes,3,opt,name=buildLog,proto3" json:"buildLog,omitempty"` // 视频的存放地址,仅当构建成功时有值 Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` // 任务创建时间 CreatedAt int64 `protobuf:"varint,10,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // 任务更新时间 UpdatedAt int64 `protobuf:"varint,11,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
查询回复
func (*QueryResponse) Descriptor ¶
func (*QueryResponse) Descriptor() ([]byte, []int)
func (*QueryResponse) GetBuildLog ¶ added in v1.0.15
func (m *QueryResponse) GetBuildLog() string
func (*QueryResponse) GetBuildStatus ¶
func (m *QueryResponse) GetBuildStatus() BuildStatus
func (*QueryResponse) GetCreatedAt ¶
func (m *QueryResponse) GetCreatedAt() int64
func (*QueryResponse) GetStatus ¶
func (m *QueryResponse) GetStatus() *Status
func (*QueryResponse) GetUpdatedAt ¶
func (m *QueryResponse) GetUpdatedAt() int64
func (*QueryResponse) GetUrl ¶ added in v1.0.2
func (m *QueryResponse) GetUrl() string
func (*QueryResponse) ProtoMessage ¶
func (*QueryResponse) ProtoMessage()
func (*QueryResponse) Reset ¶
func (m *QueryResponse) Reset()
func (*QueryResponse) String ¶
func (m *QueryResponse) String() string
func (*QueryResponse) XXX_DiscardUnknown ¶
func (m *QueryResponse) XXX_DiscardUnknown()
func (*QueryResponse) XXX_Marshal ¶
func (m *QueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryResponse) XXX_Merge ¶
func (m *QueryResponse) XXX_Merge(src proto.Message)
func (*QueryResponse) XXX_Size ¶
func (m *QueryResponse) XXX_Size() int
func (*QueryResponse) XXX_Unmarshal ¶
func (m *QueryResponse) XXX_Unmarshal(b []byte) error
type RenderRequest ¶
type RenderRequest struct { // 图片集 Image []*Image `protobuf:"bytes,1,rep,name=image,proto3" json:"image,omitempty"` // 音频集 Audio []*Audio `protobuf:"bytes,2,rep,name=audio,proto3" json:"audio,omitempty"` // 视频的时长,如果此值为0,将使用图片和视频较大的duration值作为整个视频的时长 Duration int64 `protobuf:"varint,3,opt,name=duration,proto3" json:"duration,omitempty"` // 构建选项 Options *BuildOptions `protobuf:"bytes,10,opt,name=options,proto3" json:"options,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
渲染请求
func (*RenderRequest) Descriptor ¶
func (*RenderRequest) Descriptor() ([]byte, []int)
func (*RenderRequest) GetAudio ¶
func (m *RenderRequest) GetAudio() []*Audio
func (*RenderRequest) GetDuration ¶ added in v1.0.8
func (m *RenderRequest) GetDuration() int64
func (*RenderRequest) GetImage ¶
func (m *RenderRequest) GetImage() []*Image
func (*RenderRequest) GetOptions ¶ added in v1.0.9
func (m *RenderRequest) GetOptions() *BuildOptions
func (*RenderRequest) ProtoMessage ¶
func (*RenderRequest) ProtoMessage()
func (*RenderRequest) Reset ¶
func (m *RenderRequest) Reset()
func (*RenderRequest) String ¶
func (m *RenderRequest) String() string
func (*RenderRequest) XXX_DiscardUnknown ¶
func (m *RenderRequest) XXX_DiscardUnknown()
func (*RenderRequest) XXX_Marshal ¶
func (m *RenderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RenderRequest) XXX_Merge ¶
func (m *RenderRequest) XXX_Merge(src proto.Message)
func (*RenderRequest) XXX_Size ¶
func (m *RenderRequest) XXX_Size() int
func (*RenderRequest) XXX_Unmarshal ¶
func (m *RenderRequest) XXX_Unmarshal(b []byte) error
type SaveRequest ¶
type SaveRequest struct { // 字节数据 Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // 文件扩展名,不包含.号 Extension string `protobuf:"bytes,2,opt,name=extension,proto3" json:"extension,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
保存请求
func (*SaveRequest) Descriptor ¶
func (*SaveRequest) Descriptor() ([]byte, []int)
func (*SaveRequest) GetData ¶
func (m *SaveRequest) GetData() []byte
func (*SaveRequest) GetExtension ¶ added in v1.0.4
func (m *SaveRequest) GetExtension() string
func (*SaveRequest) ProtoMessage ¶
func (*SaveRequest) ProtoMessage()
func (*SaveRequest) Reset ¶
func (m *SaveRequest) Reset()
func (*SaveRequest) String ¶
func (m *SaveRequest) String() string
func (*SaveRequest) XXX_DiscardUnknown ¶
func (m *SaveRequest) XXX_DiscardUnknown()
func (*SaveRequest) XXX_Marshal ¶
func (m *SaveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SaveRequest) XXX_Merge ¶
func (m *SaveRequest) XXX_Merge(src proto.Message)
func (*SaveRequest) XXX_Size ¶
func (m *SaveRequest) XXX_Size() int
func (*SaveRequest) XXX_Unmarshal ¶
func (m *SaveRequest) XXX_Unmarshal(b []byte) error
type SplitRequest ¶
type SplitRequest struct { // 视频文件地址 // 网络地址使用http://或https://前缀 // 内置存储使用file://前缀 Video string `protobuf:"bytes,1,opt,name=video,proto3" json:"video,omitempty"` // 切割策略 Strategy SplitStrategy `protobuf:"varint,2,opt,name=strategy,proto3,enum=video.SplitStrategy" json:"strategy,omitempty"` // 切割因子,strategy=SIZE时,此值的单位是字节,strategy=TIME时,此值的单位时秒 Factor int32 `protobuf:"varint,3,opt,name=factor,proto3" json:"factor,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
切割请求
func (*SplitRequest) Descriptor ¶
func (*SplitRequest) Descriptor() ([]byte, []int)
func (*SplitRequest) GetFactor ¶
func (m *SplitRequest) GetFactor() int32
func (*SplitRequest) GetStrategy ¶
func (m *SplitRequest) GetStrategy() SplitStrategy
func (*SplitRequest) GetVideo ¶
func (m *SplitRequest) GetVideo() string
func (*SplitRequest) ProtoMessage ¶
func (*SplitRequest) ProtoMessage()
func (*SplitRequest) Reset ¶
func (m *SplitRequest) Reset()
func (*SplitRequest) String ¶
func (m *SplitRequest) String() string
func (*SplitRequest) XXX_DiscardUnknown ¶
func (m *SplitRequest) XXX_DiscardUnknown()
func (*SplitRequest) XXX_Marshal ¶
func (m *SplitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SplitRequest) XXX_Merge ¶
func (m *SplitRequest) XXX_Merge(src proto.Message)
func (*SplitRequest) XXX_Size ¶
func (m *SplitRequest) XXX_Size() int
func (*SplitRequest) XXX_Unmarshal ¶
func (m *SplitRequest) XXX_Unmarshal(b []byte) error
type SplitStrategy ¶
type SplitStrategy int32
切割策略
const ( SplitStrategy_SIZE SplitStrategy = 0 SplitStrategy_TIME SplitStrategy = 1 )
func (SplitStrategy) EnumDescriptor ¶
func (SplitStrategy) EnumDescriptor() ([]byte, []int)
func (SplitStrategy) String ¶
func (x SplitStrategy) String() string
type Status ¶
type Status struct { // 状态码,0代表正常 Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // 信息, 状态码等于0时为空 Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
状态
func (*Status) Descriptor ¶
func (*Status) GetMessage ¶
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) XXX_DiscardUnknown ¶
func (m *Status) XXX_DiscardUnknown()
func (*Status) XXX_Marshal ¶
func (*Status) XXX_Unmarshal ¶
type StreamSaveRequest ¶ added in v1.0.13
type StreamSaveRequest struct { // 字节数据 Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // 文件扩展名,不包含.号 Extension string `protobuf:"bytes,2,opt,name=extension,proto3" json:"extension,omitempty"` // 整个数据包的大小 Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
保存请求
func (*StreamSaveRequest) Descriptor ¶ added in v1.0.13
func (*StreamSaveRequest) Descriptor() ([]byte, []int)
func (*StreamSaveRequest) GetData ¶ added in v1.0.13
func (m *StreamSaveRequest) GetData() []byte
func (*StreamSaveRequest) GetExtension ¶ added in v1.0.13
func (m *StreamSaveRequest) GetExtension() string
func (*StreamSaveRequest) GetSize ¶ added in v1.0.13
func (m *StreamSaveRequest) GetSize() int64
func (*StreamSaveRequest) ProtoMessage ¶ added in v1.0.13
func (*StreamSaveRequest) ProtoMessage()
func (*StreamSaveRequest) Reset ¶ added in v1.0.13
func (m *StreamSaveRequest) Reset()
func (*StreamSaveRequest) String ¶ added in v1.0.13
func (m *StreamSaveRequest) String() string
func (*StreamSaveRequest) XXX_DiscardUnknown ¶ added in v1.0.13
func (m *StreamSaveRequest) XXX_DiscardUnknown()
func (*StreamSaveRequest) XXX_Marshal ¶ added in v1.0.13
func (m *StreamSaveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StreamSaveRequest) XXX_Merge ¶ added in v1.0.13
func (m *StreamSaveRequest) XXX_Merge(src proto.Message)
func (*StreamSaveRequest) XXX_Size ¶ added in v1.0.13
func (m *StreamSaveRequest) XXX_Size() int
func (*StreamSaveRequest) XXX_Unmarshal ¶ added in v1.0.13
func (m *StreamSaveRequest) XXX_Unmarshal(b []byte) error
type TakeRequest ¶ added in v1.0.6
type TakeRequest struct { // 任务ID TaskID string `protobuf:"bytes,1,opt,name=taskID,proto3" json:"taskID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
取走请求
func (*TakeRequest) Descriptor ¶ added in v1.0.6
func (*TakeRequest) Descriptor() ([]byte, []int)
func (*TakeRequest) GetTaskID ¶ added in v1.0.6
func (m *TakeRequest) GetTaskID() string
func (*TakeRequest) ProtoMessage ¶ added in v1.0.6
func (*TakeRequest) ProtoMessage()
func (*TakeRequest) Reset ¶ added in v1.0.6
func (m *TakeRequest) Reset()
func (*TakeRequest) String ¶ added in v1.0.6
func (m *TakeRequest) String() string
func (*TakeRequest) XXX_DiscardUnknown ¶ added in v1.0.6
func (m *TakeRequest) XXX_DiscardUnknown()
func (*TakeRequest) XXX_Marshal ¶ added in v1.0.6
func (m *TakeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TakeRequest) XXX_Merge ¶ added in v1.0.6
func (m *TakeRequest) XXX_Merge(src proto.Message)
func (*TakeRequest) XXX_Size ¶ added in v1.0.6
func (m *TakeRequest) XXX_Size() int
func (*TakeRequest) XXX_Unmarshal ¶ added in v1.0.6
func (m *TakeRequest) XXX_Unmarshal(b []byte) error
type TakeResponse ¶ added in v1.0.6
type TakeResponse struct { // 状态 Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // 文件数据 Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
取走回复
func (*TakeResponse) Descriptor ¶ added in v1.0.6
func (*TakeResponse) Descriptor() ([]byte, []int)
func (*TakeResponse) GetData ¶ added in v1.0.7
func (m *TakeResponse) GetData() []byte
func (*TakeResponse) GetStatus ¶ added in v1.0.6
func (m *TakeResponse) GetStatus() *Status
func (*TakeResponse) ProtoMessage ¶ added in v1.0.6
func (*TakeResponse) ProtoMessage()
func (*TakeResponse) Reset ¶ added in v1.0.6
func (m *TakeResponse) Reset()
func (*TakeResponse) String ¶ added in v1.0.6
func (m *TakeResponse) String() string
func (*TakeResponse) XXX_DiscardUnknown ¶ added in v1.0.6
func (m *TakeResponse) XXX_DiscardUnknown()
func (*TakeResponse) XXX_Marshal ¶ added in v1.0.6
func (m *TakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TakeResponse) XXX_Merge ¶ added in v1.0.6
func (m *TakeResponse) XXX_Merge(src proto.Message)
func (*TakeResponse) XXX_Size ¶ added in v1.0.6
func (m *TakeResponse) XXX_Size() int
func (*TakeResponse) XXX_Unmarshal ¶ added in v1.0.6
func (m *TakeResponse) XXX_Unmarshal(b []byte) error
type TaskHandler ¶
type TaskHandler interface { // 查询 Query(context.Context, *QueryRequest, *QueryResponse) error // 取消 Cancel(context.Context, *CancelRequest, *CancelResponse) error // 取走合成完的文件,取走后文件将被删除 Take(context.Context, *TakeRequest, *TakeResponse) error }
type TaskService ¶
type TaskService interface { // 查询 Query(ctx context.Context, in *QueryRequest, opts ...client.CallOption) (*QueryResponse, error) // 取消 Cancel(ctx context.Context, in *CancelRequest, opts ...client.CallOption) (*CancelResponse, error) // 取走合成完的文件,取走后文件将被删除 Take(ctx context.Context, in *TakeRequest, opts ...client.CallOption) (*TakeResponse, error) }
func NewTaskService ¶
func NewTaskService(name string, c client.Client) TaskService
Click to show internal directories.
Click to hide internal directories.