Documentation
¶
Index ¶
- Constants
- Variables
- func AddRouter(router Router)
- func BaseEntityToRestModel(entity models.Entity, linkFactory LinksFactory) rest_model.BaseEntity
- func BoolOrDefault(val *bool) bool
- func Create(rc api.RequestContext, linkFactory CreateLinkFactory, creator ModelCreateF)
- func CreateWithResponder(rsp api.Responder, linkFactory CreateLinkFactory, creator ModelCreateF)
- func Delete(rc api.RequestContext, deleteF ModelDeleteF)
- func DeleteWithHandler(rc api.RequestContext, deleteHandler DeleteHandler)
- func Detail(rc api.RequestContext, f ModelDetailF)
- func DetailWithHandler[T models.Entity](network *network.Network, rc api.RequestContext, ...)
- func Int64OrDefault(val *int64) int64
- func ListAssociationWithHandler[T models.Entity, A models.Entity](n *network.Network, rc api.RequestContext, sourceR models.EntityRetriever[T], ...)
- func ListAssociations(rc api.RequestContext, listF listAssocF)
- func ListWithEnvelopeFactory(rc api.RequestContext, toEnvelope ApiListEnvelopeFactory, f modelListF)
- func ListWithHandler[T models.Entity](n *network.Network, rc api.RequestContext, lister models.EntityRetriever[T], ...)
- func ListWithQueryF[T models.Entity](n *network.Network, rc api.RequestContext, lister models.EntityRetriever[T], ...)
- func ListWithQueryFAndCollector[T models.Entity](n *network.Network, rc api.RequestContext, lister models.EntityRetriever[T], ...)
- func MapCircuitToRestModel(_ *network.Network, _ api.RequestContext, circuit *network.Circuit) (*rest_model.CircuitDetail, error)
- func MapCreateRouterToModel(router *rest_model.RouterCreate) *network.Router
- func MapCreateServiceToModel(service *rest_model.ServiceCreate) *network.Service
- func MapCreateTerminatorToModel(terminator *rest_model.TerminatorCreate) *network.Terminator
- func MapInspectResultToRestModel(n *network.Network, inspectResult *network.InspectResult) *rest_model.InspectResponse
- func MapLinkToRestModel(_ *network.Network, _ api.RequestContext, link *network.Link) (*rest_model.LinkDetail, error)
- func MapPatchRouterToModel(id string, router *rest_model.RouterPatch) *network.Router
- func MapPatchServiceToModel(id string, service *rest_model.ServicePatch) *network.Service
- func MapPatchTerminatorToModel(id string, terminator *rest_model.TerminatorPatch) *network.Terminator
- func MapTerminatorToRestModel(n *network.Network, terminator *network.Terminator) (*rest_model.TerminatorDetail, error)
- func MapUpdateRouterToModel(id string, router *rest_model.RouterUpdate) *network.Router
- func MapUpdateServiceToModel(id string, service *rest_model.ServiceUpdate) *network.Service
- func MapUpdateTerminatorToModel(id string, terminator *rest_model.TerminatorUpdate) *network.Terminator
- func NewLink(path string) rest_model.Link
- func NewRequestContext(rw http.ResponseWriter, r *http.Request) api.RequestContext
- func OverrideRequestWrapper(rw RequestWrapper)
- func Patch(rc api.RequestContext, patchF ModelPatchF)
- func RespondWithCreatedId(responder api.Responder, id string, link rest_model.Link)
- func RespondWithOk(responder api.Responder, data interface{}, meta *rest_model.Meta)
- func ServeError(rw http.ResponseWriter, r *http.Request, inErr error)
- func TagsOrDefault(tags *rest_model.Tags) map[string]interface{}
- func ToEntityRef(name string, entity LinkEntity, factory LinksFactory) *rest_model.EntityRef
- func ToRestModel(e *errorz.ApiError, requestId string) *rest_model.APIError
- func Update(rc api.RequestContext, updateF ModelUpdateF)
- func UpdateAllowEmptyBody(rc api.RequestContext, updateF ModelUpdateF)
- type ApiEntityEnvelopeFactory
- type ApiListEnvelopeFactory
- type BasicLinkFactory
- func (factory *BasicLinkFactory) EntityName() string
- func (factory *BasicLinkFactory) Links(entity LinkEntity) rest_model.Links
- func (factory BasicLinkFactory) NewNestedLink(entity LinkEntity, elem ...string) rest_model.Link
- func (factory *BasicLinkFactory) SelfLink(entity LinkEntity) rest_model.Link
- func (factory *BasicLinkFactory) SelfLinkFromId(id string) rest_model.Link
- func (factory *BasicLinkFactory) SelfUrlString(id string) string
- type CircuitLinkFactoryIml
- type CircuitRouter
- func (r *CircuitRouter) Delete(network *network.Network, rc api.RequestContext, p circuit.DeleteCircuitParams)
- func (r *CircuitRouter) Detail(n *network.Network, rc api.RequestContext)
- func (r *CircuitRouter) ListCircuits(n *network.Network, rc api.RequestContext)
- func (r *CircuitRouter) Register(fabricApi *operations.ZitiFabricAPI, wrapper RequestWrapper)
- type CreateLinkFactory
- type DatabaseRouter
- func (r *DatabaseRouter) CheckDatastoreIntegrity(n *network.Network, rc api.RequestContext, fixErrors bool)
- func (r *DatabaseRouter) CreateSnapshot(n *network.Network, rc api.RequestContext)
- func (r *DatabaseRouter) CreateSnapshotWithPath(n *network.Network, rc api.RequestContext, ...)
- func (r *DatabaseRouter) GetCheckProgress(_ *network.Network, rc api.RequestContext)
- func (r *DatabaseRouter) Register(fabricApi *operations.ZitiFabricAPI, wrapper RequestWrapper)
- type DeleteHandler
- type DeleteHandlerF
- type FabricRequestWrapper
- func (self *FabricRequestWrapper) WrapHttpHandler(handler http.Handler) http.Handler
- func (self *FabricRequestWrapper) WrapRequest(handler RequestHandler, request *http.Request, entityId, entitySubId string) openApiMiddleware.Responder
- func (self *FabricRequestWrapper) WrapWsHandler(handler http.Handler) http.Handler
- type FullLinkFactory
- type InspectRouter
- type LinkEntity
- type LinkLinkFactoryIml
- type LinkRouter
- func (r *LinkRouter) Delete(network *network.Network, rc api.RequestContext)
- func (r *LinkRouter) Detail(n *network.Network, rc api.RequestContext)
- func (r *LinkRouter) ListLinks(n *network.Network, rc api.RequestContext)
- func (r *LinkRouter) Patch(n *network.Network, rc api.RequestContext, params link.PatchLinkParams)
- func (r *LinkRouter) Register(fabricApi *operations.ZitiFabricAPI, wrapper RequestWrapper)
- type LinksFactory
- type ManagementApiFactory
- type ManagementApiHandler
- func (managementApi *ManagementApiHandler) Binding() string
- func (managementApi *ManagementApiHandler) IsHandler(r *http.Request) bool
- func (managementApi *ManagementApiHandler) Options() map[interface{}]interface{}
- func (managementApi *ManagementApiHandler) RootPath() string
- func (managementApi *ManagementApiHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)
- type MetricsApiFactory
- type MetricsApiHandler
- func (metricsApi *MetricsApiHandler) Binding() string
- func (metricsApi *MetricsApiHandler) IsHandler(r *http.Request) bool
- func (metricsApi *MetricsApiHandler) Options() map[interface{}]interface{}
- func (metricsApi *MetricsApiHandler) RootPath() string
- func (metricsApi *MetricsApiHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)
- type MetricsModelMapper
- type ModelCreateF
- type ModelDeleteF
- type ModelDetailF
- type ModelPatchF
- type ModelToApiMapper
- type ModelUpdateF
- type Paging
- type PublicQueryOptions
- type QueryResult
- type RaftRouter
- type RequestHandler
- type RequestWrapper
- type Router
- type RouterLinkFactoryIml
- type RouterModelMapper
- type RouterRouter
- func (r *RouterRouter) Create(n *network.Network, rc api.RequestContext, params router.CreateRouterParams)
- func (r *RouterRouter) Delete(network *network.Network, rc api.RequestContext)
- func (r *RouterRouter) Detail(n *network.Network, rc api.RequestContext)
- func (r *RouterRouter) ListRouters(n *network.Network, rc api.RequestContext)
- func (r *RouterRouter) Patch(n *network.Network, rc api.RequestContext, params router.PatchRouterParams)
- func (r *RouterRouter) Register(fabricApi *operations.ZitiFabricAPI, wrapper RequestWrapper)
- func (r *RouterRouter) Update(n *network.Network, rc api.RequestContext, params router.UpdateRouterParams)
- type SelfLinkFactory
- type ServiceLinkFactoryIml
- type ServiceModelMapper
- type ServiceRouter
- func (r *ServiceRouter) Create(n *network.Network, rc api.RequestContext, params service.CreateServiceParams)
- func (r *ServiceRouter) Delete(network *network.Network, rc api.RequestContext)
- func (r *ServiceRouter) Detail(n *network.Network, rc api.RequestContext)
- func (r *ServiceRouter) ListServices(n *network.Network, rc api.RequestContext)
- func (r *ServiceRouter) Patch(n *network.Network, rc api.RequestContext, params service.PatchServiceParams)
- func (r *ServiceRouter) Register(fabricApi *operations.ZitiFabricAPI, wrapper RequestWrapper)
- func (r *ServiceRouter) Update(n *network.Network, rc api.RequestContext, params service.UpdateServiceParams)
- type TerminatorModelMapper
- type TerminatorRouter
- func (r *TerminatorRouter) Create(n *network.Network, rc api.RequestContext, ...)
- func (r *TerminatorRouter) Delete(n *network.Network, rc api.RequestContext)
- func (r *TerminatorRouter) Detail(n *network.Network, rc api.RequestContext)
- func (r *TerminatorRouter) List(n *network.Network, rc api.RequestContext)
- func (r *TerminatorRouter) Patch(n *network.Network, rc api.RequestContext, ...)
- func (r *TerminatorRouter) Register(fabricApi *operations.ZitiFabricAPI, wrapper RequestWrapper)
- func (r *TerminatorRouter) Update(n *network.Network, rc api.RequestContext, ...)
Constants ¶
View Source
const ( ApiVersion = "1.0.0" VersionV1 = "v1" RestApiV1 = "/" + VersionV1 FabricRestApiRootPath = "/fabric" FabricRestApiBaseUrlV1 = FabricRestApiRootPath + RestApiV1 FabricRestApiBaseUrlLatest = FabricRestApiBaseUrlV1 FabricRestApiSpecUrl = FabricRestApiBaseUrlLatest + "/swagger.json" FabricApiBinding = "fabric" MetricApiBinding = "metrics" )
View Source
const EntityNameCircuit = "circuits"
View Source
const EntityNameInspect = "inspections"
View Source
const EntityNameLink = "links"
View Source
const EntityNameMetrics = "metrics"
View Source
const EntityNameRouter = "routers"
View Source
const (
EntityNameSelf = "self"
)
View Source
const EntityNameService = "services"
View Source
const EntityNameTerminator = "terminators"
View Source
const (
LimitMax = 500
)
View Source
const (
ServerHeader = "server"
)
Variables ¶
View Source
var AllApiBindingVersions = map[string]map[string]string{ FabricApiBinding: { VersionV1: FabricRestApiBaseUrlV1, }, }
AllApiBindingVersions is a map of: API Binding -> Api Version -> API Path Adding values here will add them to the /versions REST API endpoint
View Source
var CircuitLinkFactory = NewCircuitLinkFactory()
View Source
var LinkLinkFactory = NewLinkLinkFactory()
View Source
var RouterLinkFactory = NewRouterLinkFactory()
View Source
var ServiceLinkFactory = NewServiceLinkFactory()
View Source
var TerminatorLinkFactory = NewBasicLinkFactory(EntityNameTerminator)
Functions ¶
func BaseEntityToRestModel ¶
func BaseEntityToRestModel(entity models.Entity, linkFactory LinksFactory) rest_model.BaseEntity
func BoolOrDefault ¶
func Create ¶
func Create(rc api.RequestContext, linkFactory CreateLinkFactory, creator ModelCreateF)
func CreateWithResponder ¶
func CreateWithResponder(rsp api.Responder, linkFactory CreateLinkFactory, creator ModelCreateF)
func Delete ¶
func Delete(rc api.RequestContext, deleteF ModelDeleteF)
func DeleteWithHandler ¶
func DeleteWithHandler(rc api.RequestContext, deleteHandler DeleteHandler)
func Detail ¶
func Detail(rc api.RequestContext, f ModelDetailF)
func DetailWithHandler ¶
func DetailWithHandler[T models.Entity](network *network.Network, rc api.RequestContext, loader models.EntityRetriever[T], mapper ModelToApiMapper[T])
func Int64OrDefault ¶
func ListAssociationWithHandler ¶
func ListAssociationWithHandler[T models.Entity, A models.Entity](n *network.Network, rc api.RequestContext, sourceR models.EntityRetriever[T], associatedR models.EntityRetriever[A], mapper ModelToApiMapper[A])
func ListAssociations ¶
func ListAssociations(rc api.RequestContext, listF listAssocF)
func ListWithEnvelopeFactory ¶
func ListWithEnvelopeFactory(rc api.RequestContext, toEnvelope ApiListEnvelopeFactory, f modelListF)
func ListWithHandler ¶
func ListWithHandler[T models.Entity](n *network.Network, rc api.RequestContext, lister models.EntityRetriever[T], mapper ModelToApiMapper[T])
func ListWithQueryF ¶
func ListWithQueryF[T models.Entity](n *network.Network, rc api.RequestContext, lister models.EntityRetriever[T], mapper ModelToApiMapper[T], qf func(query ast.Query) (*models.EntityListResult[T], error))
func ListWithQueryFAndCollector ¶
func ListWithQueryFAndCollector[T models.Entity](n *network.Network, rc api.RequestContext, lister models.EntityRetriever[T], mapper ModelToApiMapper[T], toEnvelope ApiListEnvelopeFactory, qf func(query ast.Query) (*models.EntityListResult[T], error))
func MapCircuitToRestModel ¶
func MapCircuitToRestModel(_ *network.Network, _ api.RequestContext, circuit *network.Circuit) (*rest_model.CircuitDetail, error)
func MapCreateRouterToModel ¶
func MapCreateRouterToModel(router *rest_model.RouterCreate) *network.Router
func MapCreateServiceToModel ¶
func MapCreateServiceToModel(service *rest_model.ServiceCreate) *network.Service
func MapCreateTerminatorToModel ¶
func MapCreateTerminatorToModel(terminator *rest_model.TerminatorCreate) *network.Terminator
func MapInspectResultToRestModel ¶ added in v0.17.9
func MapInspectResultToRestModel(n *network.Network, inspectResult *network.InspectResult) *rest_model.InspectResponse
func MapLinkToRestModel ¶
func MapLinkToRestModel(_ *network.Network, _ api.RequestContext, link *network.Link) (*rest_model.LinkDetail, error)
func MapPatchRouterToModel ¶
func MapPatchRouterToModel(id string, router *rest_model.RouterPatch) *network.Router
func MapPatchServiceToModel ¶
func MapPatchServiceToModel(id string, service *rest_model.ServicePatch) *network.Service
func MapPatchTerminatorToModel ¶
func MapPatchTerminatorToModel(id string, terminator *rest_model.TerminatorPatch) *network.Terminator
func MapTerminatorToRestModel ¶
func MapTerminatorToRestModel(n *network.Network, terminator *network.Terminator) (*rest_model.TerminatorDetail, error)
func MapUpdateRouterToModel ¶
func MapUpdateRouterToModel(id string, router *rest_model.RouterUpdate) *network.Router
func MapUpdateServiceToModel ¶
func MapUpdateServiceToModel(id string, service *rest_model.ServiceUpdate) *network.Service
func MapUpdateTerminatorToModel ¶
func MapUpdateTerminatorToModel(id string, terminator *rest_model.TerminatorUpdate) *network.Terminator
func NewLink ¶
func NewLink(path string) rest_model.Link
func NewRequestContext ¶
func NewRequestContext(rw http.ResponseWriter, r *http.Request) api.RequestContext
func OverrideRequestWrapper ¶
func OverrideRequestWrapper(rw RequestWrapper)
func Patch ¶
func Patch(rc api.RequestContext, patchF ModelPatchF)
func RespondWithCreatedId ¶
func RespondWithCreatedId(responder api.Responder, id string, link rest_model.Link)
func RespondWithOk ¶
func RespondWithOk(responder api.Responder, data interface{}, meta *rest_model.Meta)
func ServeError ¶
func ServeError(rw http.ResponseWriter, r *http.Request, inErr error)
Wrapper for the OpenAPI REST server to allow the the Edge API Error message responses to be used
func TagsOrDefault ¶
func TagsOrDefault(tags *rest_model.Tags) map[string]interface{}
func ToEntityRef ¶
func ToEntityRef(name string, entity LinkEntity, factory LinksFactory) *rest_model.EntityRef
func ToRestModel ¶
func ToRestModel(e *errorz.ApiError, requestId string) *rest_model.APIError
func Update ¶
func Update(rc api.RequestContext, updateF ModelUpdateF)
func UpdateAllowEmptyBody ¶
func UpdateAllowEmptyBody(rc api.RequestContext, updateF ModelUpdateF)
Types ¶
type ApiEntityEnvelopeFactory ¶
type ApiEntityEnvelopeFactory func(data interface{}, meta *rest_model.Meta) interface{}
type ApiListEnvelopeFactory ¶
type ApiListEnvelopeFactory func(data []interface{}, meta *rest_model.Meta) interface{}
type BasicLinkFactory ¶
type BasicLinkFactory struct {
// contains filtered or unexported fields
}
func NewBasicLinkFactory ¶
func NewBasicLinkFactory(entityName string) *BasicLinkFactory
func (*BasicLinkFactory) EntityName ¶
func (factory *BasicLinkFactory) EntityName() string
func (*BasicLinkFactory) Links ¶
func (factory *BasicLinkFactory) Links(entity LinkEntity) rest_model.Links
func (BasicLinkFactory) NewNestedLink ¶
func (factory BasicLinkFactory) NewNestedLink(entity LinkEntity, elem ...string) rest_model.Link
func (*BasicLinkFactory) SelfLink ¶
func (factory *BasicLinkFactory) SelfLink(entity LinkEntity) rest_model.Link
func (*BasicLinkFactory) SelfLinkFromId ¶
func (factory *BasicLinkFactory) SelfLinkFromId(id string) rest_model.Link
func (*BasicLinkFactory) SelfUrlString ¶
func (factory *BasicLinkFactory) SelfUrlString(id string) string
type CircuitLinkFactoryIml ¶
type CircuitLinkFactoryIml struct {
BasicLinkFactory
}
func NewCircuitLinkFactory ¶
func NewCircuitLinkFactory() *CircuitLinkFactoryIml
func (*CircuitLinkFactoryIml) Links ¶
func (factory *CircuitLinkFactoryIml) Links(entity LinkEntity) rest_model.Links
type CircuitRouter ¶
type CircuitRouter struct {
BasePath string
}
func NewCircuitRouter ¶
func NewCircuitRouter() *CircuitRouter
func (*CircuitRouter) Delete ¶
func (r *CircuitRouter) Delete(network *network.Network, rc api.RequestContext, p circuit.DeleteCircuitParams)
func (*CircuitRouter) Detail ¶
func (r *CircuitRouter) Detail(n *network.Network, rc api.RequestContext)
func (*CircuitRouter) ListCircuits ¶
func (r *CircuitRouter) ListCircuits(n *network.Network, rc api.RequestContext)
func (*CircuitRouter) Register ¶
func (r *CircuitRouter) Register(fabricApi *operations.ZitiFabricAPI, wrapper RequestWrapper)
type CreateLinkFactory ¶
type CreateLinkFactory interface {
SelfLinkFromId(id string) rest_model.Link
}
type DatabaseRouter ¶ added in v0.17.62
type DatabaseRouter struct {
// contains filtered or unexported fields
}
func NewDatabaseRouter ¶ added in v0.17.62
func NewDatabaseRouter() *DatabaseRouter
func (*DatabaseRouter) CheckDatastoreIntegrity ¶ added in v0.17.62
func (r *DatabaseRouter) CheckDatastoreIntegrity(n *network.Network, rc api.RequestContext, fixErrors bool)
func (*DatabaseRouter) CreateSnapshot ¶ added in v0.17.62
func (r *DatabaseRouter) CreateSnapshot(n *network.Network, rc api.RequestContext)
func (*DatabaseRouter) CreateSnapshotWithPath ¶ added in v0.24.29
func (r *DatabaseRouter) CreateSnapshotWithPath(n *network.Network, rc api.RequestContext, snapshot *rest_model.DatabaseSnapshotCreate)
func (*DatabaseRouter) GetCheckProgress ¶ added in v0.17.62
func (r *DatabaseRouter) GetCheckProgress(_ *network.Network, rc api.RequestContext)
func (*DatabaseRouter) Register ¶ added in v0.17.62
func (r *DatabaseRouter) Register(fabricApi *operations.ZitiFabricAPI, wrapper RequestWrapper)
type DeleteHandlerF ¶
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 RequestHandler, request *http.Request, entityId, entitySubId string) openApiMiddleware.Responder
func (*FabricRequestWrapper) WrapWsHandler ¶ added in v0.17.104
func (self *FabricRequestWrapper) WrapWsHandler(handler http.Handler) http.Handler
type FullLinkFactory ¶
type FullLinkFactory interface { LinksFactory SelfLinkFactory }
type InspectRouter ¶ added in v0.17.9
type InspectRouter struct {
BasePath string
}
func NewInspectRouter ¶ added in v0.17.9
func NewInspectRouter() *InspectRouter
func (*InspectRouter) Inspect ¶ added in v0.17.9
func (r *InspectRouter) Inspect(n *network.Network, rc api.RequestContext, request *rest_model.InspectRequest)
func (*InspectRouter) Register ¶ added in v0.17.9
func (r *InspectRouter) Register(fabricApi *operations.ZitiFabricAPI, wrapper RequestWrapper)
type LinkEntity ¶
type LinkEntity interface {
GetId() string
}
type LinkLinkFactoryIml ¶
type LinkLinkFactoryIml struct {
BasicLinkFactory
}
func NewLinkLinkFactory ¶
func NewLinkLinkFactory() *LinkLinkFactoryIml
func (*LinkLinkFactoryIml) Links ¶
func (factory *LinkLinkFactoryIml) Links(entity LinkEntity) rest_model.Links
type LinkRouter ¶
type LinkRouter struct {
BasePath string
}
func NewLinkRouter ¶
func NewLinkRouter() *LinkRouter
func (*LinkRouter) Delete ¶ added in v0.17.121
func (r *LinkRouter) Delete(network *network.Network, rc api.RequestContext)
func (*LinkRouter) Detail ¶
func (r *LinkRouter) Detail(n *network.Network, rc api.RequestContext)
func (*LinkRouter) ListLinks ¶
func (r *LinkRouter) ListLinks(n *network.Network, rc api.RequestContext)
func (*LinkRouter) Patch ¶
func (r *LinkRouter) Patch(n *network.Network, rc api.RequestContext, params link.PatchLinkParams)
func (*LinkRouter) Register ¶
func (r *LinkRouter) Register(fabricApi *operations.ZitiFabricAPI, wrapper RequestWrapper)
type LinksFactory ¶
type LinksFactory interface { Links(entity LinkEntity) rest_model.Links EntityName() string }
type ManagementApiFactory ¶
type ManagementApiFactory struct { InitFunc func(managementApi *ManagementApiHandler) error // contains filtered or unexported fields }
func NewManagementApiFactory ¶
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(fabricApi *operations.ZitiFabricAPI, 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 ¶ added in v0.18.4
type MetricsApiFactory struct {
// contains filtered or unexported fields
}
func NewMetricsApiFactory ¶ added in v0.18.4
func (*MetricsApiFactory) Binding ¶ added in v0.18.4
func (factory *MetricsApiFactory) Binding() string
func (*MetricsApiFactory) New ¶ added in v0.18.4
func (factory *MetricsApiFactory) New(_ *xweb.ServerConfig, options map[interface{}]interface{}) (xweb.ApiHandler, error)
func (*MetricsApiFactory) Validate ¶ added in v0.18.4
func (factory *MetricsApiFactory) Validate(_ *xweb.InstanceConfig) error
type MetricsApiHandler ¶ added in v0.18.4
type MetricsApiHandler struct {
// contains filtered or unexported fields
}
func NewMetricsApiHandler ¶ added in v0.18.4
func NewMetricsApiHandler(n *network.Network, options map[interface{}]interface{}) (*MetricsApiHandler, error)
func (*MetricsApiHandler) Binding ¶ added in v0.18.4
func (metricsApi *MetricsApiHandler) Binding() string
func (*MetricsApiHandler) IsHandler ¶ added in v0.18.4
func (metricsApi *MetricsApiHandler) IsHandler(r *http.Request) bool
func (*MetricsApiHandler) Options ¶ added in v0.18.4
func (metricsApi *MetricsApiHandler) Options() map[interface{}]interface{}
func (*MetricsApiHandler) RootPath ¶ added in v0.18.4
func (metricsApi *MetricsApiHandler) RootPath() string
func (*MetricsApiHandler) ServeHTTP ¶ added in v0.18.4
func (metricsApi *MetricsApiHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)
type MetricsModelMapper ¶ added in v0.18.7
type MetricsModelMapper interface { MapInspectResultToMetricsResult(inspectResult *network.InspectResult) (*string, error) MapInspectResultValueToMetricsResult(inspectResultValue *network.InspectResultValue) (any, error) }
func NewMetricsModelMapper ¶ added in v0.18.7
func NewMetricsModelMapper(n *network.Network, format string, includeTimestamps bool) MetricsModelMapper
type ModelCreateF ¶
type ModelDeleteF ¶
type ModelDeleteF func(rc api.RequestContext, id string) error
type ModelDetailF ¶
type ModelDetailF func(rc api.RequestContext, id string) (interface{}, error)
type ModelPatchF ¶
type ModelPatchF func(id string, fields fields.UpdatedFields) error
type ModelToApiMapper ¶
type ModelUpdateF ¶
type PublicQueryOptions ¶
PublicQueryOptions represents external query options, which limits some query options (i.e. return all vs max limit). PublicQueryOptions can be used internally as long as the public option limitations are fitting.
func GetModelQueryOptionsFromRequest ¶
func GetModelQueryOptionsFromRequest(r *http.Request) (*PublicQueryOptions, error)
func (*PublicQueryOptions) String ¶
func (qo *PublicQueryOptions) String() string
type QueryResult ¶
type QueryResult struct { Result interface{} Count int64 Limit int64 Offset int64 FilterableFields []string }
func NewQueryResult ¶
func NewQueryResult(result interface{}, metadata *models.QueryMetaData) *QueryResult
type RaftRouter ¶ added in v0.22.10
type RaftRouter struct { }
func NewRaftRouter ¶ added in v0.22.10
func NewRaftRouter() *RaftRouter
func (*RaftRouter) ListMembers ¶ added in v0.22.10
func (r *RaftRouter) ListMembers(n *network.Network, rc api.RequestContext)
func (*RaftRouter) Register ¶ added in v0.22.10
func (r *RaftRouter) Register(fabricApi *operations.ZitiFabricAPI, wrapper RequestWrapper)
type RequestHandler ¶
type RequestHandler func(network *network.Network, rc api.RequestContext)
type RequestWrapper ¶
type Router ¶
type Router interface {
Register(fabricApi *operations.ZitiFabricAPI, wrapper RequestWrapper)
}
type RouterLinkFactoryIml ¶
type RouterLinkFactoryIml struct {
BasicLinkFactory
}
func NewRouterLinkFactory ¶
func NewRouterLinkFactory() *RouterLinkFactoryIml
func (*RouterLinkFactoryIml) Links ¶
func (factory *RouterLinkFactoryIml) Links(entity LinkEntity) rest_model.Links
type RouterModelMapper ¶ added in v0.19.30
type RouterModelMapper struct{}
func (RouterModelMapper) ToApi ¶ added in v0.19.30
func (RouterModelMapper) ToApi(n *network.Network, _ api.RequestContext, router *network.Router) (interface{}, error)
type RouterRouter ¶
type RouterRouter struct {
BasePath string
}
func NewRouterRouter ¶
func NewRouterRouter() *RouterRouter
func (*RouterRouter) Create ¶
func (r *RouterRouter) Create(n *network.Network, rc api.RequestContext, params router.CreateRouterParams)
func (*RouterRouter) Delete ¶
func (r *RouterRouter) Delete(network *network.Network, rc api.RequestContext)
func (*RouterRouter) Detail ¶
func (r *RouterRouter) Detail(n *network.Network, rc api.RequestContext)
func (*RouterRouter) ListRouters ¶
func (r *RouterRouter) ListRouters(n *network.Network, rc api.RequestContext)
func (*RouterRouter) Patch ¶
func (r *RouterRouter) Patch(n *network.Network, rc api.RequestContext, params router.PatchRouterParams)
func (*RouterRouter) Register ¶
func (r *RouterRouter) Register(fabricApi *operations.ZitiFabricAPI, wrapper RequestWrapper)
func (*RouterRouter) Update ¶
func (r *RouterRouter) Update(n *network.Network, rc api.RequestContext, params router.UpdateRouterParams)
type SelfLinkFactory ¶
type SelfLinkFactory interface {
SelfLink(entity models.Entity) rest_model.Link
}
type ServiceLinkFactoryIml ¶
type ServiceLinkFactoryIml struct {
BasicLinkFactory
}
func NewServiceLinkFactory ¶
func NewServiceLinkFactory() *ServiceLinkFactoryIml
func (*ServiceLinkFactoryIml) Links ¶
func (factory *ServiceLinkFactoryIml) Links(entity LinkEntity) rest_model.Links
type ServiceModelMapper ¶ added in v0.19.30
type ServiceModelMapper struct{}
func (ServiceModelMapper) ToApi ¶ added in v0.19.30
func (ServiceModelMapper) ToApi(_ *network.Network, _ api.RequestContext, service *network.Service) (interface{}, error)
type ServiceRouter ¶
type ServiceRouter struct {
BasePath string
}
func NewServiceRouter ¶
func NewServiceRouter() *ServiceRouter
func (*ServiceRouter) Create ¶
func (r *ServiceRouter) Create(n *network.Network, rc api.RequestContext, params service.CreateServiceParams)
func (*ServiceRouter) Delete ¶
func (r *ServiceRouter) Delete(network *network.Network, rc api.RequestContext)
func (*ServiceRouter) Detail ¶
func (r *ServiceRouter) Detail(n *network.Network, rc api.RequestContext)
func (*ServiceRouter) ListServices ¶
func (r *ServiceRouter) ListServices(n *network.Network, rc api.RequestContext)
func (*ServiceRouter) Patch ¶
func (r *ServiceRouter) Patch(n *network.Network, rc api.RequestContext, params service.PatchServiceParams)
func (*ServiceRouter) Register ¶
func (r *ServiceRouter) Register(fabricApi *operations.ZitiFabricAPI, wrapper RequestWrapper)
func (*ServiceRouter) Update ¶
func (r *ServiceRouter) Update(n *network.Network, rc api.RequestContext, params service.UpdateServiceParams)
type TerminatorModelMapper ¶ added in v0.19.30
type TerminatorModelMapper struct{}
func (TerminatorModelMapper) ToApi ¶ added in v0.19.30
func (TerminatorModelMapper) ToApi(n *network.Network, _ api.RequestContext, terminator *network.Terminator) (interface{}, error)
type TerminatorRouter ¶
type TerminatorRouter struct {
BasePath string
}
func NewTerminatorRouter ¶
func NewTerminatorRouter() *TerminatorRouter
func (*TerminatorRouter) Create ¶
func (r *TerminatorRouter) Create(n *network.Network, rc api.RequestContext, params terminator.CreateTerminatorParams)
func (*TerminatorRouter) Delete ¶
func (r *TerminatorRouter) Delete(n *network.Network, rc api.RequestContext)
func (*TerminatorRouter) Detail ¶
func (r *TerminatorRouter) Detail(n *network.Network, rc api.RequestContext)
func (*TerminatorRouter) List ¶
func (r *TerminatorRouter) List(n *network.Network, rc api.RequestContext)
func (*TerminatorRouter) Patch ¶
func (r *TerminatorRouter) Patch(n *network.Network, rc api.RequestContext, params terminator.PatchTerminatorParams)
func (*TerminatorRouter) Register ¶
func (r *TerminatorRouter) Register(fabricApi *operations.ZitiFabricAPI, wrapper RequestWrapper)
func (*TerminatorRouter) Update ¶
func (r *TerminatorRouter) Update(n *network.Network, rc api.RequestContext, params terminator.UpdateTerminatorParams)
Source Files
¶
- base_entity_api_model.go
- base_router.go
- circuit_api_model.go
- circuit_router.go
- context.go
- database_router.go
- helpers.go
- inspections_api_model.go
- inspections_router.go
- link_api_model.go
- link_router.go
- management-api.go
- metrics-api.go
- metrics_api_model.go
- query_options.go
- raft_router.go
- responder.go
- router_api_model.go
- router_router.go
- routers.go
- routes.go
- service_api_model.go
- service_router.go
- terminator_api_model.go
- terminator_router.go
- versions.go
- wrapper.go
Click to show internal directories.
Click to hide internal directories.