Documentation
¶
Index ¶
- Variables
- type HTTPRequestLogger
- type Server
- func (s *Server) DeleteNetworkRule(ctx context.Context, userId string, workspaceName string, ...) (dashv1alpha1.ImplResponse, error)
- func (s *Server) DeleteUser(ctx context.Context, userId string) (dashv1alpha1.ImplResponse, error)
- func (s *Server) DeleteWorkspace(ctx context.Context, userId string, workspaceName string) (dashv1alpha1.ImplResponse, error)
- func (s *Server) GetUser(ctx context.Context, userId string) (dashv1alpha1.ImplResponse, error)
- func (s *Server) GetUsers(ctx context.Context) (dashv1alpha1.ImplResponse, error)
- func (s *Server) GetWorkspace(ctx context.Context, userId string, workspaceName string) (dashv1alpha1.ImplResponse, error)
- func (s *Server) GetWorkspaceTemplates(ctx context.Context) (dashv1alpha1.ImplResponse, error)
- func (s *Server) GetWorkspaces(ctx context.Context, userId string) (dashv1alpha1.ImplResponse, error)
- func (s *Server) Login(ctx context.Context, req dashv1alpha1.LoginRequest) (dashv1alpha1.ImplResponse, error)
- func (s *Server) Logout(ctx context.Context) (dashv1alpha1.ImplResponse, error)
- func (s *Server) PatchWorkspace(ctx context.Context, userId string, workspaceName string, ...) (dashv1alpha1.ImplResponse, error)
- func (s *Server) PostUser(ctx context.Context, req dashv1alpha1.CreateUserRequest) (dashv1alpha1.ImplResponse, error)
- func (s *Server) PostWorkspace(ctx context.Context, userId string, req dashv1alpha1.CreateWorkspaceRequest) (dashv1alpha1.ImplResponse, error)
- func (s *Server) PutNetworkRule(ctx context.Context, userId string, workspaceName string, ...) (dashv1alpha1.ImplResponse, error)
- func (s *Server) PutUserPassword(ctx context.Context, userId string, req dashv1alpha1.UpdateUserPasswordRequest) (dashv1alpha1.ImplResponse, error)
- func (s *Server) PutUserRole(ctx context.Context, userId string, req dashv1alpha1.UpdateUserRoleRequest) (dashv1alpha1.ImplResponse, error)
- func (s *Server) Start(ctx context.Context) error
- func (s *Server) Verify(ctx context.Context) (dashv1alpha1.ImplResponse, error)
- type StoreStatusResponseWriter
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotAuthorized = errors.New("not authroized")
)
Functions ¶
This section is empty.
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
SessionName string
TLSPrivateKeyPath string
TLSCertPath string
Insecure bool
Authorizers map[wsv1alpha1.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) DeleteNetworkRule ¶
func (s *Server) DeleteNetworkRule(ctx context.Context, userId string, workspaceName string, networkRuleName string) (dashv1alpha1.ImplResponse, error)
func (*Server) DeleteUser ¶
func (s *Server) DeleteUser(ctx context.Context, userId string) (dashv1alpha1.ImplResponse, error)
func (*Server) DeleteWorkspace ¶
func (s *Server) DeleteWorkspace(ctx context.Context, userId string, workspaceName string) (dashv1alpha1.ImplResponse, error)
func (*Server) GetUser ¶
func (s *Server) GetUser(ctx context.Context, userId string) (dashv1alpha1.ImplResponse, error)
func (s *Server) handleGetUser(w http.ResponseWriter, r *http.Request) {
func (*Server) GetUsers ¶
func (s *Server) GetUsers(ctx context.Context) (dashv1alpha1.ImplResponse, error)
func (*Server) GetWorkspace ¶
func (s *Server) GetWorkspace(ctx context.Context, userId string, workspaceName string) (dashv1alpha1.ImplResponse, error)
func (*Server) GetWorkspaceTemplates ¶
func (s *Server) GetWorkspaceTemplates(ctx context.Context) (dashv1alpha1.ImplResponse, error)
func (*Server) GetWorkspaces ¶
func (s *Server) GetWorkspaces(ctx context.Context, userId string) (dashv1alpha1.ImplResponse, error)
func (*Server) Login ¶
func (s *Server) Login(ctx context.Context, req dashv1alpha1.LoginRequest) (dashv1alpha1.ImplResponse, error)
func (*Server) Logout ¶
func (s *Server) Logout(ctx context.Context) (dashv1alpha1.ImplResponse, error)
func (*Server) PatchWorkspace ¶
func (s *Server) PatchWorkspace(ctx context.Context, userId string, workspaceName string, req dashv1alpha1.PatchWorkspaceRequest) (dashv1alpha1.ImplResponse, error)
func (*Server) PostUser ¶
func (s *Server) PostUser(ctx context.Context, req dashv1alpha1.CreateUserRequest) (dashv1alpha1.ImplResponse, error)
func (*Server) PostWorkspace ¶
func (s *Server) PostWorkspace(ctx context.Context, userId string, req dashv1alpha1.CreateWorkspaceRequest) (dashv1alpha1.ImplResponse, error)
func (*Server) PutNetworkRule ¶
func (s *Server) PutNetworkRule(ctx context.Context, userId string, workspaceName string, networkRuleName string, req dashv1alpha1.UpsertNetworkRuleRequest) (dashv1alpha1.ImplResponse, error)
func (*Server) PutUserPassword ¶
func (s *Server) PutUserPassword(ctx context.Context, userId string, req dashv1alpha1.UpdateUserPasswordRequest) (dashv1alpha1.ImplResponse, error)
func (*Server) PutUserRole ¶
func (s *Server) PutUserRole(ctx context.Context, userId string, req dashv1alpha1.UpdateUserRoleRequest) (dashv1alpha1.ImplResponse, error)
func (*Server) Verify ¶
func (s *Server) Verify(ctx context.Context) (dashv1alpha1.ImplResponse, error)
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.