smr

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoLink = errors.New("no link")
	ErrParse  = errors.New("parse error")
	ErrScheme = errors.New("scheme error")
)

Functions

func CheckUrl added in v0.16.0

func CheckUrl(urlString string) (error, error)

func FormatUrlCheckError added in v0.16.0

func FormatUrlCheckError(err error, platform bot.FromPlatform, language string, i18n *i18n.I18n) string

func IsUrlCheckError added in v0.16.0

func IsUrlCheckError(err error) bool

func NewModules

func NewModules() fx.Option

func NewService

func NewService() func(param NewServiceParam) (*Service, error)

func Run

func Run() func(s *Service)

Types

type NewServiceParam

type NewServiceParam struct {
	fx.In

	LifeCycle fx.Lifecycle

	Config *configs.Config
	Logger *logger.Logger
	I18n   *i18n.I18n

	RedisClient *datastore.Redis
	Ent         *datastore.Ent
	Queue       *smrqueue.Queue

	Model *smr.Model

	TgBot      *tgbot.BotService
	SlackBot   *slackbot.BotService
	DiscordBot *discordbot.BotService
}

type Service

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

func (*Service) Check

func (s *Service) Check(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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