handlers

package
v0.0.0-...-0637108 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependencies

type Dependencies struct {
	Logger        logger.Logger
	EchoServer    EchoServer
	MessageBroker MessageBroker
	GormDB        *gorm.DB
	Services      Services
}

Dependencies - dependencies for Service constructor

type EchoContext

type EchoContext interface {
	echo.Context
}

type EchoServer

type EchoServer interface {
	Start(string) error
	Shutdown(ctx context.Context) error
}

type MessageBroker

type MessageBroker interface {
	Publish(ctx context.Context, exchange, routingKey string, body []byte) error
}

type OpenGraphService

type OpenGraphService interface {
	OpenGraphEditor(ctx context.Context, params routes.OpenGraphParams) (string, error)
	GetMetadata(ctx context.Context, params routes.GetMetadataParams) (routes.Metadata, error)
}

type Options

type Options struct {
	Path                string
	Port                int
	ShutdownGracePeriod time.Duration
}

func (*Options) GetFlagSet

func (o *Options) GetFlagSet() *pflag.FlagSet

GetFlagSet returns flag set for Options

type RabbitMqService

type RabbitMqService struct {
	HostPort string
}

type Service

type Service struct {
	Services Services
	// contains filtered or unexported fields
}

func NewService

func NewService(ctx context.Context, opts *Options, deps *Dependencies) (*Service, error)

NewService - constructor for Service

func (*Service) Close

func (svc *Service) Close() (err error)

Close closes the API

func (*Service) GetMetadata

func (svc *Service) GetMetadata(c echo.Context, params routes.GetMetadataParams) error

func (*Service) OpenGraph

func (svc *Service) OpenGraph(c echo.Context, params routes.OpenGraphParams) error

OpenGraph - Data (GET /opengraph)

func (*Service) Start

func (svc *Service) Start()

Start starts the API

type Services

type Services struct {
	OpenGraphSvc OpenGraphService
}

Jump to

Keyboard shortcuts

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