app

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

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(debug bool, version string)

Types

type Config

type Config struct {
	Port       string `default:"8080" envconfig:"PORT"`
	ServerHost string
	Dev        bool
	GCS        GCSConfig
	S3         S3Config
	PubSub     PubSubConfig
	SNS        SNSConfig
	GCP        GCPConfig `envconfig:"GCP"`
	DB         string
}

func ReadConfig

func ReadConfig(debug bool) (*Config, error)

type GCPConfig

type GCPConfig struct {
	Project string
}

type GCSConfig

type GCSConfig struct {
	BucketName              string `envconfig:"GCS_BUCKET_NAME"`
	AssetBaseURL            string `envconfig:"GCS_ASSET_BASE_URL"`
	PublicationCacheControl string
}

type Handler

type Handler struct {
	Controller *rhttp.Controller
}

func NewHandler

func NewHandler(c *rhttp.Controller) *Handler

func (Handler) DecompressHandler

func (h Handler) DecompressHandler() echo.HandlerFunc

func (Handler) WebhookHandler

func (h Handler) WebhookHandler() echo.HandlerFunc

type PubSubConfig

type PubSubConfig struct {
	Topic string `default:"decompress"`
}

type S3Config

type S3Config struct {
	BucketName              string `envconfig:"S3_BUCKET_NAME"`
	AssetBaseURL            string `envconfig:"S3_ASSET_BASE_URL"`
	PublicationCacheControl string
}

type SNSConfig

type SNSConfig struct {
	TopicARN string
}

type ServerConfig

type ServerConfig struct {
	Config   *Config
	Debug    bool
	Gateways *gateway.Container
}

type WebServer

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

func NewServer

func NewServer(ctx context.Context, cfg *ServerConfig, handler *Handler) *WebServer

func (*WebServer) Run

func (w *WebServer) Run(ctx context.Context)

Jump to

Keyboard shortcuts

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