app

package
v0.0.0-...-1c02ac9 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextMiddleware

func ContextMiddleware(fn func(ctx context.Context) context.Context) echo.MiddlewareFunc

func DownloadPlugin

func DownloadPlugin() echo.HandlerFunc

func GraphqlAPI

func GraphqlAPI(conf GraphQLConfig) echo.HandlerFunc

func IncreasePluginDownloadCount

func IncreasePluginDownloadCount() echo.HandlerFunc

func Ping

func Ping() echo.HandlerFunc

func Start

func Start(debug bool, version string) error

func UsecaseMiddleware

func UsecaseMiddleware(r *repo.Container, g *gateway.Container) echo.MiddlewareFunc

Types

type AuthConfig

type AuthConfig struct {
	ISS *url.URL
	AUD []string
	ALG string `default:"RS256"`
	TTL *int
}

type AuthM2MConfig

type AuthM2MConfig struct {
	ISS    *url.URL
	AUD    []string
	ALG    string `default:"RS256"`
	TTL    *int
	Sub    string
	Secret string
}

type Config

type Config struct {
	Port     string `default:"8080" envconfig:"PORT"`
	DB       string `default:"mongodb://localhost"`
	Auth     AuthConfig
	Auth_M2M AuthM2MConfig
	GCS      GCSConfig
	GraphQL  GraphQLConfig
	Origins  []string
	Debug    bool
}

func LoadConfig

func LoadConfig() (*Config, error)

func (Config) AuthProviders

func (c Config) AuthProviders() (p []appx.JWTProvider)

type GCSConfig

type GCSConfig struct {
	Bucket        string
	AssetsBucket  string
	AssetsBaseURL string
}

type GraphQLConfig

type GraphQLConfig struct {
	ComplexityLimit int `default:"6000"`
}

type ServerConfig

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

type WebServer

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

func NewServer

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

func (*WebServer) Run

func (w *WebServer) Run()

Jump to

Keyboard shortcuts

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