models

package
v0.0.0-...-373141d Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Database struct {
		Init bool `json:"init"`
	} `json:"database"`
	Server struct {
		Enable bool   `json:"enable"`
		IP     string `json:"ip"`
		Port   int    `json:"port"`
	} `json:"server"`
	HTTPClient struct {
		Timeout int `json:"timeout"`
	} `json:"http-client"`
	Crawler bool `json:"crawler"`
	Rss     bool `json:"rss"`
	JSON    bool `json:"json"`
	Plugin  bool `json:"plugin"`
}

type Json

type Json struct {
	gorm.Model
	Name      string  `gorm:"not_null;default:json" json:"name" form:"name"`
	Url       string  `gorm:"size:1000;not_null" json:"url" form:"url"`
	BaseUrl   *string `gorm:"size:1000" json:"base_url" form:"base_url"`
	Block     string  `gorm:"not_null" json:"block" form:"block"`
	Title     *string `json:"title" form:"title"`
	Message   *string `json:"message" form:"message"`
	Href      *string `json:"href" form:"href"`
	Mark      string  `json:"mark" form:"mark"`
	NewMark   string  `json:"new_mark" form:"new_mark"`
	Frequency int     `gorm:"not_null;default:30" json:"frequency" form:"frequency"`
	Enabled   *bool   `gorm:"not_null;default:0" json:"enabled" form:"enabled"`
}

type NewMsg

type NewMsg struct {
	Title   string `json:"title"`
	Message string `json:"message"`
}

推送消息的格式

type NewSource

type NewSource struct {
	Name      string `json:"name" form:"name"`
	Url       string `json:"url" form:"url"`
	Html      string `json:"html" form:"html"`
	Block     string `json:"block" form:"block"`
	Frequency int    `json:"frequency" form:"frequency"`
	Enabled   bool   `json:"enabled" form:"enabled"`
}

新建爬虫源所用struct

type Plugin

type Plugin struct {
	gorm.Model
	Name      string `gorm:"not_null;default:plugin" json:"name" form:"name"`
	Exec      string `gorm:"not_null" json:"exec" form:"exec"`
	Frequency int    `gorm:"not_null;default:30" json:"frequency" form:"frequency"`
	Enabled   *bool  `gorm:"not_null;default:0" json:"enabled" form:"enabled"`
}

type Rss

type Rss struct {
	gorm.Model
	Name    string `gorm:"not_null;default:rss" json:"name" form:"name"`
	Url     string `gorm:"size:1000;not_null" json:"url" form:"url"`
	Mark    string `gorm:"size:1000" json:"mark" form:"mark"`
	Enabled *bool  `gorm:"not_null;default:0" json:"enabled" form:"enabled"`
}

type Source

type Source struct {
	gorm.Model
	Name      string `gorm:"not_null;default:source" json:"name" form:"name"`
	Url       string `gorm:"size:1000;not_null" json:"url" form:"url"`
	BaseUrl   string `gorm:"size:1000" json:"base_url" form:"base_url"`
	Block     string `gorm:"not_null" json:"block" form:"block"`
	Title     string `gorm:"not_null" json:"title" form:"title"`
	Href      string `gorm:"size:1000;not_null" json:"href" form:"href"`
	Frequency int    `gorm:"not_null;default:30" json:"frequency" form:"frequency"`
	Mark      string `gorm:"size:1000" json:"mark" form:"mark"`
	Enabled   *bool  `gorm:"not_null;default:0" json:"enabled" form:"enabled"`
}

Jump to

Keyboard shortcuts

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