runway

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToS3URL added in v1.4.0

func ToS3URL(u string) (string, error)

Types

type Client

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

func New

func New(cfg *Config) (*Client, error)

func (*Client) Delete added in v1.4.0

func (c *Client) Delete(ctx context.Context, assetID string) error

func (*Client) DeleteAsset

func (c *Client) DeleteAsset(ctx context.Context, id string) error

func (*Client) Download added in v1.4.0

func (c *Client) Download(ctx context.Context, u, output string) error

func (*Client) Generate

func (c *Client) Generate(ctx context.Context, cfg *GenerateRequest) (*Generation, error)

func (*Client) GetAsset added in v1.3.0

func (c *Client) GetAsset(ctx context.Context, id string) (string, string, []string, error)

func (*Client) Upload

func (c *Client) Upload(ctx context.Context, name string, data []byte) (string, string, error)

type Config

type Config struct {
	Token  string
	Wait   time.Duration
	Debug  bool
	Proxy  string
	Folder string
}

type Error added in v1.4.0

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

func (*Error) Debug added in v1.4.0

func (e *Error) Debug() string

func (*Error) Error added in v1.4.0

func (e *Error) Error() string

func (*Error) Reason added in v1.4.0

func (e *Error) Reason() string

func (*Error) Temporary added in v1.4.0

func (e *Error) Temporary() bool

func (*Error) Unknown added in v1.4.0

func (e *Error) Unknown() bool

type GenerateRequest added in v1.4.0

type GenerateRequest struct {
	Model       string
	AssetURL    string
	AssetName   string
	Prompt      string
	Interpolate bool
	Upscale     bool
	Watermark   bool
	Extend      bool
	Width       int
	Height      int
	Portrait    bool
	ExploreMode bool
	LastFrame   bool
	Seconds     int
}

type Generation added in v1.4.0

type Generation struct {
	ID          string   `json:"id"`
	URL         string   `json:"url"`
	S3URL       string   `json:"s3Url"`
	PreviewURLs []string `json:"previewUrls"`
}

Jump to

Keyboard shortcuts

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