Documentation ¶
Index ¶
- Variables
- func ErrorResponse(log *clog.Logger, err error) (dashv1alpha1.ImplResponse, error)
- func NormalResponse(code int, body interface{}) (dashv1alpha1.ImplResponse, error)
- 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) GetUserAddonTemplates(ctx context.Context) (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, 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) PutUserName(ctx context.Context, userId string, req dashv1alpha1.UpdateUserNameRequest) (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 ¶
func ErrorResponse ¶ added in v0.4.0
func ErrorResponse(log *clog.Logger, err error) (dashv1alpha1.ImplResponse, error)
func NormalResponse ¶ added in v0.4.0
func NormalResponse(code int, body interface{}) (dashv1alpha1.ImplResponse, error)
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 (*Server) GetUserAddonTemplates ¶ added in v0.2.0
func (s *Server) GetUserAddonTemplates(ctx context.Context) (dashv1alpha1.ImplResponse, error)
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, 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) PutUserName ¶ added in v0.3.0
func (s *Server) PutUserName(ctx context.Context, userId string, req dashv1alpha1.UpdateUserNameRequest) (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.