download

package
v0.0.0-...-2ee1e15 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func DefaultClient

func DefaultClient() *Client

func NewClient

func NewClient(api *api.CivitaiClient) *Client

func (*Client) ModelDownloadByID

func (c *Client) ModelDownloadByID(ctx context.Context, modelID, targetDir string, opts ...*ModelDownloadOption) error

ModelDownloadByID 下载指定 modelID 的模型文件 - 所有版本

type ModelDownloadOption

type ModelDownloadOption struct {
	DownloadBatchSize uint32
	// DownloadTimeoutSec is the timeout for downloading a file in seconds.
	DownloadTimeoutSec uint32
	// VersionIDList is a list of version id to download. If empty, download all versions.
	VersionIDList []int64
	// VersionNameList is a list of version name to download. If empty, download all versions.
	VersionNameList []string
	// FileIDList is a list of file id to download. If empty, download all files.
	FileIDList []int64
	// FileNameList is a list of file name to download. If empty, download all files.
	FileNameList []string
}

Jump to

Keyboard shortcuts

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