aggregates

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BulkEditDocumentsRequest

type BulkEditDocumentsRequest struct {
	Documents      []string      `json:"documents"`
	AddMetadata    MetadataArray `json:"add_metadata"`
	RemoveMetadata MetadataArray `json:"remove_metadata"`
	Lang           string        `json:"lang"`
	Date           int64         `json:"date"`
}

type Document

type Document struct {
	// swagger:strfmt uuid
	Id          string `json:"id"`
	Name        string `json:"name"`
	Filename    string `json:"filename"`
	Content     string `json:"content"`
	Description string `json:"description"`
	CreatedAt   int64  `json:"created_at"`
	UpdatedAt   int64  `json:"updated_at"`
	// swagger:strfmt either null or unix epoch in milliseconds
	DeletedAt   interface{}            `json:"deleted_at"`
	Date        int64                  `json:"date"`
	PreviewUrl  string                 `json:"preview_url"`
	DownloadUrl string                 `json:"download_url"`
	Mimetype    string                 `json:"mimetype"`
	Type        string                 `json:"type"`
	Size        int64                  `json:"size"`
	PrettySize  string                 `json:"pretty_size"`
	Status      string                 `json:"status"`
	Metadata    []models.Metadata      `json:"metadata"`
	SharedUsers []UserSharePermissions `json:"shared_users"`
	Tags        []models.Tag           `json:"tags"`
	Lang        string                 `json:"lang"`
	Shares      int                    `json:"shares"`
	Favorite    bool                   `json:"favorite"`
}

Document

func DocumentToAggregate

func DocumentToAggregate(doc *models.Document, shares *[]models.DocumentSharePermission) *Document

type DocumentPermissions

type DocumentPermissions struct {
	UserId            int
	Document          string
	Owner             bool
	SharedPermissions models.Permissions
}

type DocumentUpdate

type DocumentUpdate struct {
	Name        string
	Description string
	Filename    string
	Date        time.Time
	Metadata    MetadataArray
	Lang        string
	Favorite    bool
}

type DocumentUpdateSharingRequest

type DocumentUpdateSharingRequest struct {
	Users []UserPermissions `json:"users" valid:"-"`
}

DocumentUpdateSharingRequest swagger:model DocumentUpdateSharingRequestBody

type Metadata

type Metadata struct {
	KeyId   int `json:"key_id"`
	ValueId int `json:"value_id"`
}

func (Metadata) ToMetadata

func (m Metadata) ToMetadata() models.Metadata

type MetadataArray

type MetadataArray []Metadata

func (MetadataArray) ToMetadataArray

func (m MetadataArray) ToMetadataArray() []models.Metadata

func (MetadataArray) UniqueKeys

func (m MetadataArray) UniqueKeys() []int

type SystemInfo

type SystemInfo struct {
	Name      string `json:"name"`
	Version   string `json:"version"`
	Commit    string `json:"commit"`
	GoVersion string `json:"go_version"`

	ImagemagickVersion string `json:"imagemagick_version"`
	TesseractVersion   string `json:"tesseract_version"`
	PopplerInstalled   bool   `json:"poppler_installed"`
	PandocInstalled    bool   `json:"pandoc_installed"`

	NumCpu     int    `json:"number_cpus"`
	ServerLoad string `json:"server_load"`
	Uptime     string `json:"uptime"`

	DocumentsInQueue            int    `json:"documents_queued"`
	DocumentsProcessedToday     int    `json:"documents_processed_today"`
	DocumentsProcessedLastWeek  int    `json:"documents_processed_past_week"`
	DocumentsProcessedLastMonth int    `json:"documents_processed_past_month"`
	DocumentsTotal              int    `json:"documents_total"`
	DocumentsTotalSize          int64  `json:"documents_total_size"`
	DocumentsTotalSizeString    string `json:"documents_total_size_string"`

	ProcessingStatus   []process.QueueStatus `json:"processing_queue"`
	SearchEngineStatus search.EngineStatus   `json:"search_engine_status"`

	ProcessingEnabled bool `json:"processing_enabled"`
	CronJobsEnabled   bool `json:"cronjobs_enabled"`
}

swagger:response SystemInfo

type User

type User struct {
	Id    int    `json:"id"`
	Name  string `json:"name"`
	Email string `json:"email"`
}

type UserDocumentStatistics

type UserDocumentStatistics struct {
	// user id
	UserId int `json:"id"`
	// total number of documents
	// Example: 53
	NumDocuments int `json:"num_documents"`
	// per-year statistics
	YearlyStats []models.UserDocumentYearStat `json:"yearly_stats"`
	// total number of metadata keys
	// Example: 4
	NumMetadataKeys int `json:"num_metadata_keys"`
	// total number of metadata values
	// Example: 14
	NumMetadataValues int `json:"num_metadata_values"`
	// array of last updated document ids
	// Example: [abcd]
	LastDocumentsUpdated []string `json:"last_documents_updated"`
	LastDocumentsAdded   []string `json:"last_documents_added"`
	LastDocumentsViewed  []string `json:"last_documents_viewed"`
	Favorites            []string `json:"favorites"`

	Indexing bool `json:"indexing"`
}

type UserPermissions

type UserPermissions struct {
	UserId      int                `json:"user_id" valid:"-"`
	Permissions models.Permissions `json:"permissions" valid:"-"`
}

type UserSharePermissions

type UserSharePermissions struct {
	UserId      int                `json:"user_id"`
	Username    string             `json:"user_name"`
	Permissions models.Permissions `json:"permissions"`
	models.Timestamp
}

Jump to

Keyboard shortcuts

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