webapis

package
v1.1.14-test2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WellKnownEstCaCerts = "/.well-known/est/cacerts"
	VersionPath         = "/version"
	RootPath            = "/"
)
View Source
const (
	VersionV1 = "v1"

	RestApiV1 = "/" + VersionV1

	RestApiRootPath       = "/edge"
	ClientRestApiBase     = "/edge/client"
	ManagementRestApiBase = "/edge/management"

	LegacyClientRestApiBaseUrlV1 = RestApiRootPath + RestApiV1
	ClientRestApiBaseUrlV1       = ClientRestApiBase + RestApiV1
	ManagementRestApiBaseUrlV1   = ManagementRestApiBase + RestApiV1

	ClientRestApiBaseUrlLatest     = ClientRestApiBaseUrlV1
	ManagementRestApiBaseUrlLatest = ManagementRestApiBaseUrlV1

	ClientRestApiSpecUrl     = ClientRestApiBaseUrlLatest + "/swagger.json"
	ManagementRestApiSpecUrl = ManagementRestApiBaseUrlLatest + "/swagger.json"

	LegacyClientApiBinding = "edge"
	ClientApiBinding       = "edge-client"
	ManagementApiBinding   = "edge-management"
	OidcApiBinding         = "edge-oidc"
)
View Source
const (
	ServerHeader = "server"
)
View Source
const ZitiInstanceId = "ziti-instance-id"

Variables

AllApiBindingVersions is a map of: API Binding -> Api Version -> API Path Adding values here will add them to the /versions REST API endpoint

Functions

func NewFabricApiWrapper

func NewFabricApiWrapper(ae *env.AppEnv) api_impl.RequestWrapper

func OverrideRequestWrapper

func OverrideRequestWrapper(rw api_impl.RequestWrapper)

Types

type ClientApiFactory

type ClientApiFactory struct {
	InitFunc func(clientApi *ClientApiHandler) error
	// contains filtered or unexported fields
}

func NewClientApiFactory

func NewClientApiFactory(appEnv *env.AppEnv) *ClientApiFactory

func (ClientApiFactory) Binding

func (factory ClientApiFactory) Binding() string

func (ClientApiFactory) New

func (factory ClientApiFactory) New(_ *xweb.ServerConfig, options map[interface{}]interface{}) (xweb.ApiHandler, error)

func (ClientApiFactory) Validate

func (factory ClientApiFactory) Validate(config *xweb.InstanceConfig) error

type ClientApiHandler

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

func NewClientApiHandler

func NewClientApiHandler(ae *env.AppEnv, options map[interface{}]interface{}) (*ClientApiHandler, error)

func (ClientApiHandler) Binding

func (clientApi ClientApiHandler) Binding() string

func (ClientApiHandler) IsDefault

func (clientApi ClientApiHandler) IsDefault() bool

func (ClientApiHandler) IsHandler

func (clientApi ClientApiHandler) IsHandler(r *http.Request) bool

func (ClientApiHandler) Options

func (clientApi ClientApiHandler) Options() map[interface{}]interface{}

func (ClientApiHandler) RootPath

func (clientApi ClientApiHandler) RootPath() string

func (ClientApiHandler) ServeHTTP

