gateway

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package gateway defines gateway service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIPrefix       string //like /v1/api/
	RouteURL        string
	DependencyURL   string
	UseCacheFS      bool
	SyncFrequencyMs int
	Secrets         []*secret.Resource
	Cognito         *cognito.Config
	Meta            meta.Config
}

func NewConfigFromURL

func NewConfigFromURL(ctx context.Context, URL string) (*Config, error)

func (*Config) Init

func (c *Config) Init()

func (*Config) Validate

func (c *Config) Validate() error

type Service

type Service struct {
	Config *Config
	// contains filtered or unexported fields
}

Service represents gateway service

func New

func New(ctx context.Context, config *Config, visitors visitor.Visitors, types view.Types, metrics *gmetric.Service) (*Service, error)

New creates a gateway service

func Singleton

func Singleton(configURL string, visitors visitor.Visitors, types view.Types, metric *gmetric.Service) (*Service, error)

func SingletonWithConfig

func SingletonWithConfig(config *Config, visitors visitor.Visitors, types view.Types, metric *gmetric.Service) (*Service, error)

func (*Service) Handle

func (r *Service) Handle(writer http.ResponseWriter, request *http.Request)

func (*Service) View

func (r *Service) View(location string) (*view.View, error)

Directories

Path Synopsis
runtime
gcf
Package gcf defines Google Cloud Functions entry point
Package gcf defines Google Cloud Functions entry point
gcr
Package gcr defines Google Cloud Run entry point
Package gcr defines Google Cloud Run entry point
lambda
Package lambda defines lambda datly runtime
Package lambda defines lambda datly runtime

Jump to

Keyboard shortcuts

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