models

package
v1.116.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Client               kubernetes.Interface
	RadixClient          radixclient.Interface
	SecretProviderClient secretProviderClient.Interface
	TektonClient         tektonclient.Interface
	CertManagerClient    certclient.Interface
	KedaClient           kedav2.Interface
}

Account Holds kubernetes account sessions

func NewServiceAccount

func NewServiceAccount(inClusterClient kubernetes.Interface, inClusterRadixClient radixclient.Interface, inClusterKedaClient kedav2.Interface, inClusterSecretProviderClient secretProviderClient.Interface, inClusterTektonClient tektonclient.Interface, inClusterCertManagerClient certclient.Interface) Account

type Accounts

type Accounts struct {
	UserAccount    Account
	ServiceAccount Account
}

Accounts contains accounts for accessing k8s API.

func NewAccounts

func NewAccounts(inClusterClient kubernetes.Interface, inClusterRadixClient radixclient.Interface, inClusterKedaClient kedav2.Interface, inClusterSecretProviderClient secretProviderClient.Interface, inClusterTektonClient tektonclient.Interface, inClusterCertManagerClient certclient.Interface, outClusterClient kubernetes.Interface, outClusterRadixClient radixclient.Interface, outClusterKedaClient kedav2.Interface, outClusterSecretProviderClient secretProviderClient.Interface, outClusterTektonClient tektonclient.Interface, outClusterCertManagerClient certclient.Interface) Accounts

NewAccounts creates a new Accounts struct

type Controller

type Controller interface {
	GetRoutes() Routes
}

Controller Pattern of an rest/stream controller

type DefaultController

type DefaultController struct {
}

DefaultController Default implementation

func (*DefaultController) ByteArrayResponse

func (c *DefaultController) ByteArrayResponse(w http.ResponseWriter, r *http.Request, contentType string, result []byte)

ByteArrayResponse Used for response data. I.e. image

func (*DefaultController) ErrorResponse

func (c *DefaultController) ErrorResponse(w http.ResponseWriter, r *http.Request, err error)

ErrorResponse Marshals error for user requester

func (*DefaultController) JSONResponse

func (c *DefaultController) JSONResponse(w http.ResponseWriter, r *http.Request, result interface{})

JSONResponse Marshals response with header

func (*DefaultController) ReaderEventStreamResponse

func (c *DefaultController) ReaderEventStreamResponse(w http.ResponseWriter, r *http.Request, reader io.Reader)

ReaderEventStreamResponse writes the content from the reader to the response, one line at a time as an event stream. Will stop at the end of stream, or when the client disconnects. Every 15 seconds a healthcheck event is sent to keep the connection alive.

func (*DefaultController) ReaderFileResponse

func (c *DefaultController) ReaderFileResponse(w http.ResponseWriter, r *http.Request, reader io.Reader, fileName, contentType string)

ReaderFileResponse writes the content from the reader to the response, and sets Content-Disposition=attachment; filename=<filename arg>

func (*DefaultController) ReaderResponse

func (c *DefaultController) ReaderResponse(w http.ResponseWriter, r *http.Request, reader io.Reader, contentType string)

ReaderResponse writes the content from the reader to the response,

type KubeApiConfig

type KubeApiConfig struct {
	QPS   float32
	Burst int
}

KubeApiConfig configuration for K8s API REST client

type RadixHandlerFunc

type RadixHandlerFunc func(Accounts, http.ResponseWriter, *http.Request)

RadixHandlerFunc Pattern for handler functions

type Route

type Route struct {
	Path                      string
	Method                    string
	HandlerFunc               RadixHandlerFunc
	AllowUnauthenticatedUsers bool
	KubeApiConfig             KubeApiConfig
}

Route Describe route

type Routes

type Routes []Route

Routes Holder of all routes

Jump to

Keyboard shortcuts

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