model

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ItemTypeValues = []string{"video", "image"}

ItemTypeValues string values

Functions

This section is empty.

Types

type ItemType

type ItemType int

ItemType for thumbnail generation

const (
	// TypeVideo video type
	TypeVideo ItemType = iota
	// TypeImage image type
	TypeImage
)

func ParseItemType

func ParseItemType(value string) (ItemType, error)

ParseItemType parse raw string into a ItemType

func (ItemType) MarshalJSON

func (it ItemType) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (ItemType) String

func (it ItemType) String() string

func (*ItemType) UnmarshalJSON

func (it *ItemType) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshal JSOn

type Request

type Request struct {
	Input    string   `json:"input"`
	Output   string   `json:"output"`
	Scale    uint64   `json:"scale"`
	ItemType ItemType `json:"type"`
}

Request for generating stream

func NewRequest

func NewRequest(input, output string, itemType ItemType, scale uint64) Request

NewRequest creates a new request

Jump to

Keyboard shortcuts

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