models

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	ID                           string    `bson:"_id" json:"id"`
	LastUpdated                  time.Time `bson:"last_updated" json:"last_updated"`
	Links                        *JobLinks `bson:"links" json:"links"`
	NumberOfTasks                int       `bson:"number_of_tasks" json:"number_of_tasks"`
	ReindexCompleted             time.Time `bson:"reindex_completed" json:"reindex_completed"`
	ReindexFailed                time.Time `bson:"reindex_failed" json:"reindex_failed"`
	ReindexStarted               time.Time `bson:"reindex_started" json:"reindex_started"`
	SearchIndexName              string    `bson:"search_index_name" json:"search_index_name"`
	State                        string    `bson:"state" json:"state"`
	TotalSearchDocuments         int       `bson:"total_search_documents" json:"total_search_documents"`
	TotalInsertedSearchDocuments int       `bson:"total_inserted_search_documents" json:"total_inserted_search_documents"`
}

Job represents a job metadata model and json representation for API

func NewJob

func NewJob(id string) Job

NewJob returns a new Job resource that it creates and populates with default values.

type JobLinks struct {
	Tasks string `json:"tasks"`
	Self  string `json:"self"`
}

JobLinks is a type that contains links to the endpoints for returning a specific job (self), and the tasks that it contains (tasks), respectively.

type Jobs added in v0.4.0

type Jobs struct {
	Count      int   `bson:"count,omitempty"        json:"count"`
	JobList    []Job `bson:"jobs,omitempty"         json:"jobs"`
	Limit      int   `bson:"limit,omitempty"        json:"limit"`
	Offset     int   `bson:"offset,omitempty"       json:"offset"`
	TotalCount int   `bson:"total_count,omitempty"  json:"total_count"`
}

Jobs represents an array of Job resources and json representation for API

Jump to

Keyboard shortcuts

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