service

package
v0.0.0-...-5a4e9c2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataService

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

func NewDataService

func NewDataService(ctx *context.Context, db *sql.DB, logger *zap.Logger) *DataService

func (*DataService) CreateFile

func (svc *DataService) CreateFile(tenantId string) (*models.File, error)

func (*DataService) GetFile

func (svc *DataService) GetFile(tenantId string, id string) (*models.File, error)

func (*DataService) GetTenantByAPIKey

func (svc *DataService) GetTenantByAPIKey(apiKey string) (*models.Tenant, error)

func (*DataService) SetFileActive

func (svc *DataService) SetFileActive(tenantId string, id string) error

func (*DataService) SetFileUploadCancelled

func (svc *DataService) SetFileUploadCancelled(tenantId string, id string) error

func (*DataService) UpdateFile

func (svc *DataService) UpdateFile(file *models.File) error

type HookHandlerService

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

func NewHookHandlerService

func NewHookHandlerService(logger *zap.Logger, dataService *DataService, storageService *StorageService) *HookHandlerService

func (*HookHandlerService) InvokeHook

func (svc *HookHandlerService) InvokeHook(r *http.Request) *hooks.HookResponse

type StorageService

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

func NewStorageService

func NewStorageService(config *StorageServiceConfig, logger *zap.Logger, s3svc *s3.S3) *StorageService

func (*StorageService) DeleteFile

func (svc *StorageService) DeleteFile(path string) error

func (*StorageService) MoveFile

func (svc *StorageService) MoveFile(source string, destination string, contentType string) error

type StorageServiceConfig

type StorageServiceConfig struct {
	Bucket string
}

func NewStorageServiceConfig

func NewStorageServiceConfig(bucket string) *StorageServiceConfig

Jump to

Keyboard shortcuts

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