submission

package
v0.0.0-...-f0d0762 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HLeft   = "left"
	HCenter = "center"
	HRight  = "right"

	VCenter = "center"
)
View Source
const (
	IniFileName = ".private.ini"

	Password              = "password"
	Kana                  = "kana"
	Name                  = "name"
	Mail                  = "mail"
	EducationalBackground = "educationalBackground"
	CityOfResidence       = "cityOfResidence"
	NearestStation        = "nearestStation"
	CvWeb                 = "cvWeb"
	CvAdmin               = "cvAdmin"
)
View Source
const (
	SkillSheetTitle = "スキルシート"

	StartCol  = "A"
	EndCol    = "Z"
	SuppleCol = "AA"

	BaseColWidth   = 5
	SuppleColWidth = 0.5

	// "A" ~ "Z"
	ViewAreaColNum = 26

	TitleRow = 1

	LastUpdatedRow     = 2
	SkillSheetNoteRow  = 3
	SkillSheetNoteRow2 = 4

	BasicAttributeRow  = 5
	BasicAttributeRow2 = 6
	BasicAttributeRow3 = 7
	BasicAttributeRow4 = 8

	QualificationRow = 10
)
View Source
const (
	RowBaseHeight     float64 = 25.0
	RowSolutionHeight float64 = 110.0
	RowMaxHeight      float64 = 409.0
)

Variables

View Source
var BoldFont = &excelize.Font{
	Bold: true,
}
View Source
var BottomBorder = []excelize.Border{
	{Type: "bottom", Color: borderBaseColor, Style: borderBaseStyle},
}
View Source
var CareerGroupLabelFill = excelize.Fill{
	Type:    "pattern",
	Color:   []string{careerGroupLabelColor},
	Pattern: 1,
}
View Source
var CareerGroupLabelFont = &excelize.Font{
	Size: 16,
	Bold: true,
}
View Source
var CareerNameFont = &excelize.Font{
	Size: 14,
}
View Source
var FullBorder = []excelize.Border{
	{Type: "left", Color: borderBaseColor, Style: borderBaseStyle},
	{Type: "top", Color: borderBaseColor, Style: borderBaseStyle},
	{Type: "right", Color: borderBaseColor, Style: borderBaseStyle},
	{Type: "bottom", Color: borderBaseColor, Style: borderBaseStyle},
}
View Source
var HLeftAlignmentIndent2 = NewAlignment(Horizontal(HLeft), Vertical(VCenter), WrapText(true), Indent(2))
View Source
var HLeftAlignmentIndent3 = NewAlignment(Horizontal(HLeft), Vertical(VCenter), WrapText(true), Indent(3))
View Source
var HLeftAlignmentIndent4 = NewAlignment(Horizontal(HLeft), Vertical(VCenter), WrapText(true), Indent(4))
View Source
var HeaderFill = excelize.Fill{
	Type:    "pattern",
	Color:   []string{headerColor},
	Pattern: 1,
}
View Source
var LastUpdatedFont = &excelize.Font{
	Size: 9,
}
View Source
var LeftBorder = []excelize.Border{
	{Type: "left", Color: borderBaseColor, Style: borderBaseStyle},
}
View Source
var LeftTopBottomBorder = []excelize.Border{
	{Type: "left", Color: borderBaseColor, Style: borderBaseStyle},
	{Type: "top", Color: borderBaseColor, Style: borderBaseStyle},
	{Type: "bottom", Color: borderBaseColor, Style: borderBaseStyle},
}
View Source
var NameFont = &excelize.Font{
	Size: 18,
	Bold: true,
}
View Source
var RightTopBottomBorder = []excelize.Border{
	{Type: "right", Color: borderBaseColor, Style: borderBaseStyle},
	{Type: "top", Color: borderBaseColor, Style: borderBaseStyle},
	{Type: "bottom", Color: borderBaseColor, Style: borderBaseStyle},
}
View Source
var SheetTitleFont = &excelize.Font{
	Size: 20,
	Bold: true,
}
View Source
var SideBorder = []excelize.Border{
	{Type: "left", Color: borderBaseColor, Style: borderBaseStyle},
	{Type: "right", Color: borderBaseColor, Style: borderBaseStyle},
}
View Source
var SideBottomBorder = []excelize.Border{
	{Type: "left", Color: borderBaseColor, Style: borderBaseStyle},
	{Type: "right", Color: borderBaseColor, Style: borderBaseStyle},
	{Type: "bottom", Color: borderBaseColor, Style: borderBaseStyle},
}
View Source
var TopBottomBorder = []excelize.Border{
	{Type: "top", Color: borderBaseColor, Style: borderBaseStyle},
	{Type: "bottom", Color: borderBaseColor, Style: borderBaseStyle},
}

