handlers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonMiddleware

func CommonMiddleware(next http.Handler) http.Handler

CommonMiddleware the generic middleware

Types

type HealthCheckRoute

type HealthCheckRoute struct {
}

func (HealthCheckRoute) GetHealthCheck

func (hcr HealthCheckRoute) GetHealthCheck() appHandler

GetHealthCheck returns OK when is called

func (HealthCheckRoute) SetupRoutes

func (hcr HealthCheckRoute) SetupRoutes(routePath string, router *mux.Router)

type MessagesRoute

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

func (MessagesRoute) GetImage

func (m MessagesRoute) GetImage() appHandler

GetImage gets the image based on the provided name from the cloud storage

func (MessagesRoute) PostMessage

func (m MessagesRoute) PostMessage() appHandler

PostMessage post a message to a specific social channel

func (MessagesRoute) SetupRoutes

func (m MessagesRoute) SetupRoutes(routePath string, router *mux.Router)

type ServerConfig

type ServerConfig struct {
	ApiKey string
}

ServerConfig to wrap configuration

type StartServerCommand

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

StartServerCommand is struct for info required to start an http server

func (*StartServerCommand) Address

func (fc *StartServerCommand) Address() string

func (*StartServerCommand) Flags

func (fc *StartServerCommand) Flags() *flag.FlagSet

Flags returns the flag sets

func (*StartServerCommand) HelpString

func (fc *StartServerCommand) HelpString() string

HelpString is the string shown as usage

func (*StartServerCommand) Name

func (fc *StartServerCommand) Name() string

Name of the command

func (*StartServerCommand) Port

func (fc *StartServerCommand) Port() string

func (*StartServerCommand) Run

func (fc *StartServerCommand) Run(ctx context.Context, args []string) error

Run a command

type StorageConfig

type StorageConfig struct {
	BucketName string
}

StorageConfig stores information required for storage service

Jump to

Keyboard shortcuts

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