Documentation
¶
Index ¶
- type Account
- type Accounts
- type Controller
- type DefaultController
- func (c *DefaultController) ByteArrayResponse(w http.ResponseWriter, r *http.Request, contentType string, result []byte)
- func (c *DefaultController) ErrorResponse(w http.ResponseWriter, r *http.Request, err error)
- func (c *DefaultController) JSONResponse(w http.ResponseWriter, r *http.Request, result interface{})
- func (c *DefaultController) ReaderEventStreamResponse(w http.ResponseWriter, r *http.Request, reader io.Reader)
- func (c *DefaultController) ReaderFileResponse(w http.ResponseWriter, r *http.Request, reader io.Reader, ...)
- func (c *DefaultController) ReaderResponse(w http.ResponseWriter, r *http.Request, reader io.Reader, contentType string)
- type KubeApiConfig
- type RadixHandlerFunc
- type Route
- type Routes
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 ¶
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 ¶
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