services

package
v0.0.0-...-74707a2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFilename

func GetFilename(path string) (string, error)

Types

type DiscordService

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

func NewDiscordService

func NewDiscordService(logger *zap.Logger) *DiscordService

func (*DiscordService) SendWebhook

func (ds *DiscordService) SendWebhook(webhook config.Webhook, webhookPayload discord.Webhook) error

type LocalStorageService

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

func (*LocalStorageService) SaveRequest

func (lss *LocalStorageService) SaveRequest(body []byte, path string) error

type NilStorageService

type NilStorageService struct {
}

func (*NilStorageService) SaveRequest

func (nss *NilStorageService) SaveRequest(body []byte, path string) error

type OpenProjectService

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

func NewOpenProjectService

func NewOpenProjectService(logger *zap.Logger) *OpenProjectService

func (*OpenProjectService) GetWorkPackagePayload

func (ops *OpenProjectService) GetWorkPackagePayload(payload openproject.WorkPackageWebhookPayload) (discord.Webhook, error)

func (*OpenProjectService) ValidateSignature

func (ops *OpenProjectService) ValidateSignature(body []byte, webhook config.Webhook, r *http.Request) error

type S3StorageService

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

func NewS3StorageService

func NewS3StorageService(logger *zap.Logger, secure bool, bucketName, region, endpoint, accessKey, secretKey string) *S3StorageService

func (*S3StorageService) SaveRequest

func (s3 *S3StorageService) SaveRequest(body []byte, path string) error

type StorageService

type StorageService interface {
	SaveRequest(body []byte, path string) error
}

func NewStorageService

func NewStorageService(lc fx.Lifecycle, logger *zap.Logger, router *mux.Router) StorageService

type WebhookService

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

func NewWebhookService

func NewWebhookService(logger *zap.Logger) *WebhookService

func (*WebhookService) GetWebhook

func (ws *WebhookService) GetWebhook(webhookName string) (config.Webhook, error)

Jump to

Keyboard shortcuts

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