v1

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ValidTypeCreate = "valid-create"
	ValidTypeUpdate = "valid-update"
)

Constants for the validation of the pipeline

View Source
const (
	ISBServiceStatusHealthy  = "healthy"
	ISBServiceStatusCritical = "critical"
	ISBServiceStatusWarning  = "warning"
	ISBServiceStatusInactive = "inactive"
)
View Source
const (
	PipelineStatusHealthy  = "healthy"
	PipelineStatusCritical = "critical"
	PipelineStatusWarning  = "warning"
	PipelineStatusInactive = "inactive"
)

Variables

This section is empty.

Functions

func NewDexReverseProxy added in v1.0.0

func NewDexReverseProxy(target string) func(c *gin.Context)

NewDexReverseProxy sends the dex request to the dex server.

func NewHandler

func NewHandler(dexObj *DexObject, localUsersAuthObject *LocalUsersAuthObject) (*handler, error)

NewHandler is used to provide a new instance of the handler type

func NewLocalUsersHandler added in v1.1.0

func NewLocalUsersHandler(localUsersAuthObject *LocalUsersAuthObject) (*localUsersHandler, error)

NewLocalUsersHandler is used to provide a new instance of the handler type

func NewNoAuthHandler added in v1.0.0

func NewNoAuthHandler(dexObj *DexObject) (*noAuthHandler, error)

NewNoAuthHandler is used to provide a new instance of the handler type

Types

type ActiveStatus added in v0.11.0

type ActiveStatus struct {
	Healthy  int `json:"Healthy"`
	Warning  int `json:"Warning"`
	Critical int `json:"Critical"`
}

ActiveStatus contains the number of objects in healthy, warning, and critical status.

type ClusterSummaryResponse added in v0.11.0

type ClusterSummaryResponse []NamespaceSummary

ClusterSummaryResponse is a list of NamespaceSummary of all the namespaces in a cluster wrapped in a list.

type DexObject added in v1.0.0

type DexObject struct {
	// contains filtered or unexported fields
}

DexObject is a struct that holds details for dex handlers.

func NewDexObject added in v1.0.0

func NewDexObject(baseURL string, baseHref string, dexURL string) (*DexObject, error)

NewDexObject returns a new DexObject.

func (*DexObject) Authenticate added in v1.0.0

func (d *DexObject) Authenticate(c *gin.Context) (*authn.UserInfo, error)

type DexRewriteURLRoundTripper added in v1.0.0

type DexRewriteURLRoundTripper struct {
	DexURL *url.URL
	T      http.RoundTripper
}

DexRewriteURLRoundTripper is an HTTP RoundTripper to rewrite HTTP requests to the specified dex server address. This is used when reverse proxying Dex to avoid the API server from unnecessarily communicating to the numaflow server through its externally facing load balancer, which is not always permitted in firewalled/air-gapped networks.

func NewDexRewriteURLRoundTripper added in v1.0.0

func NewDexRewriteURLRoundTripper(dexServerAddr string, T http.RoundTripper) DexRewriteURLRoundTripper

NewDexRewriteURLRoundTripper creates a new DexRewriteURLRoundTripper

func (DexRewriteURLRoundTripper) RoundTrip added in v1.0.0

type ISBService added in v0.11.0

type ISBService struct {
	Name       string                          `json:"name"`
	Status     string                          `json:"status"`
	ISBService v1alpha1.InterStepBufferService `json:"isbService"`
}

ISBService gives the summarized information of an InterStepBufferService

func NewISBService added in v0.11.0

func NewISBService(status string, isb *v1alpha1.InterStepBufferService) ISBService

NewISBService creates a new ISBService object with the given specifications

type ISBServices added in v0.11.0

type ISBServices []ISBService

ISBServices is a list of InterStepBufferServices

type IsbServiceSummary added in v0.11.0

type IsbServiceSummary struct {
	Active   ActiveStatus `json:"active"`
	Inactive int          `json:"inactive"`
}

IsbServiceSummary summarizes the number of active and inactive ISB Service.

type K8sEventsResponse added in v0.11.0

type K8sEventsResponse struct {
	TimeStamp int64  `json:"timestamp"`
	Type      string `json:"type"`
	// Object is in the format of "kind/name", e.g. "Pipeline/simple-pipeline"
	Object  string `json:"object"`
	Reason  string `json:"reason"`
	Message string `json:"message"`
}

