data

package
v0.0.0-...-431350c Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB  *sql.DB
	Ctx context.Context
)

Functions

func DbInit

func DbInit() (*sql.DB, error)

func ExistMemberTag

func ExistMemberTag(mId int, tId int) bool

func FindBlogByMemberId

func FindBlogByMemberId(id int) (*models.Blog, error)

func FindFormationIdByPositions

func FindFormationIdByPositions(positions []Position) (int, error)

func FindGroupIdByName

func FindGroupIdByName(group string) (int, error)

func FindMemberIdByName

func FindMemberIdByName(name string) (int, error)

func FindSongIdByTitle

func FindSongIdByTitle(title string) (int, error)

func FindUserByName

func FindUserByName(name string) (*models.Member, error)

func GetTagIdByName

func GetTagIdByName(name string) (int, error)

func InsertApiKey

func InsertApiKey()

func InsertBlogs

func InsertBlogs()

func InsertFormations

func InsertFormations()

func InsertGraduatedMemberInfos

func InsertGraduatedMemberInfos()

func InsertGroups

func InsertGroups()

func InsertLocales

func InsertLocales()

func InsertMain

func InsertMain()

func InsertMemberInfosFromGroupName

func InsertMemberInfosFromGroupName(group string)

func InsertMemberInfosFromGroupNameEn

func InsertMemberInfosFromGroupNameEn(group string)

func InsertMemberInfosHinata

func InsertMemberInfosHinata()

func InsertMemberInfosNogi

func InsertMemberInfosNogi()

func InsertMemberInfosSakura

func InsertMemberInfosSakura()

func InsertMemberTags

func InsertMemberTags()

func InsertMembersHinata

func InsertMembersHinata()

func InsertMembersNogi

func InsertMembersNogi()

func InsertMembersSakura

func InsertMembersSakura()

func InsertPositions

func InsertPositions()

func InsertSongs

func InsertSongs(groupName string)

func InsertTags

func InsertTags()

func IsCenter

func IsCenter(title string, name string) bool

func MakeFormations

func MakeFormations(positions []Position) []int

func UpdateBlogs

func UpdateBlogs()

func UpdateGraduatedMembersNogi

func UpdateGraduatedMembersNogi()

func UpdateGraduatedMembersSakura

func UpdateGraduatedMembersSakura()

Types

type Blog

type Blog struct {
	Name          string `json:"name"`
	BlogUrl       string `json:"blog_url"`
	LastBlogImg   string `json:"last_blog_img"`
	LastUpdatedAt string `json:"last_updated_at"`
}

func LoadBlogInfoFile

func LoadBlogInfoFile(group string) []*Blog

type Formation

type Formation struct {
	Single   string     `json:"single"`
	Title    string     `json:"title"`
	Position []Position `json:"positions"`
}

func LoadFormationFile

func LoadFormationFile(group string) []*Formation

type Info

type Info struct {
	Name       string `json:"name_ja"`
	Birthday   string `json:"birthday"`
	Height     string `json:"height"`
	BloodType  string `json:"blood_type"`
	Generation string `json:"generation"`
	BlogUrl    string `json:"blog_url"`
	ImgUrl     string `json:"img_url"`
}

func LoadMemberInfoFile

func LoadMemberInfoFile(group string) []*Info

type Position

type Position struct {
	NameEn   string `json:"name_en"`
	NameJa   string `json:"name_ja"`
	Position string `json:"position"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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