knowledgebase

package
v0.0.0-...-eaefaf9 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRequest

type CreateRequest struct {
	Name        string   `json:"name"`
	Description *string  `json:"description,omitempty"`
	Tags        []string `json:"tags,omitempty"`
}

CreateRequest represents the DTO for creating a knowledge base

type KnowledgeBase

type KnowledgeBase struct {
	ID          int64     `json:"id"`
	Name        string    `json:"name"`
	Description *string   `json:"description,omitempty"`
	Tags        []string  `json:"tags,omitempty"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

KnowledgeBase represents the domain model for a knowledge base entity

type ListRequest

type ListRequest struct {
	Limit  int      `json:"limit,omitempty"`
	Offset int      `json:"offset,omitempty"`
	Search string   `json:"search,omitempty"`
	Tags   []string `json:"tags,omitempty"`
}

ListRequest represents the DTO for listing knowledge bases

type ListResponse

type ListResponse struct {
	Items []KnowledgeBase `json:"items"`
	Total int64           `json:"total"`
}

ListResponse represents the DTO for listing response

type Storage

type Storage interface {
	// Create creates a new knowledge base
	Create(ctx context.Context, req CreateRequest) (*KnowledgeBase, error)

	// Get retrieves a knowledge base by ID
	Get(ctx context.Context, id int64) (*KnowledgeBase, error)

	// Update updates an existing knowledge base
	Update(ctx context.Context, id int64, req UpdateRequest) (*KnowledgeBase, error)

	// Delete deletes a knowledge base by ID
	Delete(ctx context.Context, id int64) error

	// List lists knowledge bases with pagination and filtering
	List(ctx context.Context, req ListRequest) (*ListResponse, error)
}

Storage defines the interface for knowledge base storage operations

type UpdateRequest

type UpdateRequest struct {
	Name        *string  `json:"name,omitempty"`
	Description *string  `json:"description,omitempty"`
	Tags        []string `json:"tags,omitempty"`
}

UpdateRequest represents the DTO for updating a knowledge base

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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