adapters

package
v0.0.0-...-fe336e1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: MIT Imports: 21 Imported by: 1

Documentation

Index

Constants

View Source
const (
	VIDEO_WIDTH       = 872
	VIDEO_HEIGHT      = 480
	BACKGROUND_1      = "background-1.png"
	BACKGROUND_2      = "background-2.png"
	PART_1_VIDEO      = "part-1.mp4"
	PART_3_VIDEO      = "part-3.mp4"
	PART_6_VIDEO      = "part-6.mp4"
	PART_7_VIDEO      = "part-7.mp4"
	TRANSPARENT_IMAGE = "transparent.png"
	CAKE              = "birthday-cake.png"
	AUDIO_TRACK       = "audio.mp3"

	PART_2_FILTER = `` /* 496-byte string literal not displayed */

	PART_4_FILTER = `` /* 324-byte string literal not displayed */

	PART_5_FILTER = `` /* 390-byte string literal not displayed */

	PART_6_FILTER = `` /* 362-byte string literal not displayed */

	PART_7_FILTER = `` /* 579-byte string literal not displayed */

)
View Source
const DATE_LAYOUT = "2006-01-02"

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudTasksScheduler

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

func NewCloudTasksScheduler

func NewCloudTasksScheduler(client *cloudtasks.Client, clock core.Clock, queuePath string, taskDeadline time.Duration, taskDelay time.Duration) *CloudTasksScheduler

func (*CloudTasksScheduler) Schedule

func (scheduler *CloudTasksScheduler) Schedule(ctx context.Context, birthday core.Birthday, serviceUrl string)

type HttpFileDownloader

type HttpFileDownloader struct{}

func NewHttpFileDownloader

func NewHttpFileDownloader() *HttpFileDownloader

func (HttpFileDownloader) Download

func (HttpFileDownloader) Download(ctx context.Context, link string) (string, error)

type HttpRepositoryAdapter

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

func NewHttpRepositoryAdapter

func NewHttpRepositoryAdapter(repositoryUrl string) *HttpRepositoryAdapter

func (HttpRepositoryAdapter) GetBirthdays

func (adapter HttpRepositoryAdapter) GetBirthdays(ctx context.Context, date time.Time) ([]core.Birthday, error)

type TelegramBotWrapper

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

func NewTelegramWrapper

func NewTelegramWrapper(bot *telegram.Bot) *TelegramBotWrapper
func (wrapper *TelegramBotWrapper) GetFileLink(ctx context.Context, fileId string) (string, error)

func (*TelegramBotWrapper) GetProfilePictureFileIds

func (wrapper *TelegramBotWrapper) GetProfilePictureFileIds(ctx context.Context, userId int64) ([]string, error)

func (*TelegramBotWrapper) SendMessage

func (wrapper *TelegramBotWrapper) SendMessage(ctx context.Context, chatId int64, text string) error

func (*TelegramBotWrapper) SendVideo

func (wrapper *TelegramBotWrapper) SendVideo(ctx context.Context, chatId int64, pathToVideo string) (fileId string, err error)

func (*TelegramBotWrapper) SendVideoFromFileId

func (wrapper *TelegramBotWrapper) SendVideoFromFileId(ctx context.Context, chatId int64, fileId string) error

type VideoGenerator

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

func NewVideoGenerator

func NewVideoGenerator(resourceDir string) *VideoGenerator

func (VideoGenerator) CreateVideo

func (generator VideoGenerator) CreateVideo(pathToProfilePicture string) (string, error)

Jump to

Keyboard shortcuts

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