models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crawler

type Crawler struct {
	Id       bson.ObjectId `bson:"_id"`
	Url      string        `bson:"url"`
	Category string        `bson:"category"`
	Created  time.Time     `bson:"created"`
	Updated  time.Time     `bson:"updated"`
	Revision string        `bson:"revision"`
	Data     string        `bson:"data"`
}

Crawler provides the category instance for crawlers job.

func (*Crawler) FromProtoBuffer

func (c *Crawler) FromProtoBuffer(category *pb.Crawler)

FromProtoBuffer gets data from protocol buffer and converts to the crawler structure.

func (*Crawler) ToProtoBuffer

func (c *Crawler) ToProtoBuffer() *pb.Crawler

ToProtoBuffer converts the crawler structure into a protocol buffer crawler structure.

Jump to

Keyboard shortcuts

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