Documentation
¶
Overview ¶
Package notificationsapiv1 : Operations and models for the NotificationsApiV1 service
Index ¶
- Constants
- type BulkDeleteChannelsResponse
- type ChannelResponseDefinition
- type ChannelResponseDefinitionAlertSourceItem
- type ChannelResponseDefinitionSeverity
- type CreateChannelsResponse
- type CreateNotificationChannelOptions
- func (options *CreateNotificationChannelOptions) SetAccountID(accountID string) *CreateNotificationChannelOptions
- func (options *CreateNotificationChannelOptions) SetAlertSource(alertSource []NotificationChannelAlertSourceItem) *CreateNotificationChannelOptions
- func (options *CreateNotificationChannelOptions) SetDescription(description string) *CreateNotificationChannelOptions
- func (options *CreateNotificationChannelOptions) SetEnabled(enabled bool) *CreateNotificationChannelOptions
- func (options *CreateNotificationChannelOptions) SetEndpoint(endpoint string) *CreateNotificationChannelOptions
- func (options *CreateNotificationChannelOptions) SetHeaders(param map[string]string) *CreateNotificationChannelOptions
- func (options *CreateNotificationChannelOptions) SetName(name string) *CreateNotificationChannelOptions
- func (options *CreateNotificationChannelOptions) SetSeverity(severity []string) *CreateNotificationChannelOptions
- func (options *CreateNotificationChannelOptions) SetType(typeVar string) *CreateNotificationChannelOptions
- type DeleteChannelResponse
- type DeleteNotificationChannelOptions
- func (options *DeleteNotificationChannelOptions) SetAccountID(accountID string) *DeleteNotificationChannelOptions
- func (options *DeleteNotificationChannelOptions) SetChannelID(channelID string) *DeleteNotificationChannelOptions
- func (options *DeleteNotificationChannelOptions) SetHeaders(param map[string]string) *DeleteNotificationChannelOptions
- type DeleteNotificationChannelsOptions
- func (options *DeleteNotificationChannelsOptions) SetAccountID(accountID string) *DeleteNotificationChannelsOptions
- func (options *DeleteNotificationChannelsOptions) SetBody(body []string) *DeleteNotificationChannelsOptions
- func (options *DeleteNotificationChannelsOptions) SetHeaders(param map[string]string) *DeleteNotificationChannelsOptions
- type GetChannelResponse
- type GetNotificationChannelOptions
- func (options *GetNotificationChannelOptions) SetAccountID(accountID string) *GetNotificationChannelOptions
- func (options *GetNotificationChannelOptions) SetChannelID(channelID string) *GetNotificationChannelOptions
- func (options *GetNotificationChannelOptions) SetHeaders(param map[string]string) *GetNotificationChannelOptions
- type GetPublicKeyOptions
- type ListAllChannelsOptions
- func (options *ListAllChannelsOptions) SetAccountID(accountID string) *ListAllChannelsOptions
- func (options *ListAllChannelsOptions) SetHeaders(param map[string]string) *ListAllChannelsOptions
- func (options *ListAllChannelsOptions) SetLimit(limit int64) *ListAllChannelsOptions
- func (options *ListAllChannelsOptions) SetSkip(skip int64) *ListAllChannelsOptions
- type ListChannelsResponse
- type NotificationChannelAlertSourceItem
- type NotificationsApiV1
- func (notificationsApi *NotificationsApiV1) CreateNotificationChannel(createNotificationChannelOptions *CreateNotificationChannelOptions) (result *CreateChannelsResponse, response *core.DetailedResponse, err error)
- func (notificationsApi *NotificationsApiV1) DeleteNotificationChannel(deleteNotificationChannelOptions *DeleteNotificationChannelOptions) (result *DeleteChannelResponse, response *core.DetailedResponse, err error)
- func (notificationsApi *NotificationsApiV1) DeleteNotificationChannels(deleteNotificationChannelsOptions *DeleteNotificationChannelsOptions) (result *BulkDeleteChannelsResponse, response *core.DetailedResponse, err error)
- func (notificationsApi *NotificationsApiV1) GetNotificationChannel(getNotificationChannelOptions *GetNotificationChannelOptions) (result *GetChannelResponse, response *core.DetailedResponse, err error)
- func (notificationsApi *NotificationsApiV1) GetPublicKey(getPublicKeyOptions *GetPublicKeyOptions) (result *PublicKeyResponse, response *core.DetailedResponse, err error)
- func (notificationsApi *NotificationsApiV1) ListAllChannels(listAllChannelsOptions *ListAllChannelsOptions) (result *ListChannelsResponse, response *core.DetailedResponse, err error)
- func (notificationsApi *NotificationsApiV1) NewCreateNotificationChannelOptions(accountID string, name string, typeVar string, endpoint string) *CreateNotificationChannelOptions
- func (notificationsApi *NotificationsApiV1) NewDeleteNotificationChannelOptions(accountID string, channelID string) *DeleteNotificationChannelOptions
- func (notificationsApi *NotificationsApiV1) NewDeleteNotificationChannelsOptions(accountID string, body []string) *DeleteNotificationChannelsOptions
- func (notificationsApi *NotificationsApiV1) NewGetNotificationChannelOptions(accountID string, channelID string) *GetNotificationChannelOptions
- func (notificationsApi *NotificationsApiV1) NewGetPublicKeyOptions(accountID string) *GetPublicKeyOptions
- func (notificationsApi *NotificationsApiV1) NewListAllChannelsOptions(accountID string) *ListAllChannelsOptions
- func (notificationsApi *NotificationsApiV1) NewNotificationChannelAlertSourceItem(providerName string) (model *NotificationChannelAlertSourceItem, err error)
- func (notificationsApi *NotificationsApiV1) NewTestNotificationChannelOptions(accountID string, channelID string) *TestNotificationChannelOptions
- func (notificationsApi *NotificationsApiV1) NewUpdateNotificationChannelOptions(accountID string, channelID string, name string, typeVar string, ...) *UpdateNotificationChannelOptions
- func (notificationsApi *NotificationsApiV1) SetServiceURL(url string) error
- func (notificationsApi *NotificationsApiV1) TestNotificationChannel(testNotificationChannelOptions *TestNotificationChannelOptions) (result *TestChannelResponse, response *core.DetailedResponse, err error)
- func (notificationsApi *NotificationsApiV1) UpdateNotificationChannel(updateNotificationChannelOptions *UpdateNotificationChannelOptions) (result *UpdateChannelResponse, response *core.DetailedResponse, err error)
- type NotificationsApiV1Options
- type PublicKeyResponse
- type TestChannelResponse
- type TestNotificationChannelOptions
- func (options *TestNotificationChannelOptions) SetAccountID(accountID string) *TestNotificationChannelOptions
- func (options *TestNotificationChannelOptions) SetChannelID(channelID string) *TestNotificationChannelOptions
- func (options *TestNotificationChannelOptions) SetHeaders(param map[string]string) *TestNotificationChannelOptions
- type UpdateChannelResponse
- type UpdateNotificationChannelOptions
- func (options *UpdateNotificationChannelOptions) SetAccountID(accountID string) *UpdateNotificationChannelOptions
- func (options *UpdateNotificationChannelOptions) SetAlertSource(alertSource []NotificationChannelAlertSourceItem) *UpdateNotificationChannelOptions
- func (options *UpdateNotificationChannelOptions) SetChannelID(channelID string) *UpdateNotificationChannelOptions
- func (options *UpdateNotificationChannelOptions) SetDescription(description string) *UpdateNotificationChannelOptions
- func (options *UpdateNotificationChannelOptions) SetEnabled(enabled bool) *UpdateNotificationChannelOptions
- func (options *UpdateNotificationChannelOptions) SetEndpoint(endpoint string) *UpdateNotificationChannelOptions
- func (options *UpdateNotificationChannelOptions) SetHeaders(param map[string]string) *UpdateNotificationChannelOptions
- func (options *UpdateNotificationChannelOptions) SetName(name string) *UpdateNotificationChannelOptions
- func (options *UpdateNotificationChannelOptions) SetSeverity(severity []string) *UpdateNotificationChannelOptions
- func (options *UpdateNotificationChannelOptions) SetType(typeVar string) *UpdateNotificationChannelOptions
Constants ¶
const ( CreateNotificationChannelOptions_Severity_Critical = "critical" CreateNotificationChannelOptions_Severity_High = "high" CreateNotificationChannelOptions_Severity_Low = "low" CreateNotificationChannelOptions_Severity_Medium = "medium" )
Constants associated with the CreateNotificationChannelOptions.Severity property.
const ( UpdateNotificationChannelOptions_Severity_Critical = "critical" UpdateNotificationChannelOptions_Severity_High = "high" UpdateNotificationChannelOptions_Severity_Low = "low" UpdateNotificationChannelOptions_Severity_Medium = "medium" )
Constants associated with the UpdateNotificationChannelOptions.Severity property.
const (
ChannelResponseDefinition_Type_Webhook = "Webhook"
)
Constants associated with the ChannelResponseDefinition.Type property. Type of callback URL.
const (
CreateNotificationChannelOptions_Type_Webhook = "Webhook"
)
Constants associated with the CreateNotificationChannelOptions.Type property. Type of callback URL.
const DefaultServiceName = "notifications_api"
DefaultServiceName is the default key used to find external configuration information.
const DefaultServiceURL = "https://us-south.secadvisor.cloud.ibm.com/notifications"
DefaultServiceURL is the default URL to make service requests to.
const (
UpdateNotificationChannelOptions_Type_Webhook = "Webhook"
)
Constants associated with the UpdateNotificationChannelOptions.Type property. Type of callback URL.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BulkDeleteChannelsResponse ¶
type BulkDeleteChannelsResponse struct { // response message. Message *string `json:"message,omitempty"` }
BulkDeleteChannelsResponse : Response of all deleted channels.
type ChannelResponseDefinition ¶
type ChannelResponseDefinition struct { // unique id of the channel. ChannelID *string `json:"channel_id,omitempty"` Name *string `json:"name,omitempty"` // A one sentence description of this `Channel`. Description *string `json:"description,omitempty"` // Type of callback URL. Type *string `json:"type,omitempty"` // Severity of the notification. Severity *ChannelResponseDefinitionSeverity `json:"severity,omitempty"` // The callback URL which receives the notification. Endpoint *string `json:"endpoint,omitempty"` // Channel is enabled or not. Default is disabled. Enabled *bool `json:"enabled,omitempty"` AlertSource []ChannelResponseDefinitionAlertSourceItem `json:"alert_source,omitempty"` Frequency *string `json:"frequency,omitempty"` }
ChannelResponseDefinition : Response including channels.
type ChannelResponseDefinitionAlertSourceItem ¶
type ChannelResponseDefinitionAlertSourceItem struct { // Below is a list of builtin providers that you can select in addition to the ones you obtain by calling Findings API // /v1/{account_id}/providers : // | provider_name | The source they represent | // |-----|-----| // | VA | Vulnerable image findings| // | NA | Network Insights findings| // | ATA | Activity Insights findings| // | CERT | Certificate Manager findings| // | ALL | Special provider name to represent all the providers. Its mutually exclusive with other providers meaning // either you choose ALL or you don't|. ProviderName *string `json:"provider_name,omitempty"` // An array of the finding types of the provider_name or "ALL" to specify all finding types under that provider Below // is a list of supported finding types for each built in providers // | provider_name | Supported finding types | // |-----|-----| // | VA | "image_with_vulnerabilities", "image_with_config_issues"| // | NA | "anonym_server", "malware_server", "bot_server", "miner_server", "server_suspected_ratio", // "server_response", "data_extrusion", "server_weaponized_total"| // | ATA | "appid", "cos", "iks", "iam", "kms", "cert", "account", "app"| // | CERT | "expired_cert", "expiring_1day_cert", "expiring_10day_cert", "expiring_30day_cert", "expiring_60day_cert", // "expiring_90day_cert"| // | config-advisor | "appprotection-dns_not_proxied", "appprotection-dnssec_off", "appprotection-ssl_not_strict", // "appprotection-tls_min_version", "appprotection-waf_off", "appprotection-waf_rules", "calico-deny_all_rule", // "calico-nonstandard_ports", "calico-update_cis_whitelist", "datacos-cos_managers", "datacos-not_encrypted_via_kp", // "datacos-not_in_private_network", "datacos-public_bucket_acl", "datacos-public_bucket_iam", // "datacos-public_object_acl", "iam-account_admins", "iam-all_resource_managers", "iam-all_resource_readers", // "iam-identity_admins", "iam-kms_managers", "iam-out_of_group"| // | ALL | "ALL"|. FindingTypes []string `json:"finding_types,omitempty"` }
ChannelResponseDefinitionAlertSourceItem : The alert sources. They identify the providers and their finding types which makes the findings available to Security Advisor.
type ChannelResponseDefinitionSeverity ¶
type ChannelResponseDefinitionSeverity struct { // Critical Severity. Critical *bool `json:"critical,omitempty"` // High Severity. High *bool `json:"high,omitempty"` // Medium Severity. Medium *bool `json:"medium,omitempty"` // Low Severity. Low *bool `json:"low,omitempty"` }
ChannelResponseDefinitionSeverity : Severity of the notification.
type CreateChannelsResponse ¶
type CreateChannelsResponse struct { // id of the created channel. ChannelID *string `json:"channel_id,omitempty"` // response code. StatusCode *int64 `json:"status_code,omitempty"` }
CreateChannelsResponse : Response of created channel.
type CreateNotificationChannelOptions ¶
type CreateNotificationChannelOptions struct { // Account ID. AccountID *string `json:"account_id" validate:"omitempty"` Name *string `json:"name" validate:"required"` // Type of callback URL. Type *string `json:"type" validate:"required"` // The callback URL which receives the notification. Endpoint *string `json:"endpoint" validate:"required"` // A one sentence description of this `Channel`. Description *string `json:"description,omitempty"` // Severity of the notification to be received. Severity []string `json:"severity,omitempty"` // Channel is enabled or not. Default is disabled. Enabled *bool `json:"enabled,omitempty"` AlertSource []NotificationChannelAlertSourceItem `json:"alert_source,omitempty"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
CreateNotificationChannelOptions : The CreateNotificationChannel options.
func (*CreateNotificationChannelOptions) SetAccountID ¶
func (options *CreateNotificationChannelOptions) SetAccountID(accountID string) *CreateNotificationChannelOptions
SetAccountID : Allow user to set AccountID
func (*CreateNotificationChannelOptions) SetAlertSource ¶
func (options *CreateNotificationChannelOptions) SetAlertSource(alertSource []NotificationChannelAlertSourceItem) *CreateNotificationChannelOptions
SetAlertSource : Allow user to set AlertSource
func (*CreateNotificationChannelOptions) SetDescription ¶
func (options *CreateNotificationChannelOptions) SetDescription(description string) *CreateNotificationChannelOptions
SetDescription : Allow user to set Description
func (*CreateNotificationChannelOptions) SetEnabled ¶
func (options *CreateNotificationChannelOptions) SetEnabled(enabled bool) *CreateNotificationChannelOptions
SetEnabled : Allow user to set Enabled
func (*CreateNotificationChannelOptions) SetEndpoint ¶
func (options *CreateNotificationChannelOptions) SetEndpoint(endpoint string) *CreateNotificationChannelOptions
SetEndpoint : Allow user to set Endpoint
func (*CreateNotificationChannelOptions) SetHeaders ¶
func (options *CreateNotificationChannelOptions) SetHeaders(param map[string]string) *CreateNotificationChannelOptions
SetHeaders : Allow user to set Headers
func (*CreateNotificationChannelOptions) SetName ¶
func (options *CreateNotificationChannelOptions) SetName(name string) *CreateNotificationChannelOptions
SetName : Allow user to set Name
func (*CreateNotificationChannelOptions) SetSeverity ¶
func (options *CreateNotificationChannelOptions) SetSeverity(severity []string) *CreateNotificationChannelOptions
SetSeverity : Allow user to set Severity
func (*CreateNotificationChannelOptions) SetType ¶
func (options *CreateNotificationChannelOptions) SetType(typeVar string) *CreateNotificationChannelOptions
SetType : Allow user to set Type
type DeleteChannelResponse ¶
type DeleteChannelResponse struct { // id of the created channel. ChannelID *string `json:"channel_id,omitempty"` // response message. Message *string `json:"message,omitempty"` }
DeleteChannelResponse : Response of deleted channel.
type DeleteNotificationChannelOptions ¶
type DeleteNotificationChannelOptions struct { // Account ID. AccountID *string `json:"account_id" validate:"required"` // Channel ID. ChannelID *string `json:"channel_id" validate:"required"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
DeleteNotificationChannelOptions : The DeleteNotificationChannel options.
func (*DeleteNotificationChannelOptions) SetAccountID ¶
func (options *DeleteNotificationChannelOptions) SetAccountID(accountID string) *DeleteNotificationChannelOptions
SetAccountID : Allow user to set AccountID
func (*DeleteNotificationChannelOptions) SetChannelID ¶
func (options *DeleteNotificationChannelOptions) SetChannelID(channelID string) *DeleteNotificationChannelOptions
SetChannelID : Allow user to set ChannelID
func (*DeleteNotificationChannelOptions) SetHeaders ¶
func (options *DeleteNotificationChannelOptions) SetHeaders(param map[string]string) *DeleteNotificationChannelOptions
SetHeaders : Allow user to set Headers
type DeleteNotificationChannelsOptions ¶
type DeleteNotificationChannelsOptions struct { // Account ID. AccountID *string `json:"account_id" validate:"required"` // Body for bulk delete notification channels. Body []string `json:"body" validate:"required"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
DeleteNotificationChannelsOptions : The DeleteNotificationChannels options.
func (*DeleteNotificationChannelsOptions) SetAccountID ¶
func (options *DeleteNotificationChannelsOptions) SetAccountID(accountID string) *DeleteNotificationChannelsOptions
SetAccountID : Allow user to set AccountID
func (*DeleteNotificationChannelsOptions) SetBody ¶
func (options *DeleteNotificationChannelsOptions) SetBody(body []string) *DeleteNotificationChannelsOptions
SetBody : Allow user to set Body
func (*DeleteNotificationChannelsOptions) SetHeaders ¶
func (options *DeleteNotificationChannelsOptions) SetHeaders(param map[string]string) *DeleteNotificationChannelsOptions
SetHeaders : Allow user to set Headers
type GetChannelResponse ¶
type GetChannelResponse struct { // Response including channels. Channel *ChannelResponseDefinition `json:"channel,omitempty"` }
GetChannelResponse : Response of get channel.
type GetNotificationChannelOptions ¶
type GetNotificationChannelOptions struct { // Account ID. AccountID *string `json:"account_id" validate:"required"` // Channel ID. ChannelID *string `json:"channel_id" validate:"required"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
GetNotificationChannelOptions : The GetNotificationChannel options.
func (*GetNotificationChannelOptions) SetAccountID ¶
func (options *GetNotificationChannelOptions) SetAccountID(accountID string) *GetNotificationChannelOptions
SetAccountID : Allow user to set AccountID
func (*GetNotificationChannelOptions) SetChannelID ¶
func (options *GetNotificationChannelOptions) SetChannelID(channelID string) *GetNotificationChannelOptions
SetChannelID : Allow user to set ChannelID
func (*GetNotificationChannelOptions) SetHeaders ¶
func (options *GetNotificationChannelOptions) SetHeaders(param map[string]string) *GetNotificationChannelOptions
SetHeaders : Allow user to set Headers
type GetPublicKeyOptions ¶
type GetPublicKeyOptions struct { // Account ID. AccountID *string `json:"account_id" validate:"required"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
GetPublicKeyOptions : The GetPublicKey options.
func (*GetPublicKeyOptions) SetAccountID ¶
func (options *GetPublicKeyOptions) SetAccountID(accountID string) *GetPublicKeyOptions
SetAccountID : Allow user to set AccountID
func (*GetPublicKeyOptions) SetHeaders ¶
func (options *GetPublicKeyOptions) SetHeaders(param map[string]string) *GetPublicKeyOptions
SetHeaders : Allow user to set Headers
type ListAllChannelsOptions ¶
type ListAllChannelsOptions struct { // Account ID. AccountID *string `json:"account_id" validate:"required"` // Limit the number of the returned documents to the specified number. Limit *int64 `json:"limit,omitempty"` // The offset is the index of the item from which you want to start returning data from. Default is 0. Skip *int64 `json:"skip,omitempty"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
ListAllChannelsOptions : The ListAllChannels options.
func (*ListAllChannelsOptions) SetAccountID ¶
func (options *ListAllChannelsOptions) SetAccountID(accountID string) *ListAllChannelsOptions
SetAccountID : Allow user to set AccountID
func (*ListAllChannelsOptions) SetHeaders ¶
func (options *ListAllChannelsOptions) SetHeaders(param map[string]string) *ListAllChannelsOptions
SetHeaders : Allow user to set Headers
func (*ListAllChannelsOptions) SetLimit ¶
func (options *ListAllChannelsOptions) SetLimit(limit int64) *ListAllChannelsOptions
SetLimit : Allow user to set Limit
func (*ListAllChannelsOptions) SetSkip ¶
func (options *ListAllChannelsOptions) SetSkip(skip int64) *ListAllChannelsOptions
SetSkip : Allow user to set Skip
type ListChannelsResponse ¶
type ListChannelsResponse struct {
Channels []ChannelResponseDefinition `json:"channels,omitempty"`
}
ListChannelsResponse : Response including channels.
type NotificationChannelAlertSourceItem ¶
type NotificationChannelAlertSourceItem struct { // Below is a list of builtin providers that you can select in addition to the ones you obtain by calling Findings API // /v1/{account_id}/providers : // | provider_name | The source they represent | // |-----|-----| // | VA | Vulnerable image findings| // | NA | Network Insights findings| // | ATA | Activity Insights findings| // | CERT | Certificate Manager findings| // | ALL | Special provider name to represent all the providers. Its mutually exclusive with other providers meaning // either you choose ALL or you don't|. ProviderName *string `json:"provider_name" validate:"required"` // An array of the finding types of the provider_name or "ALL" to specify all finding types under that provider Below // is a list of supported finding types for each built in providers // | provider_name | Supported finding types | // |-----|-----| // | VA | "image_with_vulnerabilities", "image_with_config_issues"| // | NA | "anonym_server", "malware_server", "bot_server", "miner_server", "server_suspected_ratio", // "server_response", "data_extrusion", "server_weaponized_total"| // | ATA | "appid", "cos", "iks", "iam", "kms", "cert", "account", "app"| // | CERT | "expired_cert", "expiring_1day_cert", "expiring_10day_cert", "expiring_30day_cert", "expiring_60day_cert", // "expiring_90day_cert"| // | config-advisor | "appprotection-dns_not_proxied", "appprotection-dnssec_off", "appprotection-ssl_not_strict", // "appprotection-tls_min_version", "appprotection-waf_off", "appprotection-waf_rules", "calico-deny_all_rule", // "calico-nonstandard_ports", "calico-update_cis_whitelist", "datacos-cos_managers", "datacos-not_encrypted_via_kp", // "datacos-not_in_private_network", "datacos-public_bucket_acl", "datacos-public_bucket_iam", // "datacos-public_object_acl", "iam-account_admins", "iam-all_resource_managers", "iam-all_resource_readers", // "iam-identity_admins", "iam-kms_managers", "iam-out_of_group"| // | ALL | "ALL"|. FindingTypes []string `json:"finding_types,omitempty"` }
NotificationChannelAlertSourceItem : The alert sources. They identify the providers and their finding types which makes the findings available to Security Advisor.
type NotificationsApiV1 ¶
type NotificationsApiV1 struct {
Service *core.BaseService
}
NotificationsApiV1 : notifications-api
Version: 1.0.0
func NewNotificationsApiV1 ¶
func NewNotificationsApiV1(options *NotificationsApiV1Options) (service *NotificationsApiV1, err error)
NewNotificationsApiV1 : constructs an instance of NotificationsApiV1 with passed in options.
func NewNotificationsApiV1UsingExternalConfig ¶
func NewNotificationsApiV1UsingExternalConfig(options *NotificationsApiV1Options) (notificationsApi *NotificationsApiV1, err error)
NewNotificationsApiV1UsingExternalConfig : constructs an instance of NotificationsApiV1 with passed in options and external configuration.
func (*NotificationsApiV1) CreateNotificationChannel ¶
func (notificationsApi *NotificationsApiV1) CreateNotificationChannel(createNotificationChannelOptions *CreateNotificationChannelOptions) (result *CreateChannelsResponse, response *core.DetailedResponse, err error)
CreateNotificationChannel : create notification channel create notification channel.
func (*NotificationsApiV1) DeleteNotificationChannel ¶
func (notificationsApi *NotificationsApiV1) DeleteNotificationChannel(deleteNotificationChannelOptions *DeleteNotificationChannelOptions) (result *DeleteChannelResponse, response *core.DetailedResponse, err error)
DeleteNotificationChannel : delete the details of a specific channel delete the details of a specific channel.
func (*NotificationsApiV1) DeleteNotificationChannels ¶
func (notificationsApi *NotificationsApiV1) DeleteNotificationChannels(deleteNotificationChannelsOptions *DeleteNotificationChannelsOptions) (result *BulkDeleteChannelsResponse, response *core.DetailedResponse, err error)
DeleteNotificationChannels : bulk delete of channels bulk delete of channels.
func (*NotificationsApiV1) GetNotificationChannel ¶
func (notificationsApi *NotificationsApiV1) GetNotificationChannel(getNotificationChannelOptions *GetNotificationChannelOptions) (result *GetChannelResponse, response *core.DetailedResponse, err error)
GetNotificationChannel : get the details of a specific channel get the details of a specific channel.
func (*NotificationsApiV1) GetPublicKey ¶
func (notificationsApi *NotificationsApiV1) GetPublicKey(getPublicKeyOptions *GetPublicKeyOptions) (result *PublicKeyResponse, response *core.DetailedResponse, err error)
GetPublicKey : fetch notifications public key fetch public key to decrypt messages in notification payload.
func (*NotificationsApiV1) ListAllChannels ¶
func (notificationsApi *NotificationsApiV1) ListAllChannels(listAllChannelsOptions *ListAllChannelsOptions) (result *ListChannelsResponse, response *core.DetailedResponse, err error)
ListAllChannels : list all channels list all channels under this account.
func (*NotificationsApiV1) NewCreateNotificationChannelOptions ¶
func (notificationsApi *NotificationsApiV1) NewCreateNotificationChannelOptions(accountID string, name string, typeVar string, endpoint string) *CreateNotificationChannelOptions
NewCreateNotificationChannelOptions : Instantiate CreateNotificationChannelOptions
func (*NotificationsApiV1) NewDeleteNotificationChannelOptions ¶
func (notificationsApi *NotificationsApiV1) NewDeleteNotificationChannelOptions(accountID string, channelID string) *DeleteNotificationChannelOptions
NewDeleteNotificationChannelOptions : Instantiate DeleteNotificationChannelOptions
func (*NotificationsApiV1) NewDeleteNotificationChannelsOptions ¶
func (notificationsApi *NotificationsApiV1) NewDeleteNotificationChannelsOptions(accountID string, body []string) *DeleteNotificationChannelsOptions
NewDeleteNotificationChannelsOptions : Instantiate DeleteNotificationChannelsOptions
func (*NotificationsApiV1) NewGetNotificationChannelOptions ¶
func (notificationsApi *NotificationsApiV1) NewGetNotificationChannelOptions(accountID string, channelID string) *GetNotificationChannelOptions
NewGetNotificationChannelOptions : Instantiate GetNotificationChannelOptions
func (*NotificationsApiV1) NewGetPublicKeyOptions ¶
func (notificationsApi *NotificationsApiV1) NewGetPublicKeyOptions(accountID string) *GetPublicKeyOptions
NewGetPublicKeyOptions : Instantiate GetPublicKeyOptions
func (*NotificationsApiV1) NewListAllChannelsOptions ¶
func (notificationsApi *NotificationsApiV1) NewListAllChannelsOptions(accountID string) *ListAllChannelsOptions
NewListAllChannelsOptions : Instantiate ListAllChannelsOptions
func (*NotificationsApiV1) NewNotificationChannelAlertSourceItem ¶
func (notificationsApi *NotificationsApiV1) NewNotificationChannelAlertSourceItem(providerName string) (model *NotificationChannelAlertSourceItem, err error)
NewNotificationChannelAlertSourceItem : Instantiate NotificationChannelAlertSourceItem (Generic Model Constructor)
func (*NotificationsApiV1) NewTestNotificationChannelOptions ¶
func (notificationsApi *NotificationsApiV1) NewTestNotificationChannelOptions(accountID string, channelID string) *TestNotificationChannelOptions
NewTestNotificationChannelOptions : Instantiate TestNotificationChannelOptions
func (*NotificationsApiV1) NewUpdateNotificationChannelOptions ¶
func (notificationsApi *NotificationsApiV1) NewUpdateNotificationChannelOptions(accountID string, channelID string, name string, typeVar string, endpoint string) *UpdateNotificationChannelOptions
NewUpdateNotificationChannelOptions : Instantiate UpdateNotificationChannelOptions
func (*NotificationsApiV1) SetServiceURL ¶
func (notificationsApi *NotificationsApiV1) SetServiceURL(url string) error
SetServiceURL sets the service URL
func (*NotificationsApiV1) TestNotificationChannel ¶
func (notificationsApi *NotificationsApiV1) TestNotificationChannel(testNotificationChannelOptions *TestNotificationChannelOptions) (result *TestChannelResponse, response *core.DetailedResponse, err error)
TestNotificationChannel : test notification channel test a nofication channel under this account.
func (*NotificationsApiV1) UpdateNotificationChannel ¶
func (notificationsApi *NotificationsApiV1) UpdateNotificationChannel(updateNotificationChannelOptions *UpdateNotificationChannelOptions) (result *UpdateChannelResponse, response *core.DetailedResponse, err error)
UpdateNotificationChannel : update notification channel update notification channel.
type NotificationsApiV1Options ¶
type NotificationsApiV1Options struct { ServiceName string URL string Authenticator core.Authenticator }
NotificationsApiV1Options : Service options
type PublicKeyResponse ¶
type PublicKeyResponse struct {
PublicKey *string `json:"public_key" validate:"required"`
}
PublicKeyResponse : PublicKeyResponse struct
type TestChannelResponse ¶
type TestChannelResponse struct { // response status. Test *string `json:"test,omitempty"` }
TestChannelResponse : Response of deleted channel.
type TestNotificationChannelOptions ¶
type TestNotificationChannelOptions struct { // Account ID. AccountID *string `json:"account_id" validate:"required"` // Channel ID. ChannelID *string `json:"channel_id" validate:"required"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
TestNotificationChannelOptions : The TestNotificationChannel options.
func (*TestNotificationChannelOptions) SetAccountID ¶
func (options *TestNotificationChannelOptions) SetAccountID(accountID string) *TestNotificationChannelOptions
SetAccountID : Allow user to set AccountID
func (*TestNotificationChannelOptions) SetChannelID ¶
func (options *TestNotificationChannelOptions) SetChannelID(channelID string) *TestNotificationChannelOptions
SetChannelID : Allow user to set ChannelID
func (*TestNotificationChannelOptions) SetHeaders ¶
func (options *TestNotificationChannelOptions) SetHeaders(param map[string]string) *TestNotificationChannelOptions
SetHeaders : Allow user to set Headers
type UpdateChannelResponse ¶
type UpdateChannelResponse struct { // id of the updated channel. ChannelID *string `json:"channel_id,omitempty"` // response code. StatusCode *int64 `json:"status_code,omitempty"` }
UpdateChannelResponse : Response of updated channel.
type UpdateNotificationChannelOptions ¶
type UpdateNotificationChannelOptions struct { // Account ID. AccountID *string `json:"account_id" validate:"required"` // Channel ID. ChannelID *string `json:"channel_id" validate:"required"` Name *string `json:"name" validate:"required"` // Type of callback URL. Type *string `json:"type" validate:"required"` // The callback URL which receives the notification. Endpoint *string `json:"endpoint" validate:"required"` // A one sentence description of this `Channel`. Description *string `json:"description,omitempty"` // Severity of the notification to be received. Severity []string `json:"severity,omitempty"` // Channel is enabled or not. Default is disabled. Enabled *bool `json:"enabled,omitempty"` AlertSource []NotificationChannelAlertSourceItem `json:"alert_source,omitempty"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
UpdateNotificationChannelOptions : The UpdateNotificationChannel options.
func (*UpdateNotificationChannelOptions) SetAccountID ¶
func (options *UpdateNotificationChannelOptions) SetAccountID(accountID string) *UpdateNotificationChannelOptions
SetAccountID : Allow user to set AccountID
func (*UpdateNotificationChannelOptions) SetAlertSource ¶
func (options *UpdateNotificationChannelOptions) SetAlertSource(alertSource []NotificationChannelAlertSourceItem) *UpdateNotificationChannelOptions
SetAlertSource : Allow user to set AlertSource
func (*UpdateNotificationChannelOptions) SetChannelID ¶
func (options *UpdateNotificationChannelOptions) SetChannelID(channelID string) *UpdateNotificationChannelOptions
SetChannelID : Allow user to set ChannelID
func (*UpdateNotificationChannelOptions) SetDescription ¶
func (options *UpdateNotificationChannelOptions) SetDescription(description string) *UpdateNotificationChannelOptions
SetDescription : Allow user to set Description
func (*UpdateNotificationChannelOptions) SetEnabled ¶
func (options *UpdateNotificationChannelOptions) SetEnabled(enabled bool) *UpdateNotificationChannelOptions
SetEnabled : Allow user to set Enabled
func (*UpdateNotificationChannelOptions) SetEndpoint ¶
func (options *UpdateNotificationChannelOptions) SetEndpoint(endpoint string) *UpdateNotificationChannelOptions
SetEndpoint : Allow user to set Endpoint
func (*UpdateNotificationChannelOptions) SetHeaders ¶
func (options *UpdateNotificationChannelOptions) SetHeaders(param map[string]string) *UpdateNotificationChannelOptions
SetHeaders : Allow user to set Headers
func (*UpdateNotificationChannelOptions) SetName ¶
func (options *UpdateNotificationChannelOptions) SetName(name string) *UpdateNotificationChannelOptions
SetName : Allow user to set Name
func (*UpdateNotificationChannelOptions) SetSeverity ¶
func (options *UpdateNotificationChannelOptions) SetSeverity(severity []string) *UpdateNotificationChannelOptions
SetSeverity : Allow user to set Severity
func (*UpdateNotificationChannelOptions) SetType ¶
func (options *UpdateNotificationChannelOptions) SetType(typeVar string) *UpdateNotificationChannelOptions
SetType : Allow user to set Type