archive

package
v0.33.19 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: AGPL-3.0, AGPL-3.0-only Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &cobra.Command{
	Use:   "archive",
	Short: "create a wiki dump",
	RunE: func(cmd *cobra.Command, args []string) error {
		if err := mysql.SetLogger(logger.Std()); err != nil {
			return errgo.Wrap(err, "can't replace mysql driver's errLog")
		}

		fmt.Println("dumping data with args:", args)

		start(out)

		return nil
	},
}

Functions

This section is empty.

Types

type Character

type Character struct {
	ID      model.CharacterID `json:"id"`
	Role    uint8             `json:"role"`
	Name    string            `json:"name"`
	Infobox string            `json:"infobox"`
	Summary string            `json:"summary"`
}

type Episode

type Episode struct {
	ID          model.EpisodeID `json:"id"`
	Name        string          `json:"name"`
	NameCn      string          `json:"name_cn"`
	Description string          `json:"description"`
	AirDate     string          `json:"airdate"`
	Disc        uint8           `json:"disc"`
	SubjectID   model.SubjectID `json:"subject_id"`
	Sort        float32         `json:"sort"`
	Type        episode.Type    `json:"type"`
}

type Person

type Person struct {
	ID      model.PersonID `json:"id"`
	Name    string         `json:"name"`
	Type    uint8          `json:"type"`
	Career  []string       `json:"career"`
	Infobox string         `json:"infobox"`
	Summary string         `json:"summary"`
}

type PersonCharacter

type PersonCharacter struct {
	PersonID    model.PersonID    `json:"person_id"`
	SubjectID   model.SubjectID   `json:"subject_id"`
	CharacterID model.CharacterID `json:"character_id"`
	Summary     string            `json:"summary"`
}

type Score added in v0.33.14

type Score struct {
	Field1  uint32 `json:"1"`
	Field2  uint32 `json:"2"`
	Field3  uint32 `json:"3"`
	Field4  uint32 `json:"4"`
	Field5  uint32 `json:"5"`
	Field6  uint32 `json:"6"`
	Field7  uint32 `json:"7"`
	Field8  uint32 `json:"8"`
	Field9  uint32 `json:"9"`
	Field10 uint32 `json:"10"`
}

type Subject

type Subject struct {
	ID       model.SubjectID   `json:"id"`
	Type     model.SubjectType `json:"type"`
	Name     string            `json:"name"`
	NameCN   string            `json:"name_cn"`
	Infobox  string            `json:"infobox"`
	Platform uint16            `json:"platform"`
	Summary  string            `json:"summary"`
	Nsfw     bool              `json:"nsfw"`

	Tags         []Tag   `json:"tags"`
	Score        float64 `json:"score"`
	ScoreDetails Score   `json:"score_details"`
	Rank         uint32  `json:"rank"`
}

type SubjectCharacter

type SubjectCharacter struct {
	CharacterID model.CharacterID `json:"character_id"`
	SubjectID   model.SubjectID   `json:"subject_id"`
	Type        uint8             `json:"type"`
	Order       uint8             `json:"order"`
}

type SubjectPerson

type SubjectPerson struct {
	PersonID  model.PersonID  `json:"person_id"`
	SubjectID model.SubjectID `json:"subject_id"`
	Position  uint16          `json:"position"`
}

type SubjectRelation

type SubjectRelation struct {
	SubjectID        model.SubjectID `json:"subject_id"`
	RelationType     uint16          `json:"relation_type"`
	RelatedSubjectID model.SubjectID `json:"related_subject_id"`
	Order            uint8           `json:"order"`
}

type Tag added in v0.33.14

type Tag struct {
	Name  string `json:"name"`
	Count int    `json:"count"`
}

Jump to

Keyboard shortcuts

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