Documentation ¶
Overview ¶
Copyright © 2023 NAME HERE cosmo-workspace
Index ¶
- func ErrResponse(log *clog.Logger, err error) error
- func Execute()
- func NewRootCmd(o *options) *cobra.Command
- type HTTPRequestLogger
- type Server
- func (s *Server) AuthServiceHandler(mux *http.ServeMux)
- func (s *Server) CreateUser(ctx context.Context, req *connect_go.Request[dashv1alpha1.CreateUserRequest]) (*connect_go.Response[dashv1alpha1.CreateUserResponse], error)
- func (s *Server) CreateWorkspace(ctx context.Context, ...) (*connect_go.Response[dashv1alpha1.CreateWorkspaceResponse], error)
- func (s *Server) DeleteNetworkRule(ctx context.Context, ...) (*connect_go.Response[dashv1alpha1.DeleteNetworkRuleResponse], error)
- func (s *Server) DeleteUser(ctx context.Context, req *connect_go.Request[dashv1alpha1.DeleteUserRequest]) (*connect_go.Response[dashv1alpha1.DeleteUserResponse], error)
- func (s *Server) DeleteWorkspace(ctx context.Context, ...) (*connect_go.Response[dashv1alpha1.DeleteWorkspaceResponse], error)
- func (s *Server) GetUser(ctx context.Context, req *connect_go.Request[dashv1alpha1.GetUserRequest]) (*connect_go.Response[dashv1alpha1.GetUserResponse], error)
- func (s *Server) GetUserAddonTemplates(ctx context.Context, req *connect_go.Request[emptypb.Empty]) (*connect_go.Response[dashv1alpha1.GetUserAddonTemplatesResponse], error)
- func (s *Server) GetUsers(ctx context.Context, req *connect_go.Request[emptypb.Empty]) (*connect_go.Response[dashv1alpha1.GetUsersResponse], error)
- func (s *Server) GetWorkspace(ctx context.Context, req *connect_go.Request[dashv1alpha1.GetWorkspaceRequest]) (*connect_go.Response[dashv1alpha1.GetWorkspaceResponse], error)
- func (s *Server) GetWorkspaceTemplates(ctx context.Context, req *connect_go.Request[emptypb.Empty]) (*connect_go.Response[dashv1alpha1.GetWorkspaceTemplatesResponse], error)
- func (s *Server) GetWorkspaces(ctx context.Context, ...) (*connect_go.Response[dashv1alpha1.GetWorkspacesResponse], error)
- func (s *Server) Login(ctx context.Context, req *connect_go.Request[dashv1alpha1.LoginRequest]) (*connect_go.Response[dashv1alpha1.LoginResponse], error)
- func (s *Server) Logout(ctx context.Context, req *connect_go.Request[emptypb.Empty]) (*connect_go.Response[emptypb.Empty], error)
- func (s *Server) Start(ctx context.Context) error
- func (s *Server) TemplateServiceHandler(mux *http.ServeMux)
- func (s *Server) UpdateUserDisplayName(ctx context.Context, ...) (*connect_go.Response[dashv1alpha1.UpdateUserDisplayNameResponse], error)
- func (s *Server) UpdateUserPassword(ctx context.Context, ...) (*connect_go.Response[dashv1alpha1.UpdateUserPasswordResponse], error)
- func (s *Server) UpdateUserRole(ctx context.Context, ...) (*connect_go.Response[dashv1alpha1.UpdateUserRoleResponse], error)
- func (s *Server) UpdateWorkspace(ctx context.Context, ...) (*connect_go.Response[dashv1alpha1.UpdateWorkspaceResponse], error)
- func (s *Server) UpsertNetworkRule(ctx context.Context, ...) (*connect_go.Response[dashv1alpha1.UpsertNetworkRuleResponse], error)
- func (s *Server) UserServiceHandler(mux *http.ServeMux)
- func (s *Server) Verify(ctx context.Context, req *connect_go.Request[emptypb.Empty]) (*connect_go.Response[dashv1alpha1.VerifyResponse], error)
- func (s *Server) WorkspaceServiceHandler(mux *http.ServeMux)
- type StoreStatusResponseWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRootCmd ¶ added in v0.9.0
Types ¶
type HTTPRequestLogger ¶
func NewHTTPRequestLogger ¶
func NewHTTPRequestLogger(logr *clog.Logger) HTTPRequestLogger
func (HTTPRequestLogger) Middleware ¶
func (l HTTPRequestLogger) Middleware(next http.Handler) http.Handler
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 (*Server) CreateUser ¶ added in v0.8.0
func (s *Server) CreateUser(ctx context.Context, req *connect_go.Request[dashv1alpha1.CreateUserRequest]) (*connect_go.Response[dashv1alpha1.CreateUserResponse], error)
func (*Server) CreateWorkspace ¶ added in v0.8.0
func (s *Server) CreateWorkspace(ctx context.Context, req *connect_go.Request[dashv1alpha1.CreateWorkspaceRequest]) (*connect_go.Response[dashv1alpha1.CreateWorkspaceResponse], error)
func (*Server) DeleteNetworkRule ¶
func (s *Server) DeleteNetworkRule(ctx context.Context, req *connect_go.Request[dashv1alpha1.DeleteNetworkRuleRequest]) (*connect_go.Response[dashv1alpha1.DeleteNetworkRuleResponse], error)
func (*Server) DeleteUser ¶
func (s *Server) DeleteUser(ctx context.Context, req *connect_go.Request[dashv1alpha1.DeleteUserRequest]) (*connect_go.Response[dashv1alpha1.DeleteUserResponse], error)
func (*Server) DeleteWorkspace ¶
func (s *Server) DeleteWorkspace(ctx context.Context, req *connect_go.Request[dashv1alpha1.DeleteWorkspaceRequest]) (*connect_go.Response[dashv1alpha1.DeleteWorkspaceResponse], error)
func (*Server) GetUser ¶
func (s *Server) GetUser(ctx context.Context, req *connect_go.Request[dashv1alpha1.GetUserRequest]) (*connect_go.Response[dashv1alpha1.GetUserResponse], error)
func (*Server) GetUserAddonTemplates ¶ added in v0.2.0
func (s *Server) GetUserAddonTemplates(ctx context.Context, req *connect_go.Request[emptypb.Empty]) (*connect_go.Response[dashv1alpha1.GetUserAddonTemplatesResponse], error)
func (*Server) GetUsers ¶
func (s *Server) GetUsers(ctx context.Context, req *connect_go.Request[emptypb.Empty]) (*connect_go.Response[dashv1alpha1.GetUsersResponse], error)
func (*Server) GetWorkspace ¶
func (s *Server) GetWorkspace(ctx context.Context, req *connect_go.Request[dashv1alpha1.GetWorkspaceRequest]) (*connect_go.Response[dashv1alpha1.GetWorkspaceResponse], error)
func (*Server) GetWorkspaceTemplates ¶
func (s *Server) GetWorkspaceTemplates(ctx context.Context, req *connect_go.Request[emptypb.Empty]) (*connect_go.Response[dashv1alpha1.GetWorkspaceTemplatesResponse], error)
func (*Server) GetWorkspaces ¶
func (s *Server) GetWorkspaces(ctx context.Context, req *connect_go.Request[dashv1alpha1.GetWorkspacesRequest]) (*connect_go.Response[dashv1alpha1.GetWorkspacesResponse], error)
func (*Server) Login ¶
func (s *Server) Login(ctx context.Context, req *connect_go.Request[dashv1alpha1.LoginRequest]) (*connect_go.Response[dashv1alpha1.LoginResponse], error)
func (*Server) TemplateServiceHandler ¶ added in v0.8.0
func (*Server) UpdateUserDisplayName ¶ added in v0.8.0
func (s *Server) UpdateUserDisplayName(ctx context.Context, req *connect_go.Request[dashv1alpha1.UpdateUserDisplayNameRequest]) (*connect_go.Response[dashv1alpha1.UpdateUserDisplayNameResponse], error)
func (*Server) UpdateUserPassword ¶ added in v0.8.0
func (s *Server) UpdateUserPassword(ctx context.Context, req *connect_go.Request[dashv1alpha1.UpdateUserPasswordRequest]) (*connect_go.Response[dashv1alpha1.UpdateUserPasswordResponse], error)
func (*Server) UpdateUserRole ¶ added in v0.8.0
func (s *Server) UpdateUserRole(ctx context.Context, req *connect_go.Request[dashv1alpha1.UpdateUserRoleRequest]) (*connect_go.Response[dashv1alpha1.UpdateUserRoleResponse], error)
func (*Server) UpdateWorkspace ¶ added in v0.8.0
func (s *Server) UpdateWorkspace(ctx context.Context, req *connect_go.Request[dashv1alpha1.UpdateWorkspaceRequest]) (*connect_go.Response[dashv1alpha1.UpdateWorkspaceResponse], error)
func (*Server) UpsertNetworkRule ¶ added in v0.8.0
func (s *Server) UpsertNetworkRule(ctx context.Context, req *connect_go.Request[dashv1alpha1.UpsertNetworkRuleRequest]) (*connect_go.Response[dashv1alpha1.UpsertNetworkRuleResponse], error)
func (*Server) UserServiceHandler ¶ added in v0.8.0
func (*Server) Verify ¶
func (s *Server) Verify(ctx context.Context, req *connect_go.Request[emptypb.Empty]) (*connect_go.Response[dashv1alpha1.VerifyResponse], error)
func (*Server) WorkspaceServiceHandler ¶ added in v0.8.0
type StoreStatusResponseWriter ¶
type StoreStatusResponseWriter struct { http.ResponseWriter // contains filtered or unexported fields }
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)
Click to show internal directories.
Click to hide internal directories.