Documentation
¶
Index ¶
- func DefaultRouteSorter() *routeSorter
- type BalancingPolicy
- type CertificateDetails
- type CertificateDetailsResponse
- type CertificateUsedIn
- type CertificateUsedInCluster
- type Cluster
- type ConnectionProperties
- type Cookie
- type DataStorage
- type DeploymentVersion
- type DeploymentVersionsExt
- type Endpoint
- type Header
- type HeaderMatcher
- type HeaderToAdd
- type NodeGroup
- type PageRoutes
- type QueryParameter
- type RangeMatch
- type RelationsService
- type Route
- type RouteDetails
- type RouteSorter
- type SearchRoutesParameters
- type SimplifiedRouteConfig
- type TlsDefDetails
- type V3ApiController
- type V3ApiUIService
- type V3Service
- func (s *V3Service) GetAllClusters(ctx context.Context) ([]Cluster, error)
- func (s *V3Service) GetAllSimplifiedRouteConfigs(ctx context.Context) ([]SimplifiedRouteConfig, error)
- func (s *V3Service) GetRouteDetails(ctx context.Context, uuid string) (RouteDetails, error)
- func (s *V3Service) GetRoutesPage(ctx context.Context, params SearchRoutesParameters) (PageRoutes, error)
- type VirtualHost
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultRouteSorter ¶
func DefaultRouteSorter() *routeSorter
Types ¶
type BalancingPolicy ¶
type BalancingPolicy struct {
Id int32 `json:"id"`
Header *Header `json:"header,omitempty"`
Cookie *Cookie `json:"cookie,omitempty"`
ConnectionProperties *ConnectionProperties `json:"connectionProperties,omitempty"`
QueryParameter *QueryParameter `json:"queryParameter,omitempty"`
Terminal domain.NullBool `json:"terminal,omitempty" swaggertype:"boolean"`
}
type CertificateDetails ¶
type CertificateDetails struct {
CertificateCommonName string `json:"certificateCommonName,omitempty"`
CertificateId string `json:"certificateId,omitempty"`
Valid bool `json:"valid" swaggertype:"boolean"`
ValidFrom time.Time `json:"validFrom"`
ValidTill time.Time `json:"validTill"`
DaysTillExpiry int `json:"daysTillExpiry" swaggertype:"integer"`
SANs []string `json:"sans,omitempty"`
IssuerCertificateCommonName string `json:"issuerCertificateCommonName,omitempty"`
IssuerCertificateId string `json:"issuerCertificateId,omitempty"`
Reason string `json:"reason,omitempty"`
}
type CertificateDetailsResponse ¶
type CertificateDetailsResponse struct {
TlsDefDetails []*TlsDefDetails `json:"details"`
}
type CertificateUsedIn ¶
type CertificateUsedIn struct {
Clusters []*CertificateUsedInCluster `json:"clusters,omitempty"`
Gateway string `json:"gateway,omitempty"`
}
type Cluster ¶
type Cluster struct {
Id int32 `json:"id"`
Name string `json:"name"`
EnableH2 bool `json:"enableH2"`
NodeGroups []NodeGroup `json:"nodeGroups"`
DeploymentVersions []DeploymentVersionsExt `json:"deploymentVersions"`
}
type ConnectionProperties ¶
type Cookie ¶
type Cookie struct {
Name string `json:"name" yaml:"name"`
Ttl *int64 `json:"ttl" yaml:"ttl"`
Path domain.NullString `json:"path" yaml:"path" swaggertype:"string"`
}
type DataStorage ¶
type DataStorage interface {
FindAllRouteConfigs() ([]*domain.RouteConfiguration, error)
FindVirtualHostsByRouteConfigurationId(configId int32) ([]*domain.VirtualHost, error)
FindAllDeploymentVersions() ([]*domain.DeploymentVersion, error)
FindRoutesByVirtualHostIdAndDeploymentVersion(vhId int32, version string) ([]*domain.Route, error)
FindRouteByUuid(uuid string) (*domain.Route, error)
FindVirtualHostById(vhId int32) (*domain.VirtualHost, error)
FindDeploymentVersion(version string) (*domain.DeploymentVersion, error)
FindRouteConfigById(routeConfigurationId int32) (*domain.RouteConfiguration, error)
FindClusterByName(key string) (*domain.Cluster, error)
FindEndpointsByClusterIdAndDeploymentVersion(clusterId int32, dVersions *domain.DeploymentVersion) ([]*domain.Endpoint, error)
FindHeaderMatcherByRouteId(routeId int32) ([]*domain.HeaderMatcher, error)
}
type DeploymentVersion ¶
type DeploymentVersionsExt ¶
type DeploymentVersionsExt struct {
Name string `json:"name"`
Stage string `json:"stage"`
Endpoint Endpoint `json:"endpoint"`
BalancingPolicies []BalancingPolicy `json:"balancingPolicies"`
}
type HeaderMatcher ¶
type HeaderMatcher struct {
Name string `json:"name"`
ExactMatch string `json:"exactMatch"`
SafeRegexMatch string `json:"safeRegexMatch"`
RangeMatch RangeMatch `json:"rangeMatch"`
PresentMatch domain.NullBool `json:"presentMatch" swaggertype:"boolean"`
PrefixMatch string `json:"prefixMatch"`
SuffixMatch string `json:"suffixMatch"`
InvertMatch bool `json:"invertMatch"`
}
type HeaderToAdd ¶
type PageRoutes ¶
type QueryParameter ¶
type QueryParameter struct {
Name string `json:"name" yaml:"name"`
}
type RangeMatch ¶
type RelationsService ¶
type RouteDetails ¶
type RouteDetails struct {
Path string `json:"path"`
PathRewrite string `json:"pathRewrite"`
Prefix string `json:"prefix"`
PrefixRewrite string `json:"prefixRewrite"`
Regexp string `json:"regexp"`
RegexpRewrite string `json:"regexpRewrite"`
ClusterName string `json:"clusterName"`
HostRewrite string `json:"hostRewrite"`
HostAutoRewrite *bool `json:"hostAutoRewrite"`
DirectResponse uint32 `json:"directResponse"`
Endpoint string `json:"endpoint"`
Timeout *int64 `json:"timeout"`
IdleTimeout *int64 `json:"idleTimeout"`
HeaderMatchers []HeaderMatcher `json:"headerMatchers"`
RequestHeadersToAdd []HeaderToAdd `json:"requestHeadersToAdd"`
RequestHeadersToRemove []string `json:"requestHeadersToRemove"`
}
type SearchRoutesParameters ¶
type SearchRoutesParameters struct {
VirtualHostId int32
Version string
Size int
Page int
Search string
}
func (SearchRoutesParameters) LowerBound ¶
func (p SearchRoutesParameters) LowerBound() int
func (SearchRoutesParameters) UpperBound ¶
func (p SearchRoutesParameters) UpperBound() int
type SimplifiedRouteConfig ¶
type SimplifiedRouteConfig struct {
NodeGroup string `json:"nodeGroup"`
VirtualHosts []VirtualHost `json:"virtualHosts"`
}
type TlsDefDetails ¶
type TlsDefDetails struct {
Name string `json:"name"`
UsedIn []*CertificateUsedIn `json:"usedIn,omitempty"`
Endpoints []string `json:"endpoints,omitempty"`
Certificates []*CertificateDetails `json:"certificates,omitempty"`
}
type V3ApiController ¶
type V3ApiController struct {
// contains filtered or unexported fields
}
func NewV3Controller ¶
func NewV3Controller(service V3ApiUIService) *V3ApiController
func (*V3ApiController) HandleGetCloudConfig ¶
func (c *V3ApiController) HandleGetCloudConfig(fiberCtx *fiber.Ctx) error
HandleGetCloudConfig godoc @Id GetCloudConfig @Summary Get Cloud Config @Description Get Cloud Config @Tags control-plane-v3 @Produce json @Security ApiKeyAuth @Success 200 {array} ui.SimplifiedRouteConfig @Failure 400 {object} map[string]string @Failure 500 {object} map[string]string @Router /api/v3/ui/cloud-config [get]
func (*V3ApiController) HandleGetClusters ¶
func (c *V3ApiController) HandleGetClusters(fiberCtx *fiber.Ctx) error
HandleGetClusters godoc @Id GetClustersV3 @Summary Get Clusters V3 @Description Get Clusters V3 @Tags control-plane-v3 @Produce json @Security ApiKeyAuth @Success 200 {array} ui.Cluster @Failure 500 {object} map[string]string @Router /api/v3/ui/clusters [get]
func (*V3ApiController) HandleGetRouteDetails ¶
func (c *V3ApiController) HandleGetRouteDetails(fiberCtx *fiber.Ctx) error
HandleGetRouteDetails godoc @Id GetRouteDetails @Summary Get Route Details @Description Get Route Details @Tags control-plane-v3 @Produce json @Param routeUuid path string true "routeUuid" @Security ApiKeyAuth @Success 200 {object} ui.RouteDetails @Failure 500 {object} map[string]string @Router /api/v3/ui/route/{routeUuid}/details [get]
func (*V3ApiController) HandleGetRoutes ¶
func (c *V3ApiController) HandleGetRoutes(fiberCtx *fiber.Ctx) error
HandleGetRoutes godoc @Id GetRoutes @Summary Get Routes @Description Get Routes @Tags control-plane-v3 @Produce json @Param versionId path string true "versionId" @Param virtualHostId path string true "virtualHostId" @Param page query string false "page" @Param size query string false "size" @Security ApiKeyAuth @Success 200 {object} ui.PageRoutes @Failure 400 {object} map[string]string @Failure 500 {object} map[string]string @Router /api/v3/ui/{virtualHostId}/{versionId}/routes [get]
type V3ApiUIService ¶
type V3ApiUIService interface {
GetAllSimplifiedRouteConfigs(ctx context.Context) ([]SimplifiedRouteConfig, error)
GetRoutesPage(ctx context.Context, params SearchRoutesParameters) (PageRoutes, error)
GetAllClusters(ctx context.Context) ([]Cluster, error)
GetRouteDetails(ctx context.Context, uuid string) (RouteDetails, error)
}
type V3Service ¶
type V3Service struct {
// contains filtered or unexported fields
}
func NewV3Service ¶
func NewV3Service(rep dao.Repository, entityService *entity.Service, sorter RouteSorter) *V3Service
func (*V3Service) GetAllClusters ¶
func (*V3Service) GetAllSimplifiedRouteConfigs ¶
func (s *V3Service) GetAllSimplifiedRouteConfigs(ctx context.Context) ([]SimplifiedRouteConfig, error)
func (*V3Service) GetRouteDetails ¶
func (*V3Service) GetRoutesPage ¶
func (s *V3Service) GetRoutesPage(ctx context.Context, params SearchRoutesParameters) (PageRoutes, error)
type VirtualHost ¶
type VirtualHost struct {
Id int32 `json:"id"`
Name string `json:"name"`
DeploymentVersions []DeploymentVersion `json:"deploymentVersions"`
}