dashboard

package
v1.0.0-rc7 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: MIT Imports: 51 Imported by: 0

Documentation

Overview

Copyright © 2023 NAME HERE cosmo-workspace

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrResponse added in v0.8.0

func ErrResponse(log *clog.Logger, err error) error

func Execute added in v0.9.0

func Execute()

func NewForbidden

func NewForbidden(err error) error

func NewRootCmd added in v0.9.0

func NewRootCmd(o *options) *cobra.Command

Types

type HTTPRequestLogger

type HTTPRequestLogger struct {
	*clog.Logger
}

func NewHTTPRequestLogger

func NewHTTPRequestLogger(logr *clog.Logger) HTTPRequestLogger

func (HTTPRequestLogger) Middleware

func (l HTTPRequestLogger) Middleware(next http.Handler) http.Handler

type InClusterServeFiles

type InClusterServeFiles struct {
	CAFile string
}

type InClusterServer

type InClusterServer struct {
	Log           *clog.Logger
	StaticFileDir string
	Port          int
	// contains filtered or unexported fields
}

InClusterServer serves certificate for incluster workspace It implements https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/manager#Runnable

func NewInClusterServer

func NewInClusterServer(log *clog.Logger, port int, f InClusterServeFiles) (*InClusterServer, error)

func (*InClusterServer) Start

func (s *InClusterServer) Start(ctx context.Context) error

Start run server

type Server

type Server struct {
	Log                 *clog.Logger
	Klient              kosmo.Client
	GracefulShutdownDur time.Duration
	ResponseTimeout     time.Duration
	StaticFileDir       string
	Port                int
	MaxAgeSeconds       int
	TLSPrivateKeyPath   string
	TLSCertPath         string
	Insecure            bool

	CookieDomain      string
	CookieHashKey     string
	CookieBlockKey    string
	CookieSessionName string

	Authorizers map[cosmov1alpha1.UserAuthType]auth.Authorizer
	// contains filtered or unexported fields
}

Server serves dashboard APIs and UI static files It implements https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/manager#Runnable

func (*Server) AuthServiceHandler added in v0.8.0

func (s *Server) AuthServiceHandler(mux *http.ServeMux)

func (*Server) BeginLogin

BeginLogin is proto interface for webauthn.BeginLogin

func (*Server) BeginRegistration

BeginRegistration is proto interface for webauthn.BeginRegistration

func (*Server) CreateSession

func (s *Server) CreateSession(w http.ResponseWriter, r *http.Request, sesInfo session.Info) error

func (*Server) DeleteCredential

DeleteCredential remove credential of a user by given id

func (*Server) FinishLogin

FinishLogin is proto interface for webauthn.FinishLogin

func (*Server) FinishRegistration

FinishRegistration is proto interface for webauthn.FinishRegistration

func (*Server) ListCredentials

ListCredentials returns all the credentials of a user

func (*Server) Logout

func (*Server) SessionInfo

func (s *Server) SessionInfo(userName string) (session.Info, time.Time)

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start implements manager.Runnable

func (*Server) StreamServiceHandler

func (s *Server) StreamServiceHandler(mux *http.ServeMux)

func (*Server) StreamingEvents

StreamingEvents implements dashboardv1alpha1connect.UserServiceHandler.

func (*Server) TemplateServiceHandler added in v0.8.0

func (s *Server) TemplateServiceHandler(mux *http.ServeMux)

func (*Server) UpdateCredential

UpdateCredential updates credentia

func (*Server) UserServiceHandler added in v0.8.0

func (s *Server) UserServiceHandler(mux *http.ServeMux)

func (*Server) WebAuthnServiceHandler

func (s *Server) WebAuthnServiceHandler(mux *http.ServeMux)

func (*Server) WorkspaceServiceHandler added in v0.8.0

func (s *Server) WorkspaceServiceHandler(mux *http.ServeMux)

type StoreStatusResponseWriter

type StoreStatusResponseWriter struct {
	http.ResponseWriter
	// contains filtered or unexported fields
}

func (*StoreStatusResponseWriter) Flush

func (w *StoreStatusResponseWriter) Flush()

func (*StoreStatusResponseWriter) StatusCode

func (w *StoreStatusResponseWriter) StatusCode() int

func (*StoreStatusResponseWriter) StatusString

func (w *StoreStatusResponseWriter) StatusString() string

func (*StoreStatusResponseWriter) WriteHeader

func (w *StoreStatusResponseWriter) WriteHeader(statusCode int)

Jump to

Keyboard shortcuts

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