embeds

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound     = errors.New("embed not found")
	ErrInvalidInput = errors.New("invalid embed input")
	ErrConflict     = errors.New("autoreaction conflict")
	ErrMaxSize      = errors.New("file has reached maximum size")
	ErrBadRequest   = errors.New("request for cdn with errors")
)

Functions

This section is empty.

Types

type FxArgs added in v0.5.0

type FxArgs struct {
	fx.In

	EmbedsDB embeds.Interface
}

type Interface

type Interface interface {
	ObtainOne(ctx context.Context, id int) (*domain.Embed, error)
	DeleteOne(ctx context.Context, id int) (*domain.Embed, error)
	UpsertOne(ctx context.Context, embed domain.Embed) (*domain.Embed, error)
	ObtainAll(ctx context.Context, guildID, authorID string) ([]domain.Embed, error)
	HandlerMessageContent(ctx context.Context, id int, guildID, authorID, content string) (*domain.Embed, error)
	HandlerAttachments(ctx context.Context, id int, guildID, authorID string, message messages.Attachment) (*domain.Embed, error)
}
type MenuID struct {
	// contains filtered or unexported fields
}

type Service

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

func New

func New(FxArgs FxArgs) *Service

func (*Service) DeleteOne added in v0.4.0

func (service *Service) DeleteOne(ctx context.Context, id int) (*domain.Embed, error)

func (*Service) HandlerAttachments

func (service *Service) HandlerAttachments(ctx context.Context, id int, guildID, authorID string, message messages.Attachment) (*domain.Embed, error)

func (*Service) HandlerMessageContent

func (service *Service) HandlerMessageContent(ctx context.Context, id int, guildID, authorID, content string) (*domain.Embed, error)

func (*Service) ObtainAll added in v0.4.0

func (service *Service) ObtainAll(ctx context.Context, guildID, authorID string) ([]domain.Embed, error)

func (*Service) ObtainOne added in v0.4.0

func (service *Service) ObtainOne(ctx context.Context, id int) (*domain.Embed, error)

func (*Service) UpsertOne added in v0.4.0

func (service *Service) UpsertOne(ctx context.Context, embed domain.Embed) (*domain.Embed, error)

Jump to

Keyboard shortcuts

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