models

package
v0.0.0-...-4e43b7b Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArticleCountToPbUnit

func ArticleCountToPbUnit(article *ArticleCount) *pb_unit_article.ArticleCount

func ArticleToPbUnit

func ArticleToPbUnit(article *Article) *pb_unit_article.Article

func JobToPbUnit

func JobToPbUnit(job *Job) *pb_unit_job.Job

func ValidateArticle

func ValidateArticle(article *Article) (err error)

func ValidateJob

func ValidateJob(job Job) error

func ValidateWorker

func ValidateWorker(worker Worker) error

func WorkerToPbUnit

func WorkerToPbUnit(worker *Worker) *pb_unit_worker.Worker

Types

type Article

type Article struct {
	Id                string `validate:"required"`
	Author            string `validate:"required"`
	Keyword           string `validate:"required"`
	Content           string `validate:"required"`
	Platform          string `validate:"required"`
	Score_happy       string `validate:"gte=-50,lte=50"`
	Score_fear        string `validate:"gte=-50,lte=50"`
	Score_embarrassed string `validate:"gte=-50,lte=50"`
	Score_sad         string `validate:"gte=-50,lte=50"`
	Score_rage        string `validate:"gte=-50,lte=50"`
	Score_hurt        string `validate:"gte=-50,lte=50"`
	Score_max_value   string `validate:"gte=-50,lte=50"`
	Score_max_name    string
	Create_at         string `validate:"required"`
	Job_id            string `validate:"required,uuid"`
	Worker_id         string `validate:"required,uuid"`
}

type ArticleCount

type ArticleCount struct {
	Create_at_time string
	Count          uint32
	Score_max_name string
}

type Job

type Job struct {
	Id      string
	Status  string
	Keyword string `validate:"required"`
	Owner   string `validate:"required"`
	Date    string
}

type SimplifiedArticle

type SimplifiedArticle struct {
	Id                   string `validate:"required"`
	Worker_id            string
	Job_id               string
	Preprocessed_content string `validate:"required"`
}

type TfidfScore

type TfidfScore struct {
}

type TweetArticle

type TweetArticle struct {
	Id               string
	Text             string
	PreprocessedText string
	Created_at       string
}

type Worker

type Worker struct {
	WorkerId string `validate:"required"`
	Keyword  string `validate:"required"`
	Status   string `validate:"required"`
	JobId    string `validate:"required"`
	UpdateAt string
	CreateAt string
}

Jump to

Keyboard shortcuts

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