valueobject

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileName

type FileName string

FileName 文件名领域值对象

func (FileName) NameIndex

func (f FileName) NameIndex() string

NameIndex 生成文件名索引

func (FileName) String

func (f FileName) String() string

func (FileName) Validate

func (f FileName) Validate() error

type MediaType

type MediaType uint8

MediaType 文件媒体类型

const (
	MediaTypeImage      MediaType = iota + 1 // 图片
	MediaTypeVideo                           // 视频
	MediaTypeAudio                           // 音频
	MediaTypeDocument                        // 文档
	MediaTypeCompressed                      // 压缩文件
)

func (MediaType) String

func (t MediaType) String() string

String 获取媒体类型描述

func (MediaType) ToInt

func (t MediaType) ToInt() uint8

ToInt 转换为整数

Jump to

Keyboard shortcuts

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