Documentation ¶
Index ¶
- func NamespaceErrorHandler(ctx echo.Context, err error) error
- func StringWithCharset(length int, charset string) string
- type Container
- func (c *Container) BasicAuthValidator(username, password string, e echo.Context) (bool, error)
- func (c *Container) CreateNamespace(ctx echo.Context) error
- func (c *Container) DeleteNamespace(ctx echo.Context) error
- func (c *Container) GetBuildInfo(e echo.Context) error
- func (c *Container) GetKubeconfig(namespace string, secret *v1.Secret, ctx echo.Context) (*clientcmdapi.Config, error)
- func (c *Container) GetNamespaceByName(ctx echo.Context) error
- func (c *Container) GetNamespaces(ctx echo.Context) error
- func (c *Container) LivenessProbe(e echo.Context) error
- func (c *Container) ReadinessProbe(e echo.Context) error
- func (c *Container) SetBasicAuthUserList(cfg *models.Config)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NamespaceErrorHandler ¶
parses different errors from kubernetes and returns a custom error message
func StringWithCharset ¶
StringWithCharset generates a random string of the specified length using the characters from the given charset. It returns the generated random string.
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container will hold all dependencies for your application.
func NewContainer ¶
NewContainer returns an empty or an initialized container for your handlers.
func (*Container) BasicAuthValidator ¶
func (*Container) CreateNamespace ¶
CreateNamespace - Create a new namespace TODO: reduce complexity
func (*Container) DeleteNamespace ¶
DeleteNamespace - Deletes a namespace
func (*Container) GetBuildInfo ¶
func (*Container) GetKubeconfig ¶
func (c *Container) GetKubeconfig(namespace string, secret *v1.Secret, ctx echo.Context) (*clientcmdapi.Config, error)
get secret name with service account token for a given namespace and generate a kubeconfigiuration
func (*Container) GetNamespaceByName ¶
GetNamespaceByName - Find namespace by name
func (*Container) GetNamespaces ¶
GetNamespaces - Get all namespaces
func (*Container) LivenessProbe ¶
func (*Container) ReadinessProbe ¶
func (*Container) SetBasicAuthUserList ¶
Click to show internal directories.
Click to hide internal directories.