func NewK8sEventsResponse added in v0.11.0

func NewK8sEventsResponse(timestamp int64, eventType, objectKind, objectName, reason, message string) K8sEventsResponse

NewK8sEventsResponse creates a new K8sEventsResponse object with the given inputs.

type LocalUsersAuthObject added in v1.1.0

type LocalUsersAuthObject struct {
	// contains filtered or unexported fields
}

func NewLocalUsersAuthObject added in v1.1.0

func NewLocalUsersAuthObject(authDisabled bool) (*LocalUsersAuthObject, error)

NewLocalUsersAuthObject is used to provide a new LocalUsersAuthObject

func (*LocalUsersAuthObject) Authenticate added in v1.1.0

func (l *LocalUsersAuthObject) Authenticate(c *gin.Context) (*authn.UserInfo, error)

func (*LocalUsersAuthObject) GenerateToken added in v1.1.0

func (l *LocalUsersAuthObject) GenerateToken(c *gin.Context, username string) (string, error)

GenerateToken generates a jwt token for the given username

func (*LocalUsersAuthObject) ParseToken added in v1.1.0

func (l *LocalUsersAuthObject) ParseToken(c *gin.Context, tokenString string) (jwt.MapClaims, error)

ParseToken parses a jwt token and returns the claims

func (*LocalUsersAuthObject) VerifyUser added in v1.1.0

func (l *LocalUsersAuthObject) VerifyUser(c *gin.Context, username string, password string) error

type LoginInput added in v1.1.0

type LoginInput struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type LoginResponse added in v1.0.0

type LoginResponse struct {
	AuthCodeURL string `json:"AuthCodeURL"`
}

LoginResponse is the response payload for login API.

func NewLoginResponse added in v1.0.0

func NewLoginResponse(url string) LoginResponse

NewLoginResponse returns a LoginResponse object for the given url.

type NamespaceSummary added in v1.0.0

type NamespaceSummary struct {
	// IsEmpty indicates whether there are numaflow resources in the namespace.
	// resources include pipelines and ISB services.
	IsEmpty bool `json:"isEmpty"`
	// Namespace is the name of the namespace.
	Namespace         string            `json:"namespace"`
	PipelineSummary   PipelineSummary   `json:"pipelineSummary"`
	IsbServiceSummary IsbServiceSummary `json:"isbServiceSummary"`
}

NamespaceSummary summarizes information for a given namespace.

func NewNamespaceSummary added in v1.0.0

func NewNamespaceSummary(namespace string, pipelineSummary PipelineSummary,
	isbSummary IsbServiceSummary) NamespaceSummary

NewNamespaceSummary creates a new NamespaceSummary object with the given specifications.

type NumaflowAPIResponse added in v0.11.0

type NumaflowAPIResponse struct {
	// ErrMsg provides more detailed error information. If API call succeeds, the ErrMsg is nil.
	ErrMsg *string `json:"errMsg,omitempty"`
	// Data is the response body.
	Data interface{} `json:"data"`
}

func NewNumaflowAPIResponse added in v0.11.0

func NewNumaflowAPIResponse(errMsg *string, data interface{}) NumaflowAPIResponse

NewNumaflowAPIResponse creates a new NumaflowAPIResponse.

type PipelineInfo added in v0.11.0

type PipelineInfo struct {
	Name string `json:"name"`
	// Status shows whether the pipeline is healthy, warning, critical or inactive.
	Status string `json:"status"`
	// Lag shows the pipeline lag.
	Lag *int64 `json:"lag,omitempty"`
	// Pipeline contains the detailed pipeline spec.
	Pipeline v1alpha1.Pipeline `json:"pipeline"`
}

func NewPipelineInfo added in v0.11.0

func NewPipelineInfo(status string, lag *int64, pl *v1alpha1.Pipeline) PipelineInfo

NewPipelineInfo creates a new PipelineInfo object with the given status

type PipelineSummary added in v0.11.0

type PipelineSummary struct {
	Active   ActiveStatus `json:"active"`
	Inactive int          `json:"inactive"`
}

PipelineSummary summarizes the number of active and inactive pipelines.

type Pipelines added in v0.11.0

type Pipelines []PipelineInfo

Pipelines is a list of pipelines

Jump to

Keyboard shortcuts

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