server

package
v0.0.0-...-da789b0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(
	NewConfig,
	NewHTTPServer,
)

Functions

func NewLogInterceptor

func NewLogInterceptor() connect.UnaryInterceptorFunc

func ParseHttpRequest

func ParseHttpRequest(r *http.Request) (*phttp.Request, error)

Types

type Config

type Config struct {
	Port        int    `yaml:"port"`
	StudioProxy string `yaml:"studio_proxy"`
}

func NewConfig

func NewConfig(config config.Provider) (cfg Config, err error)

func NewDefaultConfig

func NewDefaultConfig() Config

TODO breadchris studio proxy should not be set by default only turn on when in dev mode

type HTTPServer

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

func NewHTTPServer

func NewHTTPServer(
	config Config,
	projectService genconnect.ProjectServiceHandler,
	generateService genconnect.GenerateServiceHandler,
) (*HTTPServer, error)

func (*HTTPServer) Start

func (h *HTTPServer) Start(port int) error

type Studio

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

func NewStudio

func NewStudio(
	projectService genconnect.ProjectServiceHandler,
	defaultProject *gen.Project,
) *Studio

func (*Studio) Router

func (s *Studio) Router() *chi.Mux

Jump to

Keyboard shortcuts

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