Documentation
¶
Index ¶
Constants ¶
const ActiveProjectID = "ActiveProjectID"
Variables ¶
This section is empty.
Functions ¶
func QueryParameterValidationMiddleware ¶
func QueryParameterValidationMiddleware() gin.HandlerFunc
QueryParameterValidationMiddleware creates middleware that validates query parameters for REST API endpoints to ensure only documented parameters are accepted
func ValidateQueryParameterValues ¶
ValidateQueryParameterValues validates the values of specific query parameters
Types ¶
type ChartsHandler ¶
type ChartsHandler struct {
// contains filtered or unexported fields
}
ChartsHandler provides reverse proxy for access to a list of Help charts provided by a named repository.
func NewChartsHandler ¶
func NewChartsHandler(endpoint string, opts []grpc.DialOption) (*ChartsHandler, error)
NewChartsHandler creates a new charts handler.
func (*ChartsHandler) FetchChartsList ¶
func (h *ChartsHandler) FetchChartsList(c *gin.Context)
FetchChartsList relays the Help charts list request to the back-end registry with appropriate authentication.
type Config ¶
type Config struct {
Port int
OIDCExternal string
GRPCEndpoint string
BasePath string
SpecFilePath string
AllowedCorsOrigins string
// ProjectServiceURL is the URL of the project lookup service used to resolve
// a project name (from the URL path) to its UUID for OPA authorization.
// Currently points to the Nexus API GW as an interim solution;
// will be replaced by the Tenant Manager REST API.
ProjectServiceURL string
}
Config defines configurable parameters for setting up the REST proxy.
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
EventHandler represents entity capable of relaying various Watch<X> events to a web-socket channel
func NewEventHandler ¶
func NewEventHandler(endpoint string, opts []grpc.DialOption) (*EventHandler, error)
NewEventHandler creates a new event handler relay.
func (*EventHandler) Watch ¶
func (h *EventHandler) Watch(c *gin.Context)
Watch upgrades the incoming GET request into a web-socket connection on which it creates a session for accepting subscriptions and relaying of subsequent events.
type FileHandler ¶
type FileHandler struct {
// contains filtered or unexported fields
}
func NewFileHandler ¶
func NewFileHandler(endpoint string, opts []grpc.DialOption) (*FileHandler, error)
func (*FileHandler) Download ¶
func (h *FileHandler) Download(mux *runtime.ServeMux, w http.ResponseWriter, r *http.Request, pathParams map[string]string)
func (*FileHandler) Upload ¶
func (h *FileHandler) Upload(c *gin.Context)
func (*FileHandler) UploadHTTP ¶ added in v0.17.3
func (h *FileHandler) UploadHTTP(w http.ResponseWriter, r *http.Request)
UploadHTTP is a net/http-compatible upload handler for use with grpc-gateway mux.HandlePath. It is functionally identical to Upload but uses plain http.ResponseWriter and *http.Request instead of gin.Context, enabling registration on the grpc-gateway ServeMux. The ActiveProjectID header is already populated by the ServeMux WithMetadata handler.
type Message ¶
type Message struct {
Op string `json:"op"`
Kind string `json:"kind"`
Project string `json:"project"`
Payload []byte `json:"payload"`
}
Message represents subscription control message
type OCIChartNameRecord ¶
type OCIChartNameRecord struct {
Name string `json:"name"`
}
type OCIChartVersionRecord ¶
type RESTProxy ¶
type RESTProxy struct {
// contains filtered or unexported fields
}
RESTProxy represents the REST proxy state
func NewRESTProxy ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session represents a watch-event session.
func NewSession ¶
func NewSession(ws *websocket.Conn, grpcClient catalogv3.CatalogServiceClient, c *gin.Context) *Session
NewSession creates a new session backed by the specified socket connection.
func (*Session) Done ¶
func (s *Session) Done() <-chan interface{}
Done returns the channel for reading the signal that the session is done
func (*Session) Error ¶
Error returns the channel for reading errors encountered during interaction with the backing web socket