query

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const AppConfigKeyEncryptionKey = "encryption_key"

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfigStore

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

func NewAppConfigStore

func NewAppConfigStore(db *sql.DB) *AppConfigStore

func (*AppConfigStore) EnsureEncryptionKey

func (s *AppConfigStore) EnsureEncryptionKey(ctx context.Context, seed string) (string, error)

func (*AppConfigStore) Get

func (s *AppConfigStore) Get(ctx context.Context, key string) (*models.AppConfig, error)

func (*AppConfigStore) Set

func (s *AppConfigStore) Set(ctx context.Context, key string, value string) error

type ChannelContactStore

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

func NewChannelContactStore

func NewChannelContactStore(db *sql.DB) *ChannelContactStore

func (*ChannelContactStore) Connect

func (s *ChannelContactStore) Connect(ctx context.Context, contactID string, connectedAt time.Time) error

func (*ChannelContactStore) CountByChannel

func (s *ChannelContactStore) CountByChannel(ctx context.Context, channelID string) (int, error)

func (*ChannelContactStore) CountConnectedByChannel

func (s *ChannelContactStore) CountConnectedByChannel(ctx context.Context, channelID string) (int, error)

func (*ChannelContactStore) Create

func (s *ChannelContactStore) Create(ctx context.Context, contact *models.ChannelContact) error

func (*ChannelContactStore) GetByChannelAndExternalUser

func (s *ChannelContactStore) GetByChannelAndExternalUser(ctx context.Context, channelID, externalUserID string) (*models.ChannelContact, error)

func (*ChannelContactStore) GetByConnectionCode

func (s *ChannelContactStore) GetByConnectionCode(ctx context.Context, channelID, code string) (*models.ChannelContact, error)

func (*ChannelContactStore) GetByID

func (*ChannelContactStore) ListByChannel

func (s *ChannelContactStore) ListByChannel(ctx context.Context, channelID string) ([]models.ChannelContact, error)

func (*ChannelContactStore) Update

func (s *ChannelContactStore) Update(ctx context.Context, contact *models.ChannelContact) error

type ChannelStore

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

func NewChannelStore

func NewChannelStore(db *sql.DB, encryptor *crypto.Encryptor) *ChannelStore

func (*ChannelStore) Count

func (s *ChannelStore) Count(ctx context.Context) (int, error)

func (*ChannelStore) Create

func (s *ChannelStore) Create(ctx context.Context, channel *models.Channel) error

func (*ChannelStore) Delete

func (s *ChannelStore) Delete(ctx context.Context, id string) error

func (*ChannelStore) GetByID

func (s *ChannelStore) GetByID(ctx context.Context, id string) (*models.Channel, error)

func (*ChannelStore) List

func (s *ChannelStore) List(ctx context.Context) ([]models.Channel, error)

func (*ChannelStore) ListEnabled

func (s *ChannelStore) ListEnabled(ctx context.Context) ([]models.Channel, error)

func (*ChannelStore) Update

func (s *ChannelStore) Update(ctx context.Context, channel *models.Channel) error

func (*ChannelStore) UpdateState

func (s *ChannelStore) UpdateState(ctx context.Context, id string, state *string) error

type ChatStore

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

func NewChatStore

func NewChatStore(db *sql.DB) *ChatStore

func (*ChatStore) AppendTurn

func (s *ChatStore) AppendTurn(
	ctx context.Context,
	conversation *models.ChatConversation,
	createConversation bool,
	userMessage *models.ChatMessage,
	assistantMessage *models.ChatMessage,
) error

func (*ChatStore) CreateConversation

func (s *ChatStore) CreateConversation(ctx context.Context, conversation *models.ChatConversation) error

func (*ChatStore) DeleteConversation

func (s *ChatStore) DeleteConversation(ctx context.Context, userID string, conversationID string) error

func (*ChatStore) GetConversationByID

