Documentation
¶
Index ¶
- Constants
- func FilterSubscriptionsForRequest(ress []rc.SubscriptionResponse, req rc.CreateSubscriptionRequest) []rc.SubscriptionResponse
- func NewCreateSubscriptionRequestPermahook(eventFilters []string, hookUrl string) rc.CreateSubscriptionRequest
- func NewCreateSubscriptionRequestPermahookBotSimple(hookUrl string) rc.CreateSubscriptionRequest
- func ParseCreateSubscriptionRequest(data []byte) (rc.CreateSubscriptionRequest, error)
- type RcHooks
- func (util *RcHooks) CheckAndFixSubscription(ctx context.Context, req rc.CreateSubscriptionRequest) (rc.SubscriptionInfo, error)
- func (util *RcHooks) CreateSubscription(ctx context.Context, req rc.CreateSubscriptionRequest) (rc.SubscriptionInfo, error)
- func (util *RcHooks) DeleteBlacklisted(ctx context.Context, matches []rc.SubscriptionResponse) ([]rc.SubscriptionResponse, error)
- func (util *RcHooks) DeleteByIdOrUrl(ctx context.Context, idOrUrlToDelete string) ([]rc.SubscriptionResponse, error)
- func (util *RcHooks) DeleteSubscription(ctx context.Context, subscriptionId string) error
- func (util *RcHooks) GetSubscriptions(ctx context.Context) (rc.RecordsCollectionResourceSubscriptionResponse, error)
- func (util *RcHooks) RecreateSubscriptionIdOrUrl(ctx context.Context, subIdOrUrl string) ([]rc.SubscriptionInfo, error)
- type RcHooksConfig
- type WebhookDefinitionThin
Constants ¶
View Source
const ( WebhookStatusBlacklisted = "Blacklisted" RingCentralApiResponseFormat = `RingCentral_API_Status_Code [%v]` ExpiresLong = 500000000 // 500M seconds = 15.85 years )
Variables ¶
This section is empty.
Functions ¶
func FilterSubscriptionsForRequest ¶ added in v0.2.0
func FilterSubscriptionsForRequest(ress []rc.SubscriptionResponse, req rc.CreateSubscriptionRequest) []rc.SubscriptionResponse
func NewCreateSubscriptionRequestPermahook ¶ added in v0.2.0
func NewCreateSubscriptionRequestPermahook(eventFilters []string, hookUrl string) rc.CreateSubscriptionRequest
func NewCreateSubscriptionRequestPermahookBotSimple ¶ added in v0.2.0
func NewCreateSubscriptionRequestPermahookBotSimple(hookUrl string) rc.CreateSubscriptionRequest
func ParseCreateSubscriptionRequest ¶ added in v0.2.0
func ParseCreateSubscriptionRequest(data []byte) (rc.CreateSubscriptionRequest, error)
Types ¶
type RcHooks ¶ added in v0.2.0
func (*RcHooks) CheckAndFixSubscription ¶ added in v0.2.0
func (util *RcHooks) CheckAndFixSubscription(ctx context.Context, req rc.CreateSubscriptionRequest) (rc.SubscriptionInfo, error)
func (*RcHooks) CreateSubscription ¶ added in v0.2.0
func (util *RcHooks) CreateSubscription(ctx context.Context, req rc.CreateSubscriptionRequest) (rc.SubscriptionInfo, error)
func (*RcHooks) DeleteBlacklisted ¶ added in v0.2.0
func (util *RcHooks) DeleteBlacklisted(ctx context.Context, matches []rc.SubscriptionResponse) ([]rc.SubscriptionResponse, error)
func (*RcHooks) DeleteByIdOrUrl ¶ added in v0.2.0
func (*RcHooks) DeleteSubscription ¶ added in v0.2.0
func (*RcHooks) GetSubscriptions ¶ added in v0.2.0
func (*RcHooks) RecreateSubscriptionIdOrUrl ¶ added in v0.2.0
type RcHooksConfig ¶ added in v0.2.0
type RcHooksConfig struct { Token string `env:"RINGCENTRAL_TOKEN"` ServerUrl string `env:"RINGCENTRAL_SERVER_URL"` WebhookDefinitionJson string `env:"RINGCENTRAL_WEBHOOK_DEFINITION_JSON"` WebhookDefinition rc.CreateSubscriptionRequest }
func NewRcHooksConfigCreds ¶ added in v0.2.0
func NewRcHooksConfigCreds(creds ringcentral.Credentials, hookDefJson string) (RcHooksConfig, error)
func NewRcHooksConfigEnv ¶ added in v0.2.0
func NewRcHooksConfigEnv(envVarTokenOrJson, envVarServerUrl, envVarHookDef string) RcHooksConfig
func (*RcHooksConfig) Client ¶ added in v0.2.0
func (rchConfig *RcHooksConfig) Client() (*http.Client, error)
func (*RcHooksConfig) ClientUtil ¶ added in v0.2.0
func (rchConfig *RcHooksConfig) ClientUtil() (ringcentral.ClientUtil, error)
func (*RcHooksConfig) Inflate ¶ added in v0.2.0
func (rchConfig *RcHooksConfig) Inflate() error
func (*RcHooksConfig) InitilizeRcHooks ¶ added in v0.2.0
func (rchConfig *RcHooksConfig) InitilizeRcHooks(ctx context.Context) (RcHooks, error)
type WebhookDefinitionThin ¶ added in v0.2.0
type WebhookDefinitionThin struct { URL string `json:"url"` EventFilters []string `json:"eventFilters"` }
func (*WebhookDefinitionThin) Full ¶ added in v0.2.0
func (thin *WebhookDefinitionThin) Full() rc.CreateSubscriptionRequest
Click to show internal directories.
Click to hide internal directories.