tkValueObject

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2025 License: MIT Imports: 7 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IpAddressLocal = IpAddress("127.0.0.1")
View Source
var ValidCompressionFormats = []string{
	"tar", "gzip", "zip", "xz", "br",
}

Functions

This section is empty.

Types

type CidrBlock

type CidrBlock string

func NewCidrBlock

func NewCidrBlock(value any) (cidrBlock CidrBlock, err error)

func (CidrBlock) IsIpv4

func (vo CidrBlock) IsIpv4() bool

func (CidrBlock) IsIpv6

func (vo CidrBlock) IsIpv6() bool

func (CidrBlock) IsPrivate

func (vo CidrBlock) IsPrivate() bool

func (CidrBlock) IsPublic

func (vo CidrBlock) IsPublic() bool

func (CidrBlock) String

func (vo CidrBlock) String() string

type CompressionFormat added in v0.0.7

type CompressionFormat string
const (
	CompressionFormatTarball CompressionFormat = "tar"
	CompressionFormatGzip    CompressionFormat = "gzip"
	CompressionFormatZip     CompressionFormat = "zip"
	CompressionFormatXz      CompressionFormat = "xz"
	CompressionFormatBrotli  CompressionFormat = "br"
)

func NewCompressionFormat added in v0.0.7

func NewCompressionFormat(value any) (CompressionFormat, error)

func (CompressionFormat) String added in v0.0.7

func (vo CompressionFormat) String() string

type IpAddress

type IpAddress string

func NewIpAddress

func NewIpAddress(value any) (ipAddress IpAddress, err error)

func (IpAddress) IsIpv4

func (vo IpAddress) IsIpv4() bool

func (IpAddress) IsIpv6

func (vo IpAddress) IsIpv6() bool

func (IpAddress) IsLocal

func (vo IpAddress) IsLocal() bool

func (IpAddress) IsPrivate

func (vo IpAddress) IsPrivate() bool

func (IpAddress) IsPublic

func (vo IpAddress) IsPublic() bool

func (IpAddress) String

func (vo IpAddress) String() string

func (IpAddress) ToCidrBlock

func (vo IpAddress) ToCidrBlock() CidrBlock

type MailAddress

type MailAddress string

func NewMailAddress

func NewMailAddress(value any) (mailAddress MailAddress, err error)

func (MailAddress) String

func (vo MailAddress) String() string

type UnixTime added in v0.0.4

type UnixTime int64

func NewUnixTime added in v0.0.4

func NewUnixTime(value any) (unixTime UnixTime, err error)

func NewUnixTimeAfterNow added in v0.0.4

func NewUnixTimeAfterNow(duration time.Duration) UnixTime

func NewUnixTimeBeforeNow added in v0.0.4

func NewUnixTimeBeforeNow(duration time.Duration) UnixTime

func NewUnixTimeNow added in v0.0.4

func NewUnixTimeNow() UnixTime

func NewUnixTimeWithGoTime added in v0.0.4

func NewUnixTimeWithGoTime(goTime time.Time) UnixTime

func (UnixTime) Int64 added in v0.0.4

func (vo UnixTime) Int64() int64

func (UnixTime) IsBetween added in v0.0.6

func (vo UnixTime) IsBetween(startDate, endDate UnixTime) bool

func (UnixTime) IsFuture added in v0.0.4

func (vo UnixTime) IsFuture() bool

func (UnixTime) IsPast added in v0.0.4

func (vo UnixTime) IsPast() bool

func (UnixTime) ReadAsGoTime added in v0.0.4

func (vo UnixTime) ReadAsGoTime() time.Time

func (UnixTime) ReadDateOnly added in v0.0.4

func (vo UnixTime) ReadDateOnly() string

func (UnixTime) ReadDateTime added in v0.0.4

func (ut UnixTime) ReadDateTime() string

func (UnixTime) ReadEndOfDay added in v0.0.4

func (ut UnixTime) ReadEndOfDay() time.Time

func (UnixTime) ReadRfcDate added in v0.0.4

func (vo UnixTime) ReadRfcDate() string

func (UnixTime) ReadStartOfDay added in v0.0.4

func (ut UnixTime) ReadStartOfDay() time.Time

func (UnixTime) ReadTimeOnly added in v0.0.4

func (vo UnixTime) ReadTimeOnly() string

func (UnixTime) String added in v0.0.4

func (vo UnixTime) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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