Functions

func Age

func Age(birthYear, birthMonth, birthDay int, now time.Time) int

func CalcHeight

func CalcHeight(str string) float64

func CareerGroupPeriod

func CareerGroupPeriod(careerGroup rest.UserCareerGroup) string

func CareerPeriod

func CareerPeriod(career rest.UserCareer) string

func Cell

func Cell(col string, row int) string

func DiffMonths

func DiffMonths(fromYear, fromMonth, toYear, toMonth int) int

func GetConfigValue

func GetConfigValue(cfg *ini.File, key string) string

func MergeMonths

func MergeMonths(dms int) string

func NewAlignment

func NewAlignment(options ...AlignmentOption) *excelize.Alignment

func NewConfig

func NewConfig() *ini.File

func NewStyle

func NewStyle(options ...ExcelizeStyleOption) *excelize.Style

func QualificationGotDate

func QualificationGotDate(d *rest.QualificationGotDate) string

func QualificationName

func QualificationName(org *rest.QualificationOrg, name *rest.QualificationName) string

func SkillWithVersion

func SkillWithVersion(careerSkill rest.CareerSkill) string

TODO: 2行を超える場合も対応!

func URL

func URL(u *rest.Url) string

Types

type AlignmentOption

type AlignmentOption func(a *excelize.Alignment)

func Horizontal

func Horizontal(s string) AlignmentOption

func Indent

func Indent(i int) AlignmentOption

func JustifyLastLine

func JustifyLastLine(b bool) AlignmentOption

func ReadingOrder

func ReadingOrder(r uint64) AlignmentOption

func RelativeIndent

func RelativeIndent(r int) AlignmentOption

func ShrinkToFit

func ShrinkToFit(b bool) AlignmentOption

func TextRotation

func TextRotation(t int) AlignmentOption

func Vertical

func Vertical(v string) AlignmentOption

func WrapText

func WrapText(w bool) AlignmentOption

type ExcelizeStyleOption

type ExcelizeStyleOption func(style *excelize.Style)

func Alignment

func Alignment(a *excelize.Alignment) ExcelizeStyleOption

func Borders

func Borders(b []excelize.Border) ExcelizeStyleOption

func Fill

func Fill(f excelize.Fill) ExcelizeStyleOption

func Font

func Font(f *excelize.Font) ExcelizeStyleOption

type ExcelizeWrapperOption

type ExcelizeWrapperOption func(file *excelize.File)

func PaperSize

func PaperSize(s int) ExcelizeWrapperOption

func SheetName

func SheetName(n string) ExcelizeWrapperOption

func SheetPassword

func SheetPassword(p string) ExcelizeWrapperOption

func SheetView

func SheetView() ExcelizeWrapperOption

type Wrapper

type Wrapper interface {
	Set(position string, val any)
	Merge(from, to string)
	Height(row int, h float64)
	Width(start, end string, wd float64)
	Text(cell string, settings []excelize.RichTextRun)
	CellStyle(cell string, style *excelize.Style)
	CellRangeStyle(start, end string, style *excelize.Style)
	HeaderCellStyle(cell string)
	HeaderCellRangeStyle(start, end string)
	ValueCellRangeStyle(start, end string)
	CellExternalHyperLink(cell, url string)
	AddPicture(cell, path string)
	AddPictureFromBytes(cell, extension string, file []byte)
	InsertPageBreak(cell string)

	SaveAs(name string)
}

func NewExcelizeWrapper

func NewExcelizeWrapper(options ...ExcelizeWrapperOption) Wrapper

Jump to

Keyboard shortcuts

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