Documentation ¶
Index ¶
Constants ¶
View Source
const KontrolInsecureCommandHandlerEnvKey = "TEAMS_KONTROL_INSECURE_COMMANDS"
View Source
const KontrolPermissionFileEnvKey = "TEAMS_KONTROL_PERMISSION_FILE"
View Source
const KontrolResponseTypeEnvKey = "TEAMS_KONTROL_RESPONSE_TYPE"
Variables ¶
This section is empty.
Functions ¶
func ExecuteCommand ¶
func ExecuteCommand(client kubernetes.Interface, command Command) (interface{}, error)
Execute takes a valid command and attempts to execute it returns an interface containing a list of pods, a pod, or an error if it's failed. if nil, nil is returned then the command likely didn't return anything in the first place. i.e. delete
func Handler ¶
func Handler(client kubernetes.Interface, w http.ResponseWriter, r *http.Request)
func Init ¶
func Init()
Init will ensure that there's a Command file. The program will crash if it is not specified.
func PrepareResponse ¶
PrepareResponse takes an interface and attempts to render the appropriate response and returns it as a byte array i.e. if teamsResponseType == "TEAMS" and the interface is a pod then it will return a teams card with the pod details
Types ¶
Click to show internal directories.
Click to hide internal directories.