req

package
v0.28.5 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: AGPL-3.0, AGPL-3.0-only Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMaxPageLimit = 100
View Source
const DefaultPageLimit = 30
View Source
const EpisodeDefaultLimit = 100
View Source
const EpisodeMaxLimit = 1000

Variables

This section is empty.

Functions

func JSON

func JSON(c *fiber.Ctx) error

func ParseCharacterID added in v0.22.1

func ParseCharacterID(s string) (model.CharacterID, error)

func ParseCollectionType added in v0.22.1

func ParseCollectionType(s string) (model.SubjectCollection, error)

func ParseEpTypeOptional added in v0.22.4

func ParseEpTypeOptional(s string) (*model.EpType, error)

func ParseEpisodeID added in v0.22.1

func ParseEpisodeID(s string) (model.EpisodeID, error)

func ParseIndexID added in v0.22.1

func ParseIndexID(s string) (model.IndexID, error)

func ParsePersonID added in v0.22.1

func ParsePersonID(s string) (model.PersonID, error)

func ParseSubjectID added in v0.22.1

func ParseSubjectID(s string) (model.SubjectID, error)

func ParseSubjectType added in v0.22.1

func ParseSubjectType(s string) (model.SubjectType, error)

func ParseTopicID added in v0.22.1

func ParseTopicID(s string) (model.TopicID, error)

Types

type CreatePersonalAccessToken added in v0.18.0

type CreatePersonalAccessToken struct {
	Name         string `json:"name"`
	DurationDays uint   `json:"duration_days" validate:"required,lte=365" validateName:"有效期"`
}

type DeletePersonalAccessToken added in v0.18.0

type DeletePersonalAccessToken struct {
	ID uint32 `json:"id" validate:"required"`
}

type IndexAddSubject added in v0.28.0

type IndexAddSubject struct {
	SubjectID model.SubjectID `json:"subject_id"`
	*IndexSubjectInfo
}

type IndexBasicInfo added in v0.28.0

type IndexBasicInfo struct {
	Title       string `json:"title"`
	Description string `json:"description"`
}

type IndexSubjectInfo added in v0.28.0

type IndexSubjectInfo struct {
	SortKey uint32 `json:"sort"`
	Comment string `json:"comment"`
}

type PageQuery added in v0.22.2

type PageQuery struct {
	Limit  int
	Offset int
}

func GetPageQuery added in v0.22.2

func GetPageQuery(c *fiber.Ctx, defaultLimit int, maxLimit int) (PageQuery, error)

func (PageQuery) Check added in v0.22.2

func (q PageQuery) Check(count int64) error

type SubjectEpisodeCollectionPatch added in v0.23.8

type SubjectEpisodeCollectionPatch struct {
	Comment   null.String                        `json:"comment"`
	Tags      []string                           `json:"tags"`
	VolStatus null.Uint32                        `json:"vol_status" doc:"只能用于书籍条目"`
	EpStatus  null.Uint32                        `json:"ep_status" doc:"只能用于书籍条目"`
	Type      null.Null[model.SubjectCollection] `json:"type"`
	Rate      null.Uint8                         `json:"rate"`
	Private   null.Bool                          `json:"private"`
}

func (SubjectEpisodeCollectionPatch) Validate added in v0.23.8

func (v SubjectEpisodeCollectionPatch) Validate() error

type UpdateEpisodeCollection added in v0.23.8

type UpdateEpisodeCollection struct {
	Type uint8 `json:"type"`
}

type UpdateUserEpisodeCollection added in v0.27.0

type UpdateUserEpisodeCollection struct {
	Type model.EpisodeCollection `json:"type"`
}

type UserLogin

type UserLogin struct {
	Email            string `json:"email" validate:"required,email"`
	Password         string `json:"password" validate:"required"`
	HCaptchaResponse string `json:"h-captcha-response" validate:"required"` //nolint:tagliatelle
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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