shared

package
v0.0.0-...-3d09e97 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageQueue

type MessageQueue interface {
	Publish(ctx context.Context, data *entity.WebhookRequest) error
}

type Repository

type Repository interface {
	CreateWebhook(ctx context.Context, data *entity.WebhookRequest) error
	GetWebhooks(ctx context.Context, curCursor string, limit uint) (datas []*entity.WebhookRequest, nextCursor string, totalCount int64, err error)
	FindWebhook(ctx context.Context, id string) (*entity.WebhookRequest, error)
	UpdateWebhook(ctx context.Context, id string, attempt *entity.Attempt) error
}

type WebhookServer

type WebhookServer interface {
	Repository
	Validate(src interface{}) error
	Publish(ctx context.Context, req *pb.SendWebhookRequest) (*entity.WebhookRequest, error)
	LogError(err error)

	// TODO: better name (rename please)
	VarCtx(ctx context.Context, src interface{}, tag string) error
}

func NewServer

func NewServer(cfg *cmd.Config) WebhookServer

Jump to

Keyboard shortcuts

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