service

package
v0.0.0-...-57159d5 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MIT Imports: 12 Imported by: 0

README

Service

Documentation

Index

Constants

View Source
const (
	SYNC_LOOP_TIMEOUT = 10 * time.Minute
)

Variables

View Source
var Jobs = map[string]func(){}

ProviderSet is service providers.

Functions

This section is empty.

Types

type AuthService

type AuthService struct {
	pb.UnimplementedAuthServiceServer
	// contains filtered or unexported fields
}

func NewAuthService

func NewAuthService(
	logger log.Logger,
	uc *biz.AuthUsecase,
	gg *biz.GoogleUseCase,
) *AuthService

func (*AuthService) Auth

func (s *AuthService) Auth(ctx context.Context, req *pb.AuthRequest) (*pb.AuthReply, error)

func (*AuthService) AuthWithID

func (s *AuthService) AuthWithID(ctx context.Context, id int64) (string, error)

func (*AuthService) Callback

func (s *AuthService) Callback(ctx context.Context, req *pb.CallbackRequest) (*pb.CallbackReply, error)

func (*AuthService) Login

func (s *AuthService) Login(_ context.Context, req *pb.LoginRequest) (*pb.LoginReply, error)

type ChatService

type ChatService struct {
	pb.UnimplementedChatServer
	// contains filtered or unexported fields
}

func NewChatService

func NewChatService(uc *biz.ChatUseCase, guc *biz.GoogleUseCase, uuc *biz.UserUseCase, logger log.Logger) *ChatService

func (*ChatService) TGChat

func (s *ChatService) TGChat(ctx context.Context, tguserID string, message string) (string, error)

func (*ChatService) UserChat

type CronService

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

func NewCronService

func NewCronService(
	c *conf.Cron,
	logger log.Logger,
	uuc *biz.UserUseCase,
	cuc *biz.CalendarUseCase,
	euc *biz.EventUseCase,
	ehuc *biz.EventHistoryUseCase,
	guc *biz.GoogleUseCase,
	aiuc *biz.OpenAIUseCase,
) *CronService

func (*CronService) Init

func (s *CronService) Init()

Init initializes the cron service.

type TGService

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

func NewTGService

func NewTGService(logger log.Logger) *TGService

type UserService

type UserService struct {
	pb.UnimplementedUserServiceServer
	// contains filtered or unexported fields
}

func NewUserService

func NewUserService(
	logger log.Logger,
	uc *biz.UserUseCase,
	gg *biz.GoogleUseCase,
) *UserService

func (*UserService) CreateUser

func (s *UserService) CreateUser(ctx context.Context, req *pb.CreateUserRequest) (*pb.CreateUserReply, error)

Jump to

Keyboard shortcuts

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