Documentation ¶
Index ¶
- Constants
- func AddRequestContextToHttpContext(r *http.Request, rc *response.RequestContext)
- func AddRouter(rf ApiRouter)
- func GetRequestContextFromHttpContext(r *http.Request) (*response.RequestContext, error)
- func NewEdgeTerminatorValidator(ae *AppEnv) xtv.Validator
- func ServeError(rw http.ResponseWriter, r *http.Request, inErr error)
- type AddRouterFunc
- type ApiRouter
- type AppEnv
- func (ae *AppEnv) CreateRequestContext(rw http.ResponseWriter, r *http.Request) *response.RequestContext
- func (ae *AppEnv) FillRequestContext(rc *response.RequestContext) error
- func (ae *AppEnv) GetApiClientCsrSigner() cert.Signer
- func (ae *AppEnv) GetApiServerCsrSigner() cert.Signer
- func (ae *AppEnv) GetAuthRegistry() model.AuthRegistry
- func (ae *AppEnv) GetConfig() *edgeConfig.Config
- func (ae *AppEnv) GetControlClientCsrSigner() cert.Signer
- func (ae *AppEnv) GetDbProvider() persistence.DbProvider
- func (ae *AppEnv) GetEnrollRegistry() model.EnrollmentRegistry
- func (ae *AppEnv) GetEnrollmentJwtGenerator() jwt.EnrollmentGenerator
- func (ae *AppEnv) GetFingerprintGenerator() cert.FingerprintGenerator
- func (ae *AppEnv) GetHandlers() *model.Handlers
- func (ae *AppEnv) GetHostController() model.HostController
- func (ae *AppEnv) GetMetricsRegistry() metrics.Registry
- func (ae *AppEnv) GetSessionTokenFromRequest(r *http.Request) string
- func (ae *AppEnv) GetStores() *persistence.Stores
- func (ae *AppEnv) InitPersistence() error
- func (ae *AppEnv) IsAllowed(responderFunc func(ae *AppEnv, rc *response.RequestContext), ...) openApiMiddleware.Responder
- func (ae *AppEnv) IsEdgeRouterOnline(id string) bool
- type AppHandler
- type AppMiddleware
- type BasicEntitySchema
- type Broker
- func (b *Broker) AddEdgeRouter(ch channel2.Channel, edgeRouter *model.EdgeRouter)
- func (b *Broker) GetOnlineEdgeRouter(id string) *model.EdgeRouter
- func (b *Broker) ReceiveHello(r *network.Router, edgeRouter *model.EdgeRouter, ...)
- func (b *Broker) RouterConnected(r *network.Router)
- func (b *Broker) RouterDisconnected(r *network.Router)
- type ContextKey
- type DefaultEventLogger
- type EdgeTerminatorValidator
- type EnvInfo
- type HostController
- type IdentityEntitySchema
- type PemProducer
- type Schemes
- type SdkInfo
- type YamlProducer
Constants ¶
View Source
const ( SessionRemovedType = int32(edge_ctrl_pb.ContentType_SessionRemovedType) SessionAddedType = int32(edge_ctrl_pb.ContentType_SessionAddedType) SessionUpdatedType = int32(edge_ctrl_pb.ContentType_SessionUpdatedType) ApiSessionHeartbeatType = int32(edge_ctrl_pb.ContentType_ApiSessionHeartbeatType) ApiSessionRemovedType = int32(edge_ctrl_pb.ContentType_ApiSessionRemovedType) ApiSessionAddedType = int32(edge_ctrl_pb.ContentType_ApiSessionAddedType) ApiSessionUpdatedType = int32(edge_ctrl_pb.ContentType_ApiSessionUpdatedType) ServerHelloType = int32(edge_ctrl_pb.ContentType_ServerHelloType) ClientHelloType = int32(edge_ctrl_pb.ContentType_ClientHelloType) )
View Source
const EdgeContextKey = ContextKey("edgeContext")
Variables ¶
This section is empty.
Functions ¶
func AddRequestContextToHttpContext ¶ added in v0.14.35
func AddRequestContextToHttpContext(r *http.Request, rc *response.RequestContext)
func GetRequestContextFromHttpContext ¶ added in v0.14.35
func GetRequestContextFromHttpContext(r *http.Request) (*response.RequestContext, error)
func NewEdgeTerminatorValidator ¶ added in v0.16.23
func ServeError ¶ added in v0.14.35
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
Types ¶
type AddRouterFunc ¶
type AddRouterFunc func(ae *AppEnv)
func GetRouters ¶
func GetRouters() []AddRouterFunc
type AppEnv ¶
type AppEnv struct { BoltStores *persistence.Stores Handlers *model.Handlers Config *edgeConfig.Config EnrollmentJwtGenerator jwt.EnrollmentGenerator Versions *config.Versions AuthHeaderName string AuthCookieName string ApiServerCsrSigner cert.Signer ApiClientCsrSigner cert.Signer ControlClientCsrSigner cert.Signer FingerprintGenerator cert.FingerprintGenerator AuthRegistry model.AuthRegistry EnrollRegistry model.EnrollmentRegistry Broker *Broker HostController HostController Api *operations.ZitiEdgeAPI }
func NewAppEnv ¶
func NewAppEnv(c *edgeConfig.Config) *AppEnv
func (*AppEnv) CreateRequestContext ¶ added in v0.14.35
func (ae *AppEnv) CreateRequestContext(rw http.ResponseWriter, r *http.Request) *response.RequestContext
func (*AppEnv) FillRequestContext ¶ added in v0.14.35
func (ae *AppEnv) FillRequestContext(rc *response.RequestContext) error
func (*AppEnv) GetApiClientCsrSigner ¶
func (*AppEnv) GetApiServerCsrSigner ¶
func (*AppEnv) GetAuthRegistry ¶
func (ae *AppEnv) GetAuthRegistry() model.AuthRegistry
func (*AppEnv) GetConfig ¶
func (ae *AppEnv) GetConfig() *edgeConfig.Config
func (*AppEnv) GetControlClientCsrSigner ¶
func (*AppEnv) GetDbProvider ¶
func (ae *AppEnv) GetDbProvider() persistence.DbProvider
func (*AppEnv) GetEnrollRegistry ¶
func (ae *AppEnv) GetEnrollRegistry() model.EnrollmentRegistry
func (*AppEnv) GetEnrollmentJwtGenerator ¶
func (ae *AppEnv) GetEnrollmentJwtGenerator() jwt.EnrollmentGenerator
func (*AppEnv) GetFingerprintGenerator ¶ added in v0.17.30
func (ae *AppEnv) GetFingerprintGenerator() cert.FingerprintGenerator
func (*AppEnv) GetHandlers ¶
func (*AppEnv) GetHostController ¶
func (ae *AppEnv) GetHostController() model.HostController
func (*AppEnv) GetMetricsRegistry ¶ added in v0.16.0
func (*AppEnv) GetSessionTokenFromRequest ¶ added in v0.14.35
func (*AppEnv) GetStores ¶
func (ae *AppEnv) GetStores() *persistence.Stores
func (*AppEnv) InitPersistence ¶
func (*AppEnv) IsAllowed ¶ added in v0.14.35
func (ae *AppEnv) IsAllowed(responderFunc func(ae *AppEnv, rc *response.RequestContext), request *http.Request, entityId string, entitySubId string, permissions ...permissions.Resolver) openApiMiddleware.Responder
func (*AppEnv) IsEdgeRouterOnline ¶
type AppHandler ¶
type AppHandler func(ae *AppEnv, rc *response.RequestContext)
type BasicEntitySchema ¶
type BasicEntitySchema struct { Post *gojsonschema.Schema Patch *gojsonschema.Schema Put *gojsonschema.Schema }
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
func (*Broker) AddEdgeRouter ¶
func (b *Broker) AddEdgeRouter(ch channel2.Channel, edgeRouter *model.EdgeRouter)
func (*Broker) GetOnlineEdgeRouter ¶
func (b *Broker) GetOnlineEdgeRouter(id string) *model.EdgeRouter
func (*Broker) ReceiveHello ¶ added in v0.15.20
func (b *Broker) ReceiveHello(r *network.Router, edgeRouter *model.EdgeRouter, respHello *edge_ctrl_pb.ClientHello)
func (*Broker) RouterConnected ¶
func (*Broker) RouterDisconnected ¶
type DefaultEventLogger ¶
type DefaultEventLogger struct {
Ae *AppEnv
}
func (*DefaultEventLogger) Log ¶
func (el *DefaultEventLogger) Log(actorType, actorId, eventType, entityType, entityId, formatString string, formatData []string, data map[interface{}]interface{})
type EdgeTerminatorValidator ¶ added in v0.16.23
type EdgeTerminatorValidator struct {
// contains filtered or unexported fields
}
func (*EdgeTerminatorValidator) Validate ¶ added in v0.16.23
func (v *EdgeTerminatorValidator) Validate(tx *bbolt.Tx, terminator xtv.Terminator, create bool) error
type HostController ¶
type IdentityEntitySchema ¶
type IdentityEntitySchema struct { Post *gojsonschema.Schema Patch *gojsonschema.Schema Put *gojsonschema.Schema ServiceConfigs *gojsonschema.Schema }
type PemProducer ¶ added in v0.15.13
type PemProducer struct{}
type Schemes ¶
type Schemes struct { Association *BasicEntitySchema Authenticator *BasicEntitySchema AuthenticatorSelf *BasicEntitySchema Ca *BasicEntitySchema Config *BasicEntitySchema ConfigType *BasicEntitySchema Enroller *BasicEntitySchema EnrollEr *BasicEntitySchema EnrollUpdb *BasicEntitySchema EdgeRouter *BasicEntitySchema EdgeRouterPolicy *BasicEntitySchema TransitRouter *BasicEntitySchema Identity *IdentityEntitySchema Service *BasicEntitySchema ServiceEdgeRouterPolicy *BasicEntitySchema ServicePolicy *BasicEntitySchema Session *BasicEntitySchema Terminator *BasicEntitySchema }
func (Schemes) GetEnrollErPost ¶
func (s Schemes) GetEnrollErPost() *gojsonschema.Schema
func (Schemes) GetEnrollUpdbPost ¶
func (s Schemes) GetEnrollUpdbPost() *gojsonschema.Schema
type YamlProducer ¶ added in v0.15.16
type YamlProducer struct{}
Click to show internal directories.
Click to hide internal directories.