service

package
v0.0.0-...-0ce59a9 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleService

type GoogleService interface {
	ServiceAccountCredentialsExistsForTenant(ctx context.Context, tenant string) (bool, error)

	GetGmailService(ctx context.Context, username, tenant string) (*gmail.Service, error)

	GetGmailServiceWithServiceAccount(ctx context.Context, username string, tenant string) (*gmail.Service, error)
	GetGCalServiceWithServiceAccount(ctx context.Context, username string, tenant string) (*calendar.Service, error)

	GetGmailServiceWithOauthToken(ctx context.Context, tokenEntity authEntity.OAuthTokenEntity) (*gmail.Service, error)
	GetGCalServiceWithOauthToken(ctx context.Context, tokenEntity authEntity.OAuthTokenEntity) (*calendar.Service, error)
}

func NewGoogleService

func NewGoogleService(cfg *config.Config, postgresRepositories *postgresRepository.Repositories, authRepositories *authRepository.Repositories, services *Services) GoogleService

type Services

type Services struct {
	CommonServices *commonService.Services

	CommonAuthRepositories *repository.Repositories
	GoogleService          GoogleService
}

func InitServices

func InitServices(cfg *config.Config, commonServices *commonService.Services, db *gorm.DB) *Services

Jump to

Keyboard shortcuts

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