fields

package
v0.0.0-...-0a5871c Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Lv         = FieldName("lv")
	Title      = FieldName("title")
	Difficulty = FieldName("difficulty")
	Perfect    = FieldName("perfect")
	Great      = FieldName("great")
	Nice       = FieldName("nice")
	Bad        = FieldName("bad")
	Miss       = FieldName("miss")
	Combo      = FieldName("combo")
	Score      = FieldName("score")

	FieldTypeString = FieldType("string")
	FieldTypeDigits = FieldType("digits")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Coordinate

type Coordinate struct {
	StartX int `json:"startx"`
	StartY int `json:"starty"`
	EndX   int `json:"endx"`
	EndY   int `json:"endy"`
}

func (Coordinate) Rect

func (c Coordinate) Rect() image.Rectangle

type Field

type Field struct {
	Name       FieldName  `json:"name"`
	Coordinate Coordinate `json:"coordinate"`
}

func (Field) String

func (f Field) String() string

type FieldName

type FieldName string

type FieldType

type FieldType string

func FieldTypeByName

func FieldTypeByName(name FieldName) (FieldType, error)

type Result

type Result struct {
	SourceImageFile *os.File
	Fields          []*ResultField
}

func (*Result) AddResultField

func (r *Result) AddResultField(field *ResultField)

func (*Result) DateTime

func (r *Result) DateTime() (time.Time, error)

日付を返す. Exif, FileInfo.ModTimeの順にフォールバック

func (*Result) DateTimeFromExif

func (r *Result) DateTimeFromExif() (time.Time, error)

func (*Result) DateTimeFromFileInfo

func (r *Result) DateTimeFromFileInfo() (time.Time, error)

func (*Result) IsSuccessful

func (r *Result) IsSuccessful() bool

TODO

type ResultField

type ResultField struct {
	*Field
	Text string
}

func NewResultFieldByField

func NewResultFieldByField(field Field) *ResultField

func (*ResultField) NormalizedText

func (r *ResultField) NormalizedText() (string, error)

正規化した文字列を返す

Jump to

Keyboard shortcuts

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