pipeline

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContentTypeByLimitInfo = map[string]LimitSizeInfo{
	"comic": {
		Image:     ImageSize{Width: 1600, Size: 10240},
		Thumbnail: ThumbnailSize{Width: 500, Size: 51200},
	},
	"magazine_comic": {
		Image:     ImageSize{Width: 2266, Size: 30720},
		Thumbnail: ThumbnailSize{Width: 500, Size: 51200},
	},
}

Functions

func CheckImage added in v1.2.2

func CheckImage(in <-chan map[string][]ImageInfo, info LimitSizeInfo) <-chan ImageInfo

func Decode

func Decode(in <-chan map[string][]FileInfo) <-chan map[string][]ImageInfo

func FormatFileSize

func FormatFileSize(bytes int64) string

func Load

func Load(dir string) <-chan map[string][]FileInfo

func Rename

func Rename(in <-chan map[string][]FileInfo, n int) <-chan map[string][]FileInfo

Types

type FileInfo

type FileInfo struct {
	Full        string
	Path        string
	Name        string
	Ext         string
	Size        int64
	IsMissmatch bool
}

type ImageInfo

type ImageInfo struct {
	Full        string
	Path        string
	Name        string
	Size        int64
	Image       image.Image
	Format      string
	IsStandard  bool
	IsMissmatch bool
	IsThumbnail bool
}

type ImageSize added in v1.2.2

type ImageSize struct {
	Width int
	Size  int64
}

type LimitSizeInfo

type LimitSizeInfo struct {
	Image     ImageSize
	Thumbnail ThumbnailSize
}

type ThumbnailSize added in v1.2.2

type ThumbnailSize struct {
	Width int
	Size  int64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