fireditto

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Mode       Mode
	Operation  Op
	Email, UID string
	DryRun     bool
	User       struct {
		Offset, Limit int
		// contains filtered or unexported fields
	}
	Mem struct {
		Embed        CommandEmbed
		DeleteColumn string
		AllUsers     bool
		SkipUserIDs  stringSlice
	}
	// contains filtered or unexported fields
}

func (*Command) Handle

func (f *Command) Handle(ctx context.Context) error

func (*Command) Init added in v0.1.0

func (c *Command) Init() error

func (*Command) Order

func (f *Command) Order() firestore.Direction

func (*Command) Parse

func (f *Command) Parse(args []string) error

func (*Command) Validate

func (f *Command) Validate() error

type CommandEmbed added in v0.1.0

type CommandEmbed struct {
	// Content + Embed Field names
	Fields       stringPairs
	ModelVersion int
	Start        timeVar
}

func (*CommandEmbed) String added in v0.1.0

func (e *CommandEmbed) String() string

func (*CommandEmbed) Validate added in v0.1.0

func (e *CommandEmbed) Validate() error

type EmbeddingItem added in v0.1.0

type EmbeddingItem struct {
	DocIndex   int    // Index of document in the batch
	FieldIndex int    // Index of field in the embed fields
	Content    string // The content to embed
	EmbedPath  string // The path where embedding should be stored
	DocumentID string // Document ID for better logging
}

EmbeddingItem tracks an individual content item to be embedded

type Mode

type Mode uint8
const (
	ModeUser Mode = iota
	ModeMem
)

func (*Mode) Parse added in v0.1.0

func (m *Mode) Parse(mode string) error

func (Mode) String added in v0.1.0

func (i Mode) String() string

type Op added in v0.1.0

type Op uint8
const (
	OpGET Op = iota
	OpEmbed
	OpDeleteColumn
)

func (*Op) Parse added in v0.1.0

func (o *Op) Parse(operation string) error

func (Op) String added in v0.1.0

func (i Op) String() string

Jump to

Keyboard shortcuts

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