Documentation ¶
Index ¶
- Constants
- Variables
- func AlertCmd(message *Message, p *Papi, sync bool) error
- func CustomRecoveryWithWriter() gin.HandlerFunc
- func DecisionCmd(message *Message, p *Papi, sync bool) error
- func ManagementCmd(message *Message, p *Papi, sync bool) error
- func NewAPIC(config *csconfig.OnlineApiClientCfg, dbClient *database.Client, ...) (*apic, error)
- type APIServer
- func (s *APIServer) AttachPluginBroker(broker *csplugin.PluginBroker)
- func (s *APIServer) Close()
- func (s *APIServer) GetTLSConfig() (*tls.Config, error)
- func (s *APIServer) InitController() error
- func (s *APIServer) Router() (*gin.Engine, error)
- func (s *APIServer) Run(apiReady chan bool) error
- func (s *APIServer) Shutdown() error
- type Header
- type Message
- type OperationChannels
- type Papi
- type PapiPermCheckError
- type PapiPermCheckSuccess
- type Source
Constants ¶
View Source
const (
PapiPullKey = "papi:last_pull"
)
Variables ¶
View Source
var (
SyncInterval = time.Second * 10
)
Functions ¶
func CustomRecoveryWithWriter ¶ added in v1.0.12
func CustomRecoveryWithWriter() gin.HandlerFunc
RecoveryWithWriter returns a middleware for a given writer that recovers from any panics and writes a 500 if there was one.
func NewAPIC ¶
func NewAPIC(config *csconfig.OnlineApiClientCfg, dbClient *database.Client, consoleConfig *csconfig.ConsoleConfig, apicWhitelist *csconfig.CapiWhitelist) (*apic, error)
Types ¶
type APIServer ¶
func (*APIServer) AttachPluginBroker ¶ added in v1.2.0
func (s *APIServer) AttachPluginBroker(broker *csplugin.PluginBroker)
func (*APIServer) GetTLSConfig ¶ added in v1.4.0
func (*APIServer) InitController ¶ added in v1.2.0
type Message ¶ added in v1.5.0
type Message struct { Header *Header Data interface{} `json:"data"` }
type OperationChannels ¶ added in v1.5.0
type Papi ¶ added in v1.5.0
type Papi struct { URL string Client *longpollclient.LongPollClient DBClient *database.Client Channels *OperationChannels SyncInterval time.Duration Logger *log.Entry // contains filtered or unexported fields }
func (*Papi) GetPermissions ¶ added in v1.5.0
func (p *Papi) GetPermissions() (PapiPermCheckSuccess, error)
func (*Papi) Pull ¶ added in v1.5.0
PullPAPI is the long polling client for real-time decisions from PAPI
func (*Papi) SendDeletedDecisions ¶ added in v1.5.0
func (p *Papi) SendDeletedDecisions(cacheOrig *models.DecisionsDeleteRequest)
func (*Papi) SyncDecisions ¶ added in v1.5.0
type PapiPermCheckError ¶ added in v1.5.0
type PapiPermCheckError struct {
Error string `json:"error"`
}
type PapiPermCheckSuccess ¶ added in v1.5.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.