server

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Hostname     string
	UIHostname   string `name:"ui-hostname" env:"OTTO8_SERVER_UI_HOSTNAME"`
	GatewayDebug bool
}

type Server

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

func New

func New(ctx context.Context, db *db.DB, tokenService *jwt.TokenService, modelProviderDispatcher *dispatcher.Dispatcher, adminEmails []string, opts Options) (*Server, error)

func (*Server) AddRoutes

func (s *Server) AddRoutes(mux *server.Server)

func (*Server) AuthenticateRequest

func (s *Server) AuthenticateRequest(req *http.Request) (*authenticator.Response, bool, error)

func (*Server) UpsertAuthProvider

func (s *Server) UpsertAuthProvider(ctx context.Context, configType, clientID, clientSecret string) (uint, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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