repository

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CorePrompt

type CorePrompt struct {
	ID                 uuid.UUID   `json:"id"`
	Name               string      `json:"name"`
	Content            string      `json:"content"`
	Tags               []string    `json:"tags"`
	Parameters         []string    `json:"parameters"`
	SampleParameters   []byte      `json:"sample_parameters"`
	Format             string      `json:"format"`
	FormatInstructions pgtype.Text `json:"format_instructions"`
	UserID             string      `json:"user_id"`
	TenantID           string      `json:"tenant_id"`
	CreatedAt          time.Time   `json:"created_at"`
	UpdatedAt          time.Time   `json:"updated_at"`
}

type CreatePromptParams

type CreatePromptParams struct {
	UserID             string      `json:"user_id"`
	Name               string      `json:"name"`
	Content            string      `json:"content"`
	TenantID           string      `json:"tenant_id"`
	Tags               []string    `json:"tags"`
	Parameters         []string    `json:"parameters"`
	SampleParameters   []byte      `json:"sample_parameters"`
	Format             string      `json:"format"`
	FormatInstructions pgtype.Text `json:"format_instructions"`
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type DeletePromptParams

type DeletePromptParams struct {
	ID       uuid.UUID `json:"id"`
	TenantID string    `json:"tenant_id"`
}

type GetPromptByIDParams

type GetPromptByIDParams struct {
	ID       uuid.UUID `json:"id"`
	TenantID string    `json:"tenant_id"`
}

type GetPromptByNameParams

type GetPromptByNameParams struct {
	Name     string `json:"name"`
	TenantID string `json:"tenant_id"`
}

type ListPromptsParams

type ListPromptsParams struct {
	Limit    int32       `json:"limit"`
	Offset   int32       `json:"offset"`
	TenantID string      `json:"tenant_id"`
	Like     interface{} `json:"like"`
	Tags     []string    `json:"tags"`
	SortBy   string      `json:"sortBy"`
	Order    string      `json:"order"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreatePrompt

func (q *Queries) CreatePrompt(ctx context.Context, arg CreatePromptParams) (CorePrompt, error)

func (*Queries) DeletePrompt

func (q *Queries) DeletePrompt(ctx context.Context, arg DeletePromptParams) (uuid.UUID, error)

func (*Queries) GetPromptByID

func (q *Queries) GetPromptByID(ctx context.Context, arg GetPromptByIDParams) (CorePrompt, error)

func (*Queries) GetPromptByName

func (q *Queries) GetPromptByName(ctx context.Context, arg GetPromptByNameParams) (CorePrompt, error)

func (*Queries) ListPrompts

func (q *Queries) ListPrompts(ctx context.Context, arg ListPromptsParams) ([]CorePrompt, error)

func (*Queries) UpdatePrompt

func (q *Queries) UpdatePrompt(ctx context.Context, arg UpdatePromptParams) (CorePrompt, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type UpdatePromptParams

type UpdatePromptParams struct {
	ID                 uuid.UUID   `json:"id"`
	Name               pgtype.Text `json:"name"`
	Content            pgtype.Text `json:"content"`
	Tags               []string    `json:"tags"`
	Parameters         []string    `json:"parameters"`
	SampleParameters   []byte      `json:"sample_parameters"`
	Format             string      `json:"format"`
	FormatInstructions pgtype.Text `json:"format_instructions"`
	TenantID           string      `json:"tenant_id"`
}

Jump to

Keyboard shortcuts

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