request

package
v0.0.0-...-89a8f9d Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorUpsert

type AuthorUpsert struct {
	Id   *uint   `json:"id"`
	Name *string `json:"name"`
}

type BaseUpsert

type BaseUpsert struct {
	Id   *uint   `json:"id"`
	Name *string `json:"name"`
}

type CategoryUpsert

type CategoryUpsert struct {
	Id   *uint   `json:"id"`
	Name *string `json:"name"`
}

type Code

type Code struct {
	Email string `json:"email" binding:"required"`
	Type  int    `json:"type"`
}

type ContactUpsert

type ContactUpsert struct {
	Id      *uint   `json:"id"`
	Email   *string `json:"email"`
	Message *string `json:"message"`
	Name    *string `json:"name"`
}

type DeleteId

type DeleteId struct {
	Id uint `json:"id"`
}

type NewsSearch

type NewsSearch struct {
	NormalSearch
	TypeIds     *string `form:"type_ids"`
	CategoryIds *string `form:"category_ids"`
	TagIds      *string `form:"tag_ids"`
}

type NewsUpsert

type NewsUpsert struct {
	Id          *uint   `json:"id"`
	Title       *string `json:"title"`
	Content     *string `json:"content"`
	Source      *string `json:"source"`
	Status      *int    `json:"status"`
	Slug        *string `json:"slug"`
	Summary     *string `json:"summary"`
	ImageUrl    *string `json:"image_url"`
	VideoUrl    *string `json:"video_url"`
	AudioUrl    *string `json:"audio_url"`
	TypeId      *int    `json:"type_id"`
	CategoryIds *[]uint `json:"category_ids"`
	TagIds      *[]uint `json:"tag_ids"`
	AuthorId    *uint   `json:"author_id"`
	IsFeatured  *bool   `json:"is_featured"`
}

type NormalSearch

type NormalSearch struct {
	Offset  int     `form:"offset,default=0"`
	Limit   int     `form:"limit,default=15"`
	Sort    int     `form:"sort,default=0"`
	Keyword *string `form:"keyword"`
	Ids     *string `form:"ids"`
	Status  *int    `form:"status"`
}

type TagUpsert

type TagUpsert struct {
	Id   *uint   `json:"id"`
	Name *string `json:"name"`
}

type UpdatePassword

type UpdatePassword struct {
	Email    string `json:"email" binding:"required"`
	Password string `json:"password" binding:"required"`
	Code     string `json:"code" binding:"required"`
}

type Upload

type Upload struct {
	Type string                `form:"type" binding:"required"`
	File *multipart.FileHeader `form:"file" binding:"required_without=Raw"`
	Raw  string                `form:"raw"`
}

type UserCreate

type UserCreate struct {
	Avatar   string `json:"avatar"`
	Name     string `json:"name"`
	Password string `json:"password" binding:"required"`
	Email    string `json:"email" binding:"required"`
	Code     string `json:"code" binding:"required"`
}

type UserLogin

type UserLogin struct {
	Email    string `json:"email" binding:"required"`
	Password string `json:"password" binding:"required"`
	Role     string `json:"role"`
}

type UserUpsert

type UserUpsert struct {
	Id       *uint   `json:"id"`
	Avatar   *string `json:"avatar"`
	Name     *string `json:"name"`
	Role     *string `json:"role"`
	Password *string `json:"pass"`
	Email    *string `json:"email"`
	LoginAt  *int64  `json:"login_at"`
	LastIp   *string `json:"last_ip"`
}

Jump to

Keyboard shortcuts

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