api

package
v0.0.0-...-2f5b9ad Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AvailableOperationsMsg

type AvailableOperationsMsg struct {
	Operations []INamespaceOperation
}

type INamespaceExtension

type INamespaceExtension interface {
	GetName() string
	GetExtendSingle() NamespaceExtendSingleFunc
	GetExtendList() NamespaceExtendListFunc
	GetOrder() int
}

type INamespaceOperation

type INamespaceOperation interface {
	GetName() string
	GetCommand() K8mpassCommand
	GetCondition() K8mpassCondition
	FilterValue() string
}

func NewCronjobOperation

func NewCronjobOperation(name string, cronjob string, output string) INamespaceOperation

func NewIngressOperation

func NewIngressOperation(name string, ingressName string, output string) INamespaceOperation

type IPlugins

type IPlugins interface {
	GetNamespaceExtensions() []INamespaceExtension
	GetPodExtensions() []IPodExtension
	GetNamespaceOperations() []INamespaceOperation
}

type IPodExtension

type IPodExtension interface {
	GetName() string
	GetExtendSingle() PodExtendSingleFunc
	GetExtendList() PodExtendListFunc
}

type K8mpassCommand

type K8mpassCommand func(model *kubernetes.Clientset, namespace string) tea.Cmd

func CronjobCommand

func CronjobCommand(cronjob string, output string) K8mpassCommand

func IngressCommand

func IngressCommand(ingress string, output string) K8mpassCommand

type K8mpassCondition

type K8mpassCondition func(cs *kubernetes.Clientset, namespace string) bool

func CronjobCondition

func CronjobCondition(cronjob string) K8mpassCondition

func IngressCondition

func IngressCondition(ingress string) K8mpassCondition

type NamespaceExtendListFunc

type NamespaceExtendListFunc func(ns []v1.Namespace) map[string]string

type NamespaceExtendSingleFunc

type NamespaceExtendSingleFunc func(ns v1.Namespace) (string, error)

type NamespaceExtension

type NamespaceExtension struct {
	Name         string
	ExtendSingle NamespaceExtendSingleFunc
	ExtendList   NamespaceExtendListFunc
	Order        int
}

func (NamespaceExtension) GetExtendList

func (e NamespaceExtension) GetExtendList() NamespaceExtendListFunc

func (NamespaceExtension) GetExtendSingle

func (e NamespaceExtension) GetExtendSingle() NamespaceExtendSingleFunc

func (NamespaceExtension) GetName

func (e NamespaceExtension) GetName() string

func (NamespaceExtension) GetOrder

func (e NamespaceExtension) GetOrder() int

type NamespaceOperation

type NamespaceOperation struct {
	Name      string
	Command   K8mpassCommand
	Condition K8mpassCondition
}

func (NamespaceOperation) FilterValue

func (o NamespaceOperation) FilterValue() string

func (NamespaceOperation) GetCommand

func (o NamespaceOperation) GetCommand() K8mpassCommand

func (NamespaceOperation) GetCondition

func (o NamespaceOperation) GetCondition() K8mpassCondition

func (NamespaceOperation) GetName

func (o NamespaceOperation) GetName() string

type NoOutputResultMsg

type NoOutputResultMsg struct {
	Success bool
	Message string
}

type Plugins

type Plugins struct {
	NamespaceExtensions []INamespaceExtension
	PodExtensions       []IPodExtension
	NamespaceOperations []INamespaceOperation
}

func (Plugins) GetNamespaceExtensions

func (p Plugins) GetNamespaceExtensions() []INamespaceExtension

func (Plugins) GetNamespaceOperations

func (p Plugins) GetNamespaceOperations() []INamespaceOperation

func (Plugins) GetPodExtensions

func (p Plugins) GetPodExtensions() []IPodExtension

type PodExtendListFunc

type PodExtendListFunc func(pods []v1.Pod) map[string]string

type PodExtendSingleFunc

type PodExtendSingleFunc func(pod v1.Pod) (string, error)

type PodExtension

type PodExtension struct {
	Name         string
	ExtendSingle PodExtendSingleFunc
	ExtendList   PodExtendListFunc
}

func (PodExtension) GetExtendList

func (e PodExtension) GetExtendList() PodExtendListFunc

func (PodExtension) GetExtendSingle

func (e PodExtension) GetExtendSingle() PodExtendSingleFunc

func (PodExtension) GetName

func (e PodExtension) GetName() string

Jump to

Keyboard shortcuts

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