entity

package
v0.0.0-...-aa6b52a Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUrlMeta

func GetUrlMeta(host string, urlMeta *UrlMeta)

func HtmlPageCreateBlankEntries

func HtmlPageCreateBlankEntries(pages *[]interface{})

func HtmlPageLockUpdate

func HtmlPageLockUpdate(targetUrl string)

func NewBlankHtmlPage

func NewBlankHtmlPage(targetUrl string) interface{}

func NewBlankHtmlPageV2

func NewBlankHtmlPageV2(targetUrl string) interface{}

Types

type FeedItem

type FeedItem struct {
	ID          string    `json:"id"`
	URL         string    `json:"url"`
	SourceURL   string    `json:"source_url"`
	Title       string    `json:"title"`
	Description string    `json:"description"`
	PublishedOn time.Time `json:"published_on"`
	UpdatedOn   time.Time `json:"updated_on"`
	UpdatedBy   struct {
		Agent  string `json:"agent"`
		Proxy  string `json:"proxy"`
		NodeIP string `json:"node_ip"`
	} `json:"updated_by"`
}

type HtmlPage

type HtmlPage struct {
	ID     string `json:"_id" bson:"_id"`
	URL    string `json:"url"`
	Hash   string `json:"hash"`
	Scheme string `json:"scheme"`
	Host   string `json:"host"`
	Title  string `json:"title" `

	Meta struct {
		Charset     string `json:"charset"`
		Author      string `json:"author"`
		Description string `json:"description"`
		Keywords    string `json:"keywords"`
		Language    string `json:"language"`
		Viewport    string `json:"viewport"`
	} `json:"meta"`
	Body    string `json:"body"`
	Summary struct {
		Content string
		Nav     []struct {
			Href string
			Text string
		}
	} `json:"summary"`
	UpdatedOn primitive.DateTime `json:"updated_on" bson:"updated_on"`
	UpdatedBy struct {
		AppID  string `json:"app_id"`
		Proxy  string `json:"proxy"`
		NodeIP string `json:"node_ip" bson:"node_ip"`
	} `json:"updated_by" bson:"updated_by"`
	LockExpiry primitive.DateTime `json:"lock_expiry,omitempty" bson:"lock_expiry,omitempty"`
}

func (*HtmlPage) Store

func (htmlPage *HtmlPage) Store()

type UrlMeta

type UrlMeta struct {
	URL         string `bson:"_id"`
	LastUpdated time.Time
}

Jump to

Keyboard shortcuts

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