controller

package
v0.0.0-...-5e664b8 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateCreateRequest

func ValidateCreateRequest(dirtyData *AssistantCreateRequestIDO) error

func ValidateUpdateRequest

func ValidateUpdateRequest(dirtyData *AssistantUpdateRequestIDO) error

Types

type AssistantController

AssistantController Interface for assistant business logic controller.

type AssistantControllerImpl

type AssistantControllerImpl struct {
	Config              *config.Conf
	Logger              *slog.Logger
	UUID                uuid.Provider
	S3                  s3_storage.S3Storager
	Password            password.Provider
	Kmutex              kmutex.Provider
	DbClient            *mongo.Client
	TenantStorer        tenant_s.TenantStorer
	UserStorer          user_s.UserStorer
	AssistantFileStorer assistantfile_s.AssistantFileStorer
	AssistantStorer     t_s.AssistantStorer
	TemplatedEmailer    templatedemailer.TemplatedEmailer
}

func (*AssistantControllerImpl) ArchiveByID

func (*AssistantControllerImpl) Create

func (*AssistantControllerImpl) DeleteByID

func (impl *AssistantControllerImpl) DeleteByID(ctx context.Context, id primitive.ObjectID) error

func (*AssistantControllerImpl) GetByID

func (*AssistantControllerImpl) ListAsSelectOptionByFilter

func (*AssistantControllerImpl) UpdateByID

type AssistantCreateRequestIDO

type AssistantCreateRequestIDO struct {
	Name             string               `bson:"name" json:"name"`
	Description      string               `bson:"description" json:"description"`
	Instructions     string               `bson:"instructions" json:"instructions"`
	Model            string               `bson:"model" json:"model"`
	AssistantFileIDs []primitive.ObjectID `bson:"assistant_file_ids" json:"assistant_file_ids"`
}

type AssistantUpdateRequestIDO

type AssistantUpdateRequestIDO struct {
	ID               primitive.ObjectID   `bson:"id" json:"id"`
	Name             string               `bson:"name" json:"name"`
	Instructions     string               `bson:"instructions" json:"instructions"`
	Model            string               `bson:"model" json:"model"`
	Description      string               `bson:"description" json:"description"`
	AssistantFileIDs []primitive.ObjectID `bson:"assistant_file_ids" json:"assistant_file_ids"`
}

Jump to

Keyboard shortcuts

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