func (clientApi ClientApiHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

type FabricManagementApiFactory

type FabricManagementApiFactory struct {
	InitFunc func(managementApi *FabricManagementApiHandler) error

	MakeDefault bool
	// contains filtered or unexported fields
}

func (*FabricManagementApiFactory) Binding

func (factory *FabricManagementApiFactory) Binding() string

func (*FabricManagementApiFactory) New

func (factory *FabricManagementApiFactory) New(_ *xweb.ServerConfig, options map[interface{}]interface{}) (xweb.ApiHandler, error)

func (*FabricManagementApiFactory) Validate

func (factory *FabricManagementApiFactory) Validate(_ *xweb.InstanceConfig) error

type FabricManagementApiHandler

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

func NewFabricManagementApiHandler

func NewFabricManagementApiHandler(fabricApi *operations.ZitiFabricAPI, isDefault bool, options map[interface{}]interface{}) (*FabricManagementApiHandler, error)

func (*FabricManagementApiHandler) Binding

func (managementApi *FabricManagementApiHandler) Binding() string

func (*FabricManagementApiHandler) IsDefault added in v1.1.12

func (managementApi *FabricManagementApiHandler) IsDefault() bool

func (*FabricManagementApiHandler) IsHandler

func (managementApi *FabricManagementApiHandler) IsHandler(r *http.Request) bool

func (*FabricManagementApiHandler) Options

func (managementApi *FabricManagementApiHandler) Options() map[interface{}]interface{}

func (*FabricManagementApiHandler) RootPath

func (managementApi *FabricManagementApiHandler) RootPath() string

func (*FabricManagementApiHandler) ServeHTTP

func (managementApi *FabricManagementApiHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

type FabricRequestWrapper

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

func (*FabricRequestWrapper) WrapHttpHandler

func (self *FabricRequestWrapper) WrapHttpHandler(handler http.Handler) http.Handler

func (*FabricRequestWrapper) WrapRequest

func (self *FabricRequestWrapper) WrapRequest(handler api_impl.RequestHandler, request *http.Request, entityId, entitySubId string) openApiMiddleware.Responder

func (*FabricRequestWrapper) WrapWsHandler

func (self *FabricRequestWrapper) WrapWsHandler(handler http.Handler) http.Handler

type ManagementApiFactory

type ManagementApiFactory struct {
	InitFunc func(managementApi *ManagementApiHandler) error
	// contains filtered or unexported fields
}

func NewManagementApiFactory

func NewManagementApiFactory(appEnv *env.AppEnv) *ManagementApiFactory

func (ManagementApiFactory) Binding

func (factory ManagementApiFactory) Binding() string

func (ManagementApiFactory) New

func (factory ManagementApiFactory) New(_ *xweb.ServerConfig, options map[interface{}]interface{}) (xweb.ApiHandler, error)

func (ManagementApiFactory) Validate

func (factory ManagementApiFactory) Validate(_ *xweb.InstanceConfig) error

type ManagementApiHandler

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

func NewManagementApiHandler

func NewManagementApiHandler(ae *env.AppEnv, options map[interface{}]interface{}) (*ManagementApiHandler, error)

func (ManagementApiHandler) Binding

func (managementApi ManagementApiHandler) Binding() string

func (ManagementApiHandler) IsHandler

func (managementApi ManagementApiHandler) IsHandler(r *http.Request) bool

func (ManagementApiHandler) Options

func (managementApi ManagementApiHandler) Options() map[interface{}]interface{}

func (ManagementApiHandler) RootPath

func (managementApi ManagementApiHandler) RootPath() string

func (ManagementApiHandler) ServeHTTP

func (managementApi ManagementApiHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

type MetricsApiFactory

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

func NewMetricsApiFactory

func NewMetricsApiFactory(nodeId identity.Identity, network *network.Network) *MetricsApiFactory

func (*MetricsApiFactory) Binding

func (factory *MetricsApiFactory) Binding() string

func (*MetricsApiFactory) New

func (factory *MetricsApiFactory) New(_ *xweb.ServerConfig, options map[interface{}]interface{}) (xweb.ApiHandler, error)

func (*MetricsApiFactory) Validate

func (factory *MetricsApiFactory) Validate(_ *xweb.InstanceConfig) error

type MetricsApiHandler

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

func NewMetricsApiHandler

func NewMetricsApiHandler(n *network.Network, options map[interface{}]interface{}) (*MetricsApiHandler, error)

func (*MetricsApiHandler) Binding

func (metricsApi *MetricsApiHandler) Binding() string

func (*MetricsApiHandler) IsHandler

func (metricsApi *MetricsApiHandler) IsHandler(r *http.Request) bool

func (*MetricsApiHandler) Options

func (metricsApi *MetricsApiHandler) Options() map[interface{}]interface{}

func (*MetricsApiHandler) RootPath

func (metricsApi *MetricsApiHandler) RootPath() string

func (*MetricsApiHandler) ServeHTTP

func (metricsApi *MetricsApiHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

type OidcApiFactory

type OidcApiFactory struct {
	InitFunc func(*OidcApiHandler) error
	// contains filtered or unexported fields
}

func NewOidcApiFactory

func NewOidcApiFactory(appEnv *env.AppEnv) *OidcApiFactory

func (OidcApiFactory) Binding

func (factory OidcApiFactory) Binding() string

func (OidcApiFactory) New

func (factory OidcApiFactory) New(serverConfig *xweb.ServerConfig, options map[interface{}]interface{}) (xweb.ApiHandler, error)

func (OidcApiFactory) Validate

func (factory OidcApiFactory) Validate(config *xweb.InstanceConfig) error

type OidcApiHandler

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

func NewOidcApiHandler

func NewOidcApiHandler(serverConfig *xweb.ServerConfig, ae *env.AppEnv, options map[interface{}]interface{}) (*OidcApiHandler, error)

func (OidcApiHandler) Binding

func (h OidcApiHandler) Binding() string

func (OidcApiHandler) IsDefault

func (h OidcApiHandler) IsDefault() bool

func (OidcApiHandler) IsHandler

func (h OidcApiHandler) IsHandler(r *http.Request) bool

func (OidcApiHandler) Options

func (h OidcApiHandler) Options() map[interface{}]interface{}

func (OidcApiHandler) RootPath

func (h OidcApiHandler) RootPath() string

func (OidcApiHandler) ServeHTTP

func (h OidcApiHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

Jump to

Keyboard shortcuts

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