models

package
v0.0.0-...-f03bf9e Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	NamespaceKey          = "namespace"
	DefaultNamespaceValue = "global" // TODO: using 'public'
	GlobalNamespaceValue  = "global"
)

Variables

This section is empty.

Functions

func WithNamespace

func WithNamespace(ctx context.Context, ns *Namespace) context.Context

Types

type Doc

type Doc struct {
	Id       string
	OID      int64
	Name     string
	Group    int
	ParentId int64
	Content  string
}

type DocQuery

type DocQuery struct {
	ParentId int64
	Oid      int64
}

type Document

type Document struct {
	ID          int64     `json:"id"`
	Title       string    `json:"title"`
	ParentID    int64     `json:"parent_id"`
	HtmlContent string    `json:"html_content"`
	Keywords    string    `json:"keywords"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

type Element

type Element struct {
	ID       string    `json:"id"`
	Name     string    `json:"name"`
	Group    int       `json:"group"`
	OID      int64     `json:"oid"`
	ParentId int64     `json:"parent_id"`
	Content  string    `json:"content"`
	Vector   []float32 `json:"vector"`
}

type File

type File struct {
	Name     string `json:"name"`
	OID      int64  `json:"oid"`
	ParentId int64  `json:"parent_id"`
	Content  string `json:"content"`
}

type Namespace

type Namespace struct {
	// contains filtered or unexported fields
}

func GetNamespace

func GetNamespace(ctx context.Context) (ns *Namespace)

func NewNamespace

func NewNamespace(name string) *Namespace

func (*Namespace) String

func (n *Namespace) String() string

Jump to

Keyboard shortcuts

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