Documentation
¶
Index ¶
- Constants
- type BotLoc
- type Config
- type FragmentConfig
- type FragmentMessage
- type MiniappConfig
- type NatsConfig
- type ProductClaimMessage
- type ReferralBonus
- type ReferralConfig
- type Service
- func (s *Service) OnTelegramPrivateMessage(ctx context.Context, user tgu.User, msg *telego.Message) error
- func (s *Service) OnTelegramSelfMember(ctx context.Context, joined bool, chat tgu.Chat) error
- func (s *Service) OnTelegramStarsTx(ctx context.Context, txID, payload string, amount int) (ok bool, err error)
- func (s *Service) Start(ctx context.Context) error
- type TaskMessage
- type TonConfig
- type UserInitMessage
- type UserNewMessage
- type WebhookRewardMessage
- type WorkersConfig
Constants ¶
View Source
const ( KeyWebhookReward = "webhook.reward" KeyUserNew = "users.new" KeyUserInit = "users.init" KeyTaskStart = "tasks.start" KeyTaskDone = "tasks.done" KeyTaskClaim = "tasks.claim" KeyChatCheckUser = "chats.check_user" KeyProductClaim = "products.claim" KeyFragmentSend = "fragment.send" KeyCheckPartnerTask = "checks.partner_task" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BotLoc ¶
type Config ¶
type Config struct {
Postgres dbx.Config `yaml:"postgres"`
Redis cache.Config `yaml:"redis"`
Nats NatsConfig `yaml:"nats"`
Ton TonConfig `yaml:"ton"`
Fragment FragmentConfig `yaml:"fragment"`
Referral ReferralConfig `yaml:"referral"`
Workers WorkersConfig `yaml:"workers"`
Bot tgu.BotConfig `yaml:"bot"`
Miniapp MiniappConfig `yaml:"miniapp"`
}
func LoadConfig ¶
func (*Config) SetDefaults ¶
func (cfg *Config) SetDefaults()
type FragmentConfig ¶
type FragmentMessage ¶
type FragmentMessage struct {
ProductClaimMessage
TicketID int64 `json:"ticketID"`
}
type MiniappConfig ¶
type NatsConfig ¶
type NatsConfig struct {
Addr string `yaml:"addr"`
}
type ProductClaimMessage ¶
type ReferralBonus ¶
type ReferralConfig ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) OnTelegramPrivateMessage ¶
func (*Service) OnTelegramSelfMember ¶
func (*Service) OnTelegramStarsTx ¶
type TaskMessage ¶
type UserInitMessage ¶
type UserNewMessage ¶
type WebhookRewardMessage ¶
Click to show internal directories.
Click to hide internal directories.