model

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: AGPL-3.0, AGPL-3.0-only Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 PersonImages

type PersonImages struct {
	Large  string `json:"large"`
	Medium string `json:"medium"`
}

type Platform

type Platform struct {
	Alias        string
	Type         string
	TypeCn       string
	WikiTpl      string
	SearchString string
	ID           int
	EnableHeader bool
}

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
	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 SubjectImages

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

func SubjectImage

func SubjectImage(s string) SubjectImages

type SubjectType

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

	SubjectReal
)

func (SubjectType) Raw

func (s SubjectType) Raw() uint8

func (SubjectType) String

func (s SubjectType) String() string

func (SubjectType) ZapField

func (s SubjectType) ZapField(key string) zapcore.Field

ZapField return a zap Field to be used as logger extra info.

logger.Warn("subject", s.TypeID.ZapField("type"))

type User

type User struct {
	RegTime time.Time
	ID      uint32
}

func (User) AllowNSFW

func (u User) AllowNSFW() bool

Jump to

Keyboard shortcuts

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