search

package module
v0.0.0-...-0ce1b36 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: MIT Imports: 8 Imported by: 0

README

Search system

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotInitialize = errors.New("the search system has not been initialized")
)

Functions

func Close

func Close() error

func Create

func Create(
	UserID uint64,
	Language string,
	YourStart int,
	YourEnd int,
	YourSex int,
	MyAge int,
	MySex int,
	interests ...string,
) error

Create inserts a new record into the search table

func Delete

func Delete(
	UserID uint64,
) error

Delete removes a record from the search table by user ID

func New

func New(config ...Config) error

Types

type Config

type Config struct {
	Interests []string
	LocalFile string
	Reset     bool
}

type Params

type Params struct {
	Query string // SQL query string
	Args  []any  // Arguments for the SQL query
}

type SearchResult

type SearchResult struct {
	ID     uint64
	UserID uint64
}
func Search(
	Language string,
	YourStart int,
	YourEnd int,
	YourSex int,
	MySex int,
	MyAge int,
	interests ...string,
) (*SearchResult, error)

type SearchSystem

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

Jump to

Keyboard shortcuts

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