types

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LowDefinition       = Resolution{1366, 768}
	HighDefinition      = Resolution{1920, 1080}
	UltraHighDefinition = Resolution{3840, 2160}
)

Functions

This section is empty.

Types

type Day

type Day int

Day is an enum type for relative days. 0 is today, 1 is yesterday, 2 is the day before yesterday, and so on. 7 is the highest value, which is seven days ago.

const (
	Today Day = iota
	Yesterday
	TheDayBeforeYesterday
	ThreeDaysAgo
	FourDaysAgo
	FiveDaysAgo
	SixDaysAgo
	SevenDaysAgo
)

func (Day) IsValid

func (d Day) IsValid() error

IsValid returns true if the Day is valid.

func (Day) String

func (d Day) String() string

String returns the string representation of the Day.

type Position

type Position int

Position is an enum type for relative positions.

const (
	TopLeft Position = iota
	TopRight
	BottomLeft
	BottomRight
	TopCenter
	BottomCenter
	CenterLeft
	CenterRight
	Center
)

func (Position) String

func (p Position) String() string

String returns the string representation of the Position.

type Positions

type Positions []Position

Positions is a slice of Position.

func (Positions) String

func (p Positions) String() string

String returns the string representation of the Positions.

type Region

type Region int

Region is an enum type for locales.

const (
	Canada Region = iota
	China
	Germany
	Japan
	NewZealand
	UnitedKingdom
	UnitedStates
)

func ParseLocale

func ParseLocale(s string) (Region, error)

ParseLocale parses a string and returns a Region.

func (Region) String

func (r Region) String() string

String returns the code representation of the Region.

type Regions

type Regions []Region

Regions is a slice of Region.

func (Regions) String

func (r Regions) String() string

String returns the string representation of the Regions.

type Resolution

type Resolution struct {
	Width, Height int
}

Resolution is a struct for screen resolutions.

func ParseResolution

func ParseResolution(s string) (Resolution, error)

ParseResolution parses a string and returns a Resolution.

func (Resolution) String

func (r Resolution) String() string

String returns the string representation of the Resolution.

type Resolutions

type Resolutions []Resolution

Resolutions is a slice of Resolution.

func (Resolutions) String

func (r Resolutions) String() string

String returns the string representation of the Resolutions.

Jump to

Keyboard shortcuts

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