document

package
v0.0.0-...-aa737f3 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidFiletypeError = errors.New("invalid filetype, must be a pdf, txt, or docx")
)

Functions

This section is empty.

Types

type SearchDocuments

type SearchDocuments struct {
	Query  string `schema:"query,required"`
	Limit  int    `schema:"limit"`
	Offset int    `schema:"offset"`
}

type SearchDocumentsResult

type SearchDocumentsResult struct {
	Uuid        uuid.UUID      `json:"uuid,omitempty"`
	CreatedAt   time.Time      `json:"createdAt,omitempty"`
	UpdatedAt   time.Time      `json:"UpdatedAt,omitempty"`
	Title       string         `json:"title,omitempty"`
	Description string         `json:"description,omitempty"`
	Filename    string         `json:"filename,omitempty"`
	Filetype    types.Filetype `json:"filetype,omitempty"`
	Username    string         `json:"username,omitempty"`
	Rank        float32        `json:"rank,omitempty"`
}

type UploadDocument

type UploadDocument struct {
	Title       string         `json:"title,omitempty"`
	Description string         `json:"description,omitempty"`
	FileName    string         `json:"filename,omitempty"`
	File        []byte         `json:"file,omitempty"`
	FileType    types.Filetype `json:"filetype,omitempty"`
	UserID      int            `json:"userId,omitempty"`
	Content     *string        `json:"content,omitempty"`
}

func (*UploadDocument) SetFile

func (u *UploadDocument) SetFile(file []byte)

func (*UploadDocument) SetFileName

func (u *UploadDocument) SetFileName(filename string)

func (*UploadDocument) SetFileType

func (u *UploadDocument) SetFileType(filetype string) error

Jump to

Keyboard shortcuts

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