Documentation ¶
Overview ¶
Package messaging holds the implementation for event listeners functions
Package messaging holds the implementation for event listeners functions ¶
Package messaging holds the implementation for event listeners functions ¶
Package messaging holds the implementation for event listeners functions ¶
Package messaging holds the implementation for event listeners functions
Index ¶
- Variables
- func InitiateConsumers(connectionString string, subscriptionMetaDataList []Subscription, ...)
- func InitiateJMSConnection(eventListeningEndpoints []string) error
- type APIEvent
- type APIPolicyEvent
- type ApplicationEvent
- type ApplicationRegistrationEvent
- type Claim
- type Consumer
- type Event
- type EventKeyManagerNotification
- type EventNotification
- type EventOrganizationPurge
- type EventThrottleData
- type EventTokenRevocationNotification
- type KeyManagerEvent
- type Organization
- type PolicyInfo
- type ScopeEvent
- type Subscription
- type SubscriptionEvent
- type SubscriptionPolicyEvent
Constants ¶
This section is empty.
Variables ¶
var ( // AzureRevokedTokenChannel stores the revoked token events AzureRevokedTokenChannel chan []byte // AzureNotificationChannel stores the notification events AzureNotificationChannel chan []byte // AzureStepQuotaThresholdChannel stores the step quota threshold events AzureStepQuotaThresholdChannel chan []byte // AzureStepQuotaResetChannel stores the step quota reset events AzureStepQuotaResetChannel chan []byte // AzureOrganizationPurgeChannel stores the Organization Purge events AzureOrganizationPurgeChannel chan []byte )
var ( // NotificationChannel stores the Events for notifications NotificationChannel chan amqp.Delivery // KeyManagerChannel stores the key manager eventsv KeyManagerChannel chan amqp.Delivery // RevokedTokenChannel stores the revoked token events RevokedTokenChannel chan amqp.Delivery // ThrottleDataChannel stores the throttling related events ThrottleDataChannel chan amqp.Delivery )
var EventListeningEndpoints []string
EventListeningEndpoints represents the list of endpoints
var ( // RabbitConn represents the ampq connection RabbitConn *amqp.Connection )
Functions ¶
func InitiateConsumers ¶
func InitiateConsumers(connectionString string, subscriptionMetaDataList []Subscription, reconnectInterval time.Duration)
InitiateConsumers to pass event consumption
func InitiateJMSConnection ¶
InitiateJMSConnection to pass event consumption
Types ¶
type APIEvent ¶
type APIEvent struct { APIID int `json:"apiId"` UUID string `json:"uuid"` GatewayLabels []string `json:"gatewayLabels"` APIVersion string `json:"apiVersion"` APIContext string `json:"apiContext"` APIName string `json:"apiName"` APIProvider string `json:"apiProvider"` APIStatus string `json:"apiStatus"` APIType string `json:"apiType"` Event // TODO: (VirajSalaka) Remove this when the event is fixed from APIM side Version string `json:"version"` Context string `json:"context"` Name string `json:"name"` Action string `json:"action"` }
APIEvent for struct API events
type APIPolicyEvent ¶
type APIPolicyEvent struct { PolicyInfo AddedConditionGroupIds string `json:"addedConditionGroupIds"` DeletedConditionGroupIds string `json:"deletedConditionGroupIds"` }
APIPolicyEvent for struct API policy events
type ApplicationEvent ¶
type ApplicationEvent struct { UUID string `json:"uuid"` ApplicationID int32 `json:"applicationId"` ApplicationName string `json:"applicationName"` TokenType string `json:"tokenType"` ApplicationPolicy string `json:"applicationPolicy"` Attributes interface{} `json:"attributes"` Subscriber string `json:"subscriber"` Event }
ApplicationEvent for struct application events
type ApplicationRegistrationEvent ¶
type ApplicationRegistrationEvent struct { ApplicationID int32 `json:"applicationId"` ApplicationUUID string `json:"applicationUUID"` ConsumerKey string `json:"consumerKey"` KeyType string `json:"keyType"` KeyManager string `json:"keyManager"` Event }
ApplicationRegistrationEvent for struct application registration events
type Event ¶
type Event struct { EventID string `json:"eventId"` TimeStamp int64 `json:"timeStamp"` Type string `json:"type"` TenantID int32 `json:"tenantId"` TenantDomain string `json:"tenantDomain"` }
Event for struct abstract event
type EventKeyManagerNotification ¶
type EventKeyManagerNotification struct { Event struct { PayloadData struct { EventType string `json:"event_type"` Name string `json:"name"` Action string `json:"action"` Type string `json:"type"` Enabled bool `json:"enabled"` Value string `json:"value"` TenantID string `json:"tenantId,omitempty"` TenantDomain string `json:"tenantDomain,omitempty"` } `json:"payloadData"` } `json:"event"` }
EventKeyManagerNotification for struct
type EventNotification ¶
type EventNotification struct { Event struct { PayloadData struct { EventType string `json:"eventType"` Timstamp float64 `json:"timeStamp"` Event string `json:"event"` } `json:"payloadData"` } `json:"event"` }
EventNotification for struct event notifications
type EventOrganizationPurge ¶
type EventOrganizationPurge struct { Event struct { PayloadData struct { EventType string `json:"eventType"` TimeStamp int64 `json:"timestamp"` OrganizationList []Organization `json:"organizationList"` } `json:"payloadData"` } `json:"event"` }
EventOrganizationPurge for struct
type EventThrottleData ¶
type EventThrottleData struct { Event struct { PayloadData struct { KeyTemplateValue string `json:"keyTemplateValue"` KeyTemplateState string `json:"keyTemplateState"` ID int32 `json:"id"` BlockingCondition string `json:"blockingCondition"` ConditionValue string `json:"conditionValue"` State string `json:"state"` TenantDomain string `json:"tenantDomain"` } `json:"payloadData"` } `json:"event"` }
EventThrottleData for struct throttle events
type EventTokenRevocationNotification ¶
type EventTokenRevocationNotification struct { Event struct { PayloadData struct { EventID string `json:"eventId"` RevokedToken string `json:"revokedToken"` TTL string `json:"ttl"` ExpiryTime int64 `json:"expiryTime"` Type string `json:"type"` TenantID int `json:"tenantId"` } `json:"payloadData"` } `json:"event"` }
EventTokenRevocationNotification for struct
type KeyManagerEvent ¶
type KeyManagerEvent struct { ServerURL string `json:"ServerURL"` ValidationEnable bool `json:"validation_enable"` ClaimMappings []Claim `json:"Claim"` GrantTypes []string `json:"grant_types"` EncryptPersistedTokens bool `json:"OAuthConfigurations.EncryptPersistedTokens"` EnableOauthAppCreation bool `json:"enable_oauth_app_creation"` ValidityPeriod string `json:"VALIDITY_PERIOD"` CertificateValue string `json:"certificate_value"` EnableTokenGeneration bool `json:"enable_token_generation"` Issuer string `json:"issuer"` EnableMapOauthConsumerApps bool `json:"enable_map_oauth_consumer_apps"` EnableTokenHash bool `json:"enable_token_hash"` SelfValidateJwt bool `json:"self_validate_jwt"` RevokeEndpoint string `json:"revoke_endpoint"` EnableTokenEncryption bool `json:"enable_token_encryption"` RevokeURL string `json:"RevokeURL"` TokenURL string `json:"TokenURL"` TokenFormatString string `json:"token_format_string"` CertificateType string `json:"certificate_type"` TokenEndpoint string `json:"token_endpoint"` }
KeyManagerEvent for struct
type Organization ¶
type Organization struct { ID string `json:"id"` UUID string `json:"uuid"` Handle string `json:"handle"` Name string `json:"name"` }
Organization for struct
type PolicyInfo ¶
type PolicyInfo struct { PolicyID int32 `json:"policyId"` PolicyName string `json:"policyName"` QuotaType string `json:"quotaType"` PolicyType string `json:"policyType"` Event }
PolicyInfo for struct policy Info events
type ScopeEvent ¶
type ScopeEvent struct { Name string `json:"name"` DisplayName string `json:"displayName"` ApplicationName string `json:"description"` Event }
ScopeEvent for struct scope events
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
Subscription stores the meta data of a specific subscription
func InitiateBrokerConnectionAndValidate ¶
func InitiateBrokerConnectionAndValidate(connectionString string, componentName string, reconnectRetryCount int, reconnectInterval time.Duration, subscriptionIdleTimeDuration string) ([]Subscription, error)
InitiateBrokerConnectionAndValidate to initiate connection and validate azure service bus constructs to further process
type SubscriptionEvent ¶
type SubscriptionEvent struct { SubscriptionID int32 `json:"subscriptionId"` SubscriptionUUID string `json:"subscriptionUUID"` APIID int32 `json:"apiId"` APIUUID string `json:"apiUUID"` ApplicationID int32 `json:"applicationId"` ApplicationUUID string `json:"applicationUUID"` PolicyID string `json:"policyId"` SubscriptionState string `json:"subscriptionState"` Event }
SubscriptionEvent for struct subscription events
type SubscriptionPolicyEvent ¶
type SubscriptionPolicyEvent struct { PolicyInfo RateLimitCount int32 `json:"rateLimitCount"` RateLimitTimeUnit string `json:"rateLimitTimeUnit"` StopOnQuotaReach bool `json:"stopOnQuotaReach"` GraphQLMaxComplexity int32 `json:"graphQLMaxComplexity"` GraphQLMaxDepth int32 `json:"graphQLMaxDepth"` }
SubscriptionPolicyEvent for struct subscriptionPolicy events