mrlib

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallEachFunc added in v0.13.0

func CallEachFunc(ctx context.Context, list []func(ctx context.Context))

func CheckImage added in v0.12.0

func CheckImage(file io.ReadSeeker, expectedContentType string) error

func Close added in v0.13.0

func Close(ctx context.Context, object io.Closer)

func CloseFunc added in v0.13.0

func CloseFunc(object io.Closer) func(ctx context.Context)

func DecodeImage added in v0.12.0

func DecodeImage(file io.ReadSeeker, expectedContentType string) (image.Image, error)

func DecodeImageConfig added in v0.12.0

func DecodeImageConfig(file io.ReadSeeker, expectedContentType string) (image.Config, error)

func Int2ip

func Int2ip(number uint32) net.IP

func Ip2int

func Ip2int(ip net.IP) (uint32, error)

func Ip2intMust

func Ip2intMust(ip net.IP) uint32

func MimeType added in v0.9.6

func MimeType(value, fileName string) string

MimeType - возвращает value если оно не пустое иначе вычисляется тип по расширению файла

func MimeTypeByExt added in v0.5.4

func MimeTypeByExt(ext string) string

func MimeTypeByFile added in v0.9.6

func MimeTypeByFile(name string) string

Types

type BuilderPath added in v0.7.0

type BuilderPath interface {
	FullPath(path string) string
}

func NewBuilderPath added in v0.7.0

func NewBuilderPath(basePath string) BuilderPath

NewBuilderPath - sample /dir/{{path}}/postfix -> /dir/real-value/postfix

func NewBuilderPathWithPlaceholder added in v0.8.0

func NewBuilderPathWithPlaceholder(basePath, placeholder string) BuilderPath

Jump to

Keyboard shortcuts

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