Documentation
¶
Index ¶
- func TappAdsGetTasks(ctx context.Context, apiKey string, ip, userAgent, lang string, isPremium bool, ...) ([]common.TappAdsTask, error)
- func TappAdsSendClick(ctx context.Context, log zerolog.Logger, apiKey, ip, userAgent string, ...) error
- type BotLoc
- type Config
- type HTTP
- type HTTPConfig
- type MiniappConfig
- type NatsConfig
- type Service
- func (s *Service) AllProducts() []*common.Product
- func (s *Service) ClaimProduct(ctx context.Context, user tgu.User, productID int64) (spendPoints int64, err error)
- func (s *Service) DeleteProduct(ctx context.Context, productID int64) error
- func (s *Service) DeleteTask(ctx context.Context, taskID int64) error
- func (s *Service) ForceRewardUser(ctx context.Context, userID, points int64) error
- func (s *Service) GetAllBotChats(ctx context.Context) ([]tgu.Chat, error)
- func (s *Service) GetAllProducts(ctx context.Context) ([]*common.Product, error)
- func (s *Service) GetAllTasksWithClicks(ctx context.Context) ([]*common.FullTask, error)
- func (s *Service) GetInviteMessage(ctx context.Context, user tgu.User) (msgID string, err error)
- func (s *Service) GetTaskStarsInvoice(ctx context.Context, userID, taskID int64) (invoiceLink string, err error)
- func (s *Service) GetTaskTonTransaction(ctx context.Context, userID, taskID int64) (*common.TonCTx, error)
- func (s *Service) GetTasksEvents(ctx context.Context, userID, fromTime int64) ([]common.TaskEvent, error)
- func (s *Service) GetUserProgress(ctx context.Context, user tgu.User, startParam, userIP, userAgent string) (userTasks []common.UserTask, points int64, err error)
- func (s *Service) GetUserRefs(ctx context.Context, userID int64) (refCount, refPoints int64, err error)
- func (s *Service) ParseUserAuth(authData string) (*tgu.Auth, error)
- func (s *Service) ParseUserAuth64(authData string) (*tgu.Auth, error)
- func (s *Service) ProcessUserInit(ctx context.Context, userID int64) error
- func (s *Service) ProcessUserStart(ctx context.Context, user tgu.User, startParam, ipAddress, userAgent string) error
- func (s *Service) SaveProduct(ctx context.Context, p *common.Product) error
- func (s *Service) SaveTask(ctx context.Context, t *common.FullTask) error
- func (s *Service) Start(ctx context.Context) error
- func (s *Service) TaskClaim(ctx context.Context, userID, taskID, subID int64) error
- func (s *Service) TaskStart(ctx context.Context, userID, taskID, subID int64, userIP, userAgent string) error
- type TonConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TappAdsGetTasks ¶
Types ¶
type BotLoc ¶
type Config ¶
type Config struct {
Postgres dbx.Config `yaml:"postgres"`
Redis cache.Config `yaml:"redis"`
Nats NatsConfig `yaml:"nats"`
HTTP HTTPConfig `yaml:"http"`
Bot tgu.BotConfig `yaml:"bot"`
Miniapp MiniappConfig `yaml:"miniapp"`
Ton TonConfig `yaml:"ton"`
}
func LoadConfig ¶
func (*Config) SetDefaults ¶
func (cfg *Config) SetDefaults()
type HTTP ¶
type HTTP struct {
// contains filtered or unexported fields
}
func NewHTTP ¶
func NewHTTP(cfg HTTPConfig, log zerolog.Logger, svc *Service, metrics *prometheus.Registry) *HTTP
type HTTPConfig ¶
type MiniappConfig ¶
type NatsConfig ¶
type NatsConfig struct {
Addr string `yaml:"addr"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) AllProducts ¶
func (*Service) ClaimProduct ¶
func (*Service) DeleteProduct ¶
func (*Service) ForceRewardUser ¶
func (*Service) GetAllBotChats ¶
func (*Service) GetAllProducts ¶
func (*Service) GetAllTasksWithClicks ¶
func (*Service) GetInviteMessage ¶
func (*Service) GetTaskStarsInvoice ¶
func (*Service) GetTaskTonTransaction ¶
func (*Service) GetTasksEvents ¶
func (*Service) GetUserProgress ¶
func (*Service) GetUserRefs ¶
func (*Service) ParseUserAuth64 ¶
func (*Service) ProcessUserInit ¶
func (*Service) ProcessUserStart ¶
func (*Service) SaveProduct ¶
Click to show internal directories.
Click to hide internal directories.