Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildResult ¶
type BuildResult struct {
Engine *gin.Engine
Handler *cpasdkapi.Handler
AuthManager *cpacoreauth.Manager
}
func Build ¶
func Build(configFilePath string, opts ...RouteOption) (*BuildResult, error)
Build builds a build.
type ClusterManagementOption ¶
type ClusterManagementOption struct {
Enabled bool
Repository *cluster.Repository
Runtime *home.Runtime
}
type RouteOption ¶
type RouteOption func(*RouteRegistry)
func WithClusterManagement ¶
func WithClusterManagement(opt ClusterManagementOption) RouteOption
WithClusterManagement applies the cluster management option.
func WithRoute ¶
func WithRoute(method, path string, handler gin.HandlerFunc) RouteOption
WithRoute applies the route option.
func WithoutRoute ¶
func WithoutRoute(method, path string) RouteOption
WithoutRoute removes a route from the registry.
type RouteRegistry ¶
type RouteRegistry struct {
// contains filtered or unexported fields
}
func (*RouteRegistry) Delete ¶
func (r *RouteRegistry) Delete(method, path string)
Delete handles delete.
func (*RouteRegistry) Register ¶
func (r *RouteRegistry) Register(group *gin.RouterGroup)
Register wires package handlers into the provided registry.
func (*RouteRegistry) Set ¶
func (r *RouteRegistry) Set(method, path string, handler gin.HandlerFunc)
Set updates set.
Click to show internal directories.
Click to hide internal directories.