dto

package
v0.0.0-...-c266f6d Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CrawHtml int8 = 1 // 网站是HTML
	CrawApi  int8 = 2 // 网站是JSON接口

	ByType  int8 = 1 // 通过服务器类型
	ByHosts int8 = 2 // 服务器IPs

	Disable int8 = 0 // 禁用
	Enable  int8 = 1 // 启用
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Favor

type Favor struct {
	ID        int    `json:"id"`
	UserId    int    `json:"user_id"`
	Site      string `json:"site"`
	Key       string `json:"key"`
	OriginUrl string `json:"origin_url"`
	Title     string `json:"title"`
	CreateAt  string `json:"create_at"`
}

func (*Favor) FillByModel

func (f *Favor) FillByModel(favor model.Favor) *Favor

type FavorList

type FavorList struct {
	Tabs []*IndexSite `json:"tabs"`
	List []*Favor     `json:"list"`
}
type Header struct {
	Key string `json:"key"`
	Val string `json:"val"`
}

type IndexSite

type IndexSite struct {
	Name string `json:"name"`
	Key  string `json:"key"`
	Tags []Tag  `json:"tags"`
}

type News

type News struct {
	T    string     `json:"t"`
	List []NewsItem `json:"list"`
}

type NewsItem

type NewsItem struct {
	Key       string            `json:"key"`
	Title     string            `json:"title"`
	Desc      string            `json:"desc"`
	Rank      float64           `json:"rank"`
	OriginUrl string            `json:"origin_url"`
	Card      uint8             `json:"card_type"`
	Ext       map[string]string `json:"ext"`
	Mark      bool              `json:"mark"`
}

type Node

type Node struct {
	ID       int    `json:"id"`
	Name     string `json:"name"`
	Addr     string `json:"addr"`
	Type     int8   `json:"type"`
	Enable   int8   `json:"enable"`
	Ping     int8   `json:"ping"`
	CreateAt string `json:"create_at"`
}

func (*Node) FillByModel

func (n *Node) FillByModel(node model.Node) *Node

type OAuthPlatform

type OAuthPlatform struct {
	Name string `json:"name"`
	Type string `json:"type"`
	Url  string `json:"url"`
}

type Query

type Query struct {
	Query string
	Args  []interface{}
	Order string
	Limit int
}

type Site

type Site struct {
	ID         int      `json:"id"`
	Name       string   `json:"name"`
	Key        string   `json:"key"`
	Root       string   `json:"root"`
	Desc       string   `json:"desc"`
	Tags       []Tag    `json:"tags"`
	Type       int8     `json:"type"`
	Cron       string   `json:"cron"`
	NodeOption int8     `json:"node_option"`
	NodeType   int8     `json:"node_type"`
	NodeHosts  []int    `json:"node_hosts"`
	Enable     int8     `json:"enable"`
	ReqHeaders []Header `json:"req_headers"`
}

func (*Site) FillByModel

func (s *Site) FillByModel(site model.Site) *Site

type Tag

type Tag struct {
	Key    string `json:"key"`
	Name   string `json:"name"`
	Enable int8   `json:"enable"`
}

type User

type User struct {
	ID       int    `json:"id"`
	Username string `json:"username"`
	Nickname string `json:"nickname"`
	Avatar   string `json:"avatar"`
	AuthType string `json:"auth_type"`
	AuthTime string `json:"auth_time"`
}

func (*User) FillByModel

func (u *User) FillByModel(user model.User) *User

Jump to

Keyboard shortcuts

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