msgsearch

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteMessage

type DeleteMessage struct {
	ChannelId int64 `json:"channel_id"`
	MessageId int64 `json:"message_id"`
}

type Message

type Message struct {
	GuildId   *int64   `json:"guild_id"`
	ChannelId int64    `json:"channel_id"`
	UserId    int64    `json:"user_id"`
	MessageId int64    `json:"message_id"`
	Has       []string `json:"has"`
	Mentions  []int64  `json:"mentions"`
	Content   string   `json:"content"`
}

type Results

type Results struct {
	Ids   []int64
	Total int
}
type Search struct {
	// contains filtered or unexported fields
}

func NewSearch

func NewSearch(addresses []string, tlsSkip bool, username, password string) (*Search, error)

NewSearch creates a Search service.

func (*Search) DeleteMessage

func (s *Search) DeleteMessage(ctx context.Context, m DeleteMessage) error

func (*Search) IndexMessage

func (s *Search) IndexMessage(ctx context.Context, m Message) error

func (*Search) Search

func (s *Search) Search(ctx context.Context, req SearchRequest) (results *Results, err error)

func (*Search) UpdateMessage

func (s *Search) UpdateMessage(ctx context.Context, m Message) error

type SearchMessageResponse

type SearchMessageResponse struct {
	GuildId   []int64  `json:"guild_id"`
	ChannelId []int64  `json:"channel_id"`
	AuthorId  []int64  `json:"author_id"`
	MessageId []int64  `json:"message_id"`
	Has       []string `json:"has"`
	Mentions  []int64  `json:"mentions"`
	Content   []string `json:"content"`
}

type SearchRequest

type SearchRequest struct {
	GuildId   *int64   `json:"guild_id"`
	ChannelId int64    `json:"channel_id"`
	UserId    *int64   `json:"user_id"`
	Content   *string  `json:"content"`
	Mentions  []int64  `json:"mentions"`
	Has       []string `json:"has"`
	From      int      `json:"from"`
}

type SortOrder

type SortOrder struct {
	Order   string `json:"order,omitempty"`
	Missing string `json:"missing,omitempty"`
}

type UpdateMessage

type UpdateMessage struct {
	ChannelId int64  `json:"channel_id"`
	MessageId int64  `json:"message_id"`
	Content   string `json:"content"`
}

Jump to

Keyboard shortcuts

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