api

package
v0.0.0-...-1b9946f Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: Apache-2.0, MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCompiler

func RegisterCompiler(server *otohttp.Server, compiler Compiler)

Types

type Compile

type Compile struct {
	ProjectID string `json:"projectID"`
	All       bool   `json:"all"`
}

type Compiler

type Compiler interface {
	Compile(context.Context, Compile) (*Void, error)
	GetDataset(context.Context, GetDatasetRequest) (*Dataset, error)
	ResolveProjectsForVideo(context.Context, ResolveProjectsForVideoRequest) (*ResolveProjectsForVideoResponse, error)
}

func NewCompilerClient

func NewCompilerClient(
	endpoint string,
	options ...*CompilerClientOptions,
) Compiler

func NewCompilerClientFromOptions

func NewCompilerClientFromOptions(opts base.ServiceOptions) Compiler

type CompilerClientOptions

type CompilerClientOptions struct {
	// contains filtered or unexported fields
}

func NewCompilerClientOptions

func NewCompilerClientOptions() *CompilerClientOptions

func (*CompilerClientOptions) SetBasicAuth

func (o *CompilerClientOptions) SetBasicAuth(username, password string) *CompilerClientOptions

func (*CompilerClientOptions) SetTimeout

func (o *CompilerClientOptions) SetTimeout(timeout time.Duration) *CompilerClientOptions

func (*CompilerClientOptions) SetTransport

func (o *CompilerClientOptions) SetTransport(transport http.RoundTripper) *CompilerClientOptions

type Dataset

type Dataset struct {
	ID        string   `json:"id"`
	Timestamp int64    `json:"timestamp"`
	Complete  bool     `json:"complete"`
	Videos    []*Video `json:"videos"`
	Error     string   `json:"error,omitempty"`
}

type GetDatasetRequest

type GetDatasetRequest struct {
	ID        string `json:"id"`
	ProjectID string `json:"projectID"`
}

type ResolveProjectsForVideoRequest

type ResolveProjectsForVideoRequest struct {
	VideoID string `json:"videoID"`
}

type ResolveProjectsForVideoResponse

type ResolveProjectsForVideoResponse struct {
	ProjectIDs []string `json:"projectIDs"`
	Error      string   `json:"error,omitempty"`
}

type Video

type Video struct {
	ID      string        `json:"id"`
	Details *VideoDetails `json:"details"`
	Source  *VideoSource  `json:"source"`
}

type VideoDetails

type VideoDetails struct {
	ID          string `json:"id"`
	Title       string `json:"title"`
	Description string `json:"description"`
	Thumbnail   string `json:"thumbnail"`
	UploadDate  string `json:"uploadDate"`
	Uploader    string `json:"uploader"`
	UploaderID  string `json:"uploaderID"`
	Channel     string `json:"channel"`
	ChannelID   string `json:"channelID"`
	Duration    int64  `json:"duration"`
	ViewCount   int64  `json:"viewCount"`
	Width       int    `json:"width"`
	Height      int    `json:"height"`
	FPS         int    `json:"fPS"`
}

type VideoSource

type VideoSource struct {
	Type        string `json:"type"`
	ID          string `json:"id"`
	SubmitterID string `json:"submitterID"`
	Submitted   int64  `json:"submitted"`
}

type Void

type Void struct {
	Error string `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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