func (s *ChatStore) GetConversationByID(ctx context.Context, userID string, conversationID string) (*models.ChatConversation, error)

func (*ChatStore) ListByUser

func (s *ChatStore) ListByUser(ctx context.Context, userID string) ([]models.ChatConversation, error)

func (*ChatStore) ListMessages

func (s *ChatStore) ListMessages(ctx context.Context, conversationID string) ([]models.ChatMessage, error)

func (*ChatStore) UpdateConversationSettings

func (s *ChatStore) UpdateConversationSettings(ctx context.Context, conversation *models.ChatConversation) error

type ClusterStore

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

func NewClusterStore

func NewClusterStore(db *sql.DB, encryptor *crypto.Encryptor) *ClusterStore

func (*ClusterStore) Create

func (s *ClusterStore) Create(ctx context.Context, c *models.Cluster) error

func (*ClusterStore) Delete

func (s *ClusterStore) Delete(ctx context.Context, id string) error

func (*ClusterStore) GetByID

func (s *ClusterStore) GetByID(ctx context.Context, id string) (*models.Cluster, error)

func (*ClusterStore) List

func (s *ClusterStore) List(ctx context.Context) ([]models.Cluster, error)

func (*ClusterStore) Update

func (s *ClusterStore) Update(ctx context.Context, c *models.Cluster) error

type ExecutionStore

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

func NewExecutionStore

func NewExecutionStore(db *sql.DB) *ExecutionStore

func (*ExecutionStore) CountSince

func (s *ExecutionStore) CountSince(ctx context.Context, since time.Time) (int, error)

func (*ExecutionStore) Create

func (s *ExecutionStore) Create(ctx context.Context, e *models.Execution) error

func (*ExecutionStore) CreateNodeExecution

func (s *ExecutionStore) CreateNodeExecution(ctx context.Context, ne *models.NodeExecution) error

func (*ExecutionStore) GetByID

func (s *ExecutionStore) GetByID(ctx context.Context, id string) (*models.Execution, error)

func (*ExecutionStore) ListByExecution

func (s *ExecutionStore) ListByExecution(ctx context.Context, executionID string) ([]models.NodeExecution, error)

func (*ExecutionStore) ListByPipeline

func (s *ExecutionStore) ListByPipeline(ctx context.Context, pipelineID string) ([]models.Execution, error)

func (*ExecutionStore) UpdateNodeExecution

func (s *ExecutionStore) UpdateNodeExecution(ctx context.Context, id string, status string, output json.RawMessage, errMsg *string, completedAt *time.Time) error

func (*ExecutionStore) UpdateStatus

func (s *ExecutionStore) UpdateStatus(ctx context.Context, id, status string, completedAt *time.Time, errMsg *string) error

type KubernetesClusterStore

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

KubernetesClusterStore persists normalized Kubernetes cluster definitions.

func NewKubernetesClusterStore

func NewKubernetesClusterStore(db *sql.DB, encryptor *crypto.Encryptor) *KubernetesClusterStore

NewKubernetesClusterStore creates a store for Kubernetes clusters.

func (*KubernetesClusterStore) Create

Create inserts a new Kubernetes cluster.

func (*KubernetesClusterStore) Delete

func (s *KubernetesClusterStore) Delete(ctx context.Context, id string) error

Delete removes the Kubernetes cluster definition.

func (*KubernetesClusterStore) GetByID

GetByID returns a Kubernetes cluster including decrypted kubeconfig data.

func (*KubernetesClusterStore) List

List returns Kubernetes clusters without decrypting kubeconfig payloads.

func (*KubernetesClusterStore) Update

Update replaces the normalized Kubernetes cluster definition.

type LLMProviderStore

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

func NewLLMProviderStore

func NewLLMProviderStore(db *sql.DB, encryptor *crypto.Encryptor) *LLMProviderStore

func (*LLMProviderStore) Create

func (*LLMProviderStore) Delete

func (s *LLMProviderStore) Delete(ctx context.Context, id string) error

func (*LLMProviderStore) GetByID

func (s *LLMProviderStore) GetByID(ctx context.Context, id string) (*models.LLMProvider, error)

func (*LLMProviderStore) GetDefault

func (s *LLMProviderStore) GetDefault(ctx context.Context) (*models.LLMProvider, error)

func (*LLMProviderStore) List

func (*LLMProviderStore) Update

type PipelineStore

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

func NewPipelineStore

func NewPipelineStore(db *sql.DB) *PipelineStore

func (*PipelineStore) Count

func (s *PipelineStore) Count(ctx context.Context) (int, error)

func (*PipelineStore) CountByStatus

func (s *PipelineStore) CountByStatus(ctx context.Context, status string) (int, error)

func (*PipelineStore) Create

func (s *PipelineStore) Create(ctx context.Context, p *models.Pipeline) error

func (*PipelineStore) Delete

func (s *PipelineStore) Delete(ctx context.Context, id string) error

func (*PipelineStore) FindByPartialID

func (s *PipelineStore) FindByPartialID(ctx context.Context, partialID string) (*models.Pipeline, error)

func (*PipelineStore) GetByID

func (s *PipelineStore) GetByID(ctx context.Context, id string) (*models.Pipeline, error)

func (*PipelineStore) List

func (s *PipelineStore) List(ctx context.Context) ([]models.Pipeline, error)

func (*PipelineStore) ListActive

func (s *PipelineStore) ListActive(ctx context.Context) ([]models.Pipeline, error)

func (*PipelineStore) Update

func (s *PipelineStore) Update(ctx context.Context, p *models.Pipeline) error

type SecretStore

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

func NewSecretStore

func NewSecretStore(db *sql.DB, encryptor *crypto.Encryptor) *SecretStore

func (*SecretStore) Create

func (s *SecretStore) Create(ctx context.Context, secret *models.Secret) error

func (*SecretStore) Delete

func (s *SecretStore) Delete(ctx context.Context, id string) error

func (*SecretStore) GetByID

func (s *SecretStore) GetByID(ctx context.Context, id string) (*models.Secret, error)

func (*SecretStore) List

func (s *SecretStore) List(ctx context.Context) ([]models.Secret, error)

func (*SecretStore) TemplateValues

func (s *SecretStore) TemplateValues(ctx context.Context) (map[string]string, error)

func (*SecretStore) Update

func (s *SecretStore) Update(ctx context.Context, secret *models.Secret, replaceValue bool) error

type TemplateStore

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

func NewTemplateStore

func NewTemplateStore(db *sql.DB) *TemplateStore

func (*TemplateStore) Create

func (s *TemplateStore) Create(ctx context.Context, template *models.Template) error

func (*TemplateStore) Delete

func (s *TemplateStore) Delete(ctx context.Context, id string) error

func (*TemplateStore) GetByID

func (s *TemplateStore) GetByID(ctx context.Context, id string) (*models.Template, error)

func (*TemplateStore) List

func (s *TemplateStore) List(ctx context.Context) ([]models.Template, error)

type UserStore

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

func NewUserStore

func NewUserStore(db *sql.DB, encryptor *crypto.Encryptor) *UserStore

func (*UserStore) Create

func (s *UserStore) Create(ctx context.Context, user *models.User) error

func (*UserStore) Delete

func (s *UserStore) Delete(ctx context.Context, id string) error

func (*UserStore) EnsureDefaultUser

func (s *UserStore) EnsureDefaultUser(ctx context.Context, username string, password string) error

func (*UserStore) GetByUsername

func (s *UserStore) GetByUsername(ctx context.Context, username string) (*models.User, error)

func (*UserStore) List

func (s *UserStore) List(ctx context.Context) ([]models.User, error)

func (*UserStore) UpdatePassword

func (s *UserStore) UpdatePassword(ctx context.Context, id string, password string) error

Jump to

Keyboard shortcuts

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