model

package
v0.9.10-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: AGPL-3.0, AGPL-3.0-only Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SubjectTypeString

func SubjectTypeString(s uint8) string

Types

type Character

type Character struct {
	Name           string
	Image          string
	Infobox        string
	Summary        string
	ID             uint32
	Redirect       uint32
	CollectCount   uint32
	CommentCount   uint32
	FieldBirthYear uint16
	Producer       bool
	Type           uint8
	Artist         bool
	Seiyu          bool
	Writer         bool
	Illustrator    bool
	Actor          bool
	FieldBloodType uint8
	FieldGender    uint8
	FieldBirthMon  uint8
	Locked         bool
	FieldBirthDay  uint8
	NSFW           bool
}

type CharacterIDType added in v0.10.1

type CharacterIDType = uint32

type Collection

type Collection struct {
	UpdatedAt   time.Time
	Comment     string
	Tags        []string
	SubjectType uint8
	HasComment  bool
	Private     bool
	Type        uint8
	VolStatus   uint32
	EpStatus    uint32
	SubjectID   uint32
	Rate        uint8
}

type Count

type Count struct {
	Field1  uint32
	Field2  uint32
	Field3  uint32
	Field4  uint32
	Field5  uint32
	Field6  uint32
	Field7  uint32
	Field8  uint32
	Field9  uint32
	Field10 uint32
}

type EpTypeType added in v0.10.1

type EpTypeType = int8

type Episode

type Episode struct {
	Airdate     string
	Name        string
	NameCN      string
	Duration    string
	Description string
	Ep          float32
	SubjectID   uint32
	Sort        float32
	Comment     uint32
	ID          uint32
	Type        int8
	Disc        uint8
}

type Index

type Index struct {
	CreatedAt   time.Time
	Title       string
	Description string
	CreatorID   uint32
	Total       uint32
	ID          uint32
	Comments    uint32
	Collects    uint32
	Ban         bool
}

type Person

type Person struct {
	Name           string
	Image          string
	Infobox        string
	Summary        string
	ID             uint32
	Redirect       uint32
	CollectCount   uint32
	CommentCount   uint32
	FieldBirthYear uint16
	Producer       bool
	Mangaka        bool
	Type           uint8
	Artist         bool
	Seiyu          bool
	Writer         bool
	Illustrator    bool
	Actor          bool
	FieldBloodType uint8
	FieldGender    uint8
	FieldBirthMon  uint8
	Locked         bool
	FieldBirthDay  uint8
}

type PersonCharacterRelation

type PersonCharacterRelation struct {
	Character Character
	Person    Person
	Subject   Subject
	TypeID    uint8
}

type PersonIDType added in v0.10.1

type PersonIDType = uint32

type PersonImages

type PersonImages struct {
	Small  string `json:"small"`
	Grid   string `json:"grid"`
	Large  string `json:"large"`
	Medium string `json:"medium"`
}

func PersonImage

func PersonImage(s string) PersonImages

type Platform

type Platform struct {
	Alias        string `json:"alias"`
	Type         string `json:"type"`
	TypeCN       string `json:"type_cn"`
	WikiTpl      string `json:"wiki_tpl"`
	SearchString string `json:"search_string"`
	ID           int    `json:"id"`
	EnableHeader bool   `json:"enable_header"`
}

func (Platform) String

func (p Platform) String() string

type Rating

type Rating struct {
	Rank  int32
	Total uint32
	Count Count
	Score float64
}

type Subject

type Subject struct {
	Image         string
	Summary       string
	Name          string
	Date          string // first release date
	NameCN        string
	Infobox       string
	CompatRawTags []byte // compat field for old tags
	OnHold        uint32
	Dropped       uint32
	Volumes       uint32
	Eps           uint32
	Wish          uint32
	Collect       uint32
	Doing         uint32
	ID            uint32
	PlatformID    uint16
	TypeID        SubjectType
	Ban           uint8
	Airtime       uint8 // air weekday, start from
	NSFW          bool
	Rating        Rating
	Redirect      uint32
}

func (Subject) Locked

func (s Subject) Locked() bool

type SubjectCharacterRelation added in v0.10.1

type SubjectCharacterRelation struct {
	Character Character
	Subject   Subject
	TypeID    uint8
}

type SubjectIDType added in v0.10.1

type SubjectIDType = uint32 // in case we need future change, but I guess not...

type SubjectImages

type SubjectImages struct {
	Small  string `json:"small"`
	Grid   string `json:"grid"`
	Large  string `json:"large"`
	Medium string `json:"medium"`
	Common string `json:"common"`
}

func SubjectImage

func SubjectImage(s string) SubjectImages

type SubjectInternalRelation

type SubjectInternalRelation struct {
	Source      Subject
	Destination Subject
	TypeID      uint16
}

type SubjectPersonRelation added in v0.10.1

type SubjectPersonRelation struct {
	Person  Person
	Subject Subject
	TypeID  uint16
}

type SubjectType

type SubjectType = uint8
const (
	SubjectBook SubjectType = iota + 1
	SubjectAnime
	SubjectMusic
	SubjectGame

	SubjectReal
)

type User

type User struct {
	UserName  string
	NickName  string
	Avatar    string
	Sign      string
	ID        uint32
	UserGroup uint8
}

User is visible for everyone.

Jump to

Keyboard shortcuts

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