notificationsv1

package
Version: v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package notificationsv1 : Operations and models for the NotificationsV1 service

Index

Constants

View Source
const (
	ChannelAlertSourceItemProviderNameAllConst  = "ALL"
	ChannelAlertSourceItemProviderNameAtaConst  = "ATA"
	ChannelAlertSourceItemProviderNameCertConst = "CERT"
	ChannelAlertSourceItemProviderNameNaConst   = "NA"
	ChannelAlertSourceItemProviderNameVaConst   = "VA"
)

Constants associated with the ChannelAlertSourceItem.ProviderName property. The providers that you can receive alerts for. To view your available providers, you can call the /v1/{account_id}/providers endpoint of the Findings API.

View Source
const (
	CreateNotificationChannelOptionsSeverityCriticalConst = "critical"
	CreateNotificationChannelOptionsSeverityHighConst     = "high"
	CreateNotificationChannelOptionsSeverityLowConst      = "low"
	CreateNotificationChannelOptionsSeverityMediumConst   = "medium"
)

Constants associated with the CreateNotificationChannelOptions.Severity property.

View Source
const (
	UpdateNotificationChannelOptionsSeverityCriticalConst = "critical"
	UpdateNotificationChannelOptionsSeverityHighConst     = "high"
	UpdateNotificationChannelOptionsSeverityLowConst      = "low"
	UpdateNotificationChannelOptionsSeverityMediumConst   = "medium"
)

Constants associated with the UpdateNotificationChannelOptions.Severity property.

View Source
const (
	ChannelTypeWebhookConst = "Webhook"
)

Constants associated with the Channel.Type property. Type of callback URL.

View Source
const (
	CreateNotificationChannelOptionsTypeWebhookConst = "Webhook"
)

Constants associated with the CreateNotificationChannelOptions.Type property. Type of callback URL.

View Source
const DefaultServiceName = "notifications"

DefaultServiceName is the default key used to find external configuration information.

View Source
const DefaultServiceURL = "https://us-south.secadvisor.cloud.ibm.com/notifications"

DefaultServiceURL is the default URL to make service requests to.

View Source
const (
	UpdateNotificationChannelOptionsTypeWebhookConst = "Webhook"
)

Constants associated with the UpdateNotificationChannelOptions.Type property. Type of callback URL.

Variables

This section is empty.

Functions

func GetServiceURLForRegion

func GetServiceURLForRegion(region string) (string, error)

GetServiceURLForRegion returns the service URL to be used for the specified region

func UnmarshalChannel

func UnmarshalChannel(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalChannel unmarshals an instance of Channel from the specified map of raw messages.

func UnmarshalChannelAlertSourceItem

func UnmarshalChannelAlertSourceItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalChannelAlertSourceItem unmarshals an instance of ChannelAlertSourceItem from the specified map of raw messages.

func UnmarshalChannelDelete

func UnmarshalChannelDelete(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalChannelDelete unmarshals an instance of ChannelDelete from the specified map of raw messages.

func UnmarshalChannelGet

func UnmarshalChannelGet(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalChannelGet unmarshals an instance of ChannelGet from the specified map of raw messages.

func UnmarshalChannelInfo

func UnmarshalChannelInfo(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalChannelInfo unmarshals an instance of ChannelInfo from the specified map of raw messages.

func UnmarshalChannelSeverity

func UnmarshalChannelSeverity(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalChannelSeverity unmarshals an instance of ChannelSeverity from the specified map of raw messages.

func UnmarshalChannelsDelete

func UnmarshalChannelsDelete(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalChannelsDelete unmarshals an instance of ChannelsDelete from the specified map of raw messages.

func UnmarshalChannelsList

func UnmarshalChannelsList(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalChannelsList unmarshals an instance of ChannelsList from the specified map of raw messages.

func UnmarshalNotificationChannelAlertSourceItem

func UnmarshalNotificationChannelAlertSourceItem(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalNotificationChannelAlertSourceItem unmarshals an instance of NotificationChannelAlertSourceItem from the specified map of raw messages.

func UnmarshalPublicKeyGet

func UnmarshalPublicKeyGet(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalPublicKeyGet unmarshals an instance of PublicKeyGet from the specified map of raw messages.

func UnmarshalTestChannel

func UnmarshalTestChannel(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTestChannel unmarshals an instance of TestChannel from the specified map of raw messages.

Types

type Channel

type Channel struct {
	// A unique ID for the channel.
	ChannelID *string `json:"channel_id,omitempty"`

	// The name of the notification channel in the form "v1/{account_id}/notifications/channelName".
	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"`

	// The severity of the notification.
	Severity *ChannelSeverity `json:"severity,omitempty"`

	// The callback URL which receives the notification.
	Endpoint *string `json:"endpoint,omitempty"`

	// Whether the channel is enabled. The default is disabled.
	Enabled *bool `json:"enabled,omitempty"`

	AlertSource []ChannelAlertSourceItem `json:"alert_source,omitempty"`

	Frequency *string `json:"frequency,omitempty"`
}

Channel : Response including channels.

type ChannelAlertSourceItem

type ChannelAlertSourceItem struct {
	// The providers that you can receive alerts for. To view your available providers, you can call the
	// /v1/{account_id}/providers endpoint of the Findings API.
	ProviderName *string `json:"provider_name,omitempty"`

	// The types of findings for each provider that you want to receive alerts for. Options are dependent upon the provider
	// that you select. Depending on that selection, some available options include `image_with_vulnerabilities`,
	// `anonym_server`, `server_suspected_ratio`, `appid`, `cos`, `expired_cert`, and `expiring_1day_cert`For a full list
	// of available finding types, see [the docs](/docs/).
	FindingTypes []interface{} `json:"finding_types,omitempty"`
}

ChannelAlertSourceItem : The providers that act as alert sources and the potential findings that can be flagged as alerts.

type ChannelDelete

type ChannelDelete struct {
	// The ID of the deleted channel.
	ChannelID *string `json:"channel_id,omitempty"`

	// response message.
	Message *string `json:"message,omitempty"`
}

ChannelDelete : The returned response when a channel is deleted.

type ChannelGet

type ChannelGet struct {
	// get channel.
	Channel *Channel `json:"channel,omitempty"`
}

ChannelGet : The returned response when get channel is run.

type ChannelInfo

type ChannelInfo struct {
	// The ID of the created channel.
	ChannelID *string `json:"channel_id,omitempty"`

	// response code.
	StatusCode *int64 `json:"status_code,omitempty"`
}

ChannelInfo : The returned response when a channel is created or updated.

type ChannelSeverity

type ChannelSeverity 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"`
}

ChannelSeverity : The severity of the notification.

type ChannelsDelete

type ChannelsDelete struct {
	// response message.
	Message *string `json:"message,omitempty"`
}

ChannelsDelete : The returned response when more than one channel is deleted.

type ChannelsList

type ChannelsList struct {
	// List of channels.
	Channels []Channel `json:"channels,omitempty"`
}

ChannelsList : Available channels in your account are listed.

type CreateNotificationChannelOptions

type CreateNotificationChannelOptions struct {
	// Account ID.
	AccountID *string `validate:"required,ne="`

	// The name of the notification channel in the form "v1/{account_id}/notifications/channelName".
	Name *string `validate:"required"`

	// Type of callback URL.
	Type *string `validate:"required"`

	// The callback URL which receives the notification.
	Endpoint *string `validate:"required"`

	// A one sentence description of this `Channel`.
	Description *string

	// Severity of the notification to be received.
	Severity []string

	// Channel is enabled or not. Default is disabled.
	Enabled *bool

	AlertSource []NotificationChannelAlertSourceItem

	// The transaction id for the request in uuid v4 format.
	TransactionID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreateNotificationChannelOptions : The CreateNotificationChannel options.

func (*CreateNotificationChannelOptions) SetAccountID added in v0.0.9

SetAccountID : Allow user to set AccountID

func (*CreateNotificationChannelOptions) SetAlertSource

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

SetEnabled : Allow user to set Enabled

func (*CreateNotificationChannelOptions) SetEndpoint

SetEndpoint : Allow user to set Endpoint

func (*CreateNotificationChannelOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*CreateNotificationChannelOptions) SetName

SetName : Allow user to set Name

func (*CreateNotificationChannelOptions) SetSeverity

SetSeverity : Allow user to set Severity

func (*CreateNotificationChannelOptions) SetTransactionID

func (_options *CreateNotificationChannelOptions) SetTransactionID(transactionID string) *CreateNotificationChannelOptions

SetTransactionID : Allow user to set TransactionID

func (*CreateNotificationChannelOptions) SetType

SetType : Allow user to set Type

type DeleteNotificationChannelOptions

type DeleteNotificationChannelOptions struct {
	// Account ID.
	AccountID *string `validate:"required,ne="`

	// Channel ID.
	ChannelID *string `validate:"required,ne="`

	// The transaction id for the request in uuid v4 format.
	TransactionID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteNotificationChannelOptions : The DeleteNotificationChannel options.

func (*DeleteNotificationChannelOptions) SetAccountID added in v0.0.9

SetAccountID : Allow user to set AccountID

func (*DeleteNotificationChannelOptions) SetChannelID

SetChannelID : Allow user to set ChannelID

func (*DeleteNotificationChannelOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*DeleteNotificationChannelOptions) SetTransactionID

func (_options *DeleteNotificationChannelOptions) SetTransactionID(transactionID string) *DeleteNotificationChannelOptions

SetTransactionID : Allow user to set TransactionID

type DeleteNotificationChannelsOptions

type DeleteNotificationChannelsOptions struct {
	// Account ID.
	AccountID *string `validate:"required,ne="`

	// Body for bulk delete notification channels.
	Body []string `validate:"required"`

	// The transaction id for the request in uuid v4 format.
	TransactionID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteNotificationChannelsOptions : The DeleteNotificationChannels options.

func (*DeleteNotificationChannelsOptions) SetAccountID added in v0.0.9

SetAccountID : Allow user to set AccountID

func (*DeleteNotificationChannelsOptions) SetBody

SetBody : Allow user to set Body

func (*DeleteNotificationChannelsOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*DeleteNotificationChannelsOptions) SetTransactionID

func (_options *DeleteNotificationChannelsOptions) SetTransactionID(transactionID string) *DeleteNotificationChannelsOptions

SetTransactionID : Allow user to set TransactionID

type GetNotificationChannelOptions

type GetNotificationChannelOptions struct {
	// Account ID.
	AccountID *string `validate:"required,ne="`

	// Channel ID.
	ChannelID *string `validate:"required,ne="`

	// The transaction id for the request in uuid v4 format.
	TransactionID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetNotificationChannelOptions : The GetNotificationChannel options.

func (*GetNotificationChannelOptions) SetAccountID added in v0.0.9

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

SetHeaders : Allow user to set Headers

func (*GetNotificationChannelOptions) SetTransactionID

func (_options *GetNotificationChannelOptions) SetTransactionID(transactionID string) *GetNotificationChannelOptions

SetTransactionID : Allow user to set TransactionID

type GetPublicKeyOptions

type GetPublicKeyOptions struct {
	// Account ID.
	AccountID *string `validate:"required,ne="`

	// The transaction id for the request in uuid v4 format.
	TransactionID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetPublicKeyOptions : The GetPublicKey options.

func (*GetPublicKeyOptions) SetAccountID added in v0.0.9

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

func (*GetPublicKeyOptions) SetTransactionID

func (_options *GetPublicKeyOptions) SetTransactionID(transactionID string) *GetPublicKeyOptions

SetTransactionID : Allow user to set TransactionID

type ListAllChannelsOptions

type ListAllChannelsOptions struct {
	// Account ID.
	AccountID *string `validate:"required,ne="`

	// The transaction id for the request in uuid v4 format.
	TransactionID *string

	// Limit the number of the returned documents to the specified number.
	Limit *int64

	// The offset is the index of the item from which you want to start returning data from. Default is 0.
	Skip *int64

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListAllChannelsOptions : The ListAllChannels options.

func (*ListAllChannelsOptions) SetAccountID added in v0.0.9

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

func (*ListAllChannelsOptions) SetTransactionID

func (_options *ListAllChannelsOptions) SetTransactionID(transactionID string) *ListAllChannelsOptions

SetTransactionID : Allow user to set TransactionID

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"|
	// | 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 NotificationsV1

type NotificationsV1 struct {
	Service *core.BaseService
}

NotificationsV1 : API specification for the Notifications service.

Version: 1.0.0

func NewNotificationsV1

func NewNotificationsV1(options *NotificationsV1Options) (service *NotificationsV1, err error)

NewNotificationsV1 : constructs an instance of NotificationsV1 with passed in options.

func NewNotificationsV1UsingExternalConfig

func NewNotificationsV1UsingExternalConfig(options *NotificationsV1Options) (notifications *NotificationsV1, err error)

NewNotificationsV1UsingExternalConfig : constructs an instance of NotificationsV1 with passed in options and external configuration.

func (*NotificationsV1) Clone

func (notifications *NotificationsV1) Clone() *NotificationsV1

Clone makes a copy of "notifications" suitable for processing requests.

func (*NotificationsV1) CreateNotificationChannel

func (notifications *NotificationsV1) CreateNotificationChannel(createNotificationChannelOptions *CreateNotificationChannelOptions) (result *ChannelInfo, response *core.DetailedResponse, err error)

CreateNotificationChannel : create notification channel create notification channel.

func (*NotificationsV1) CreateNotificationChannelWithContext

func (notifications *NotificationsV1) CreateNotificationChannelWithContext(ctx context.Context, createNotificationChannelOptions *CreateNotificationChannelOptions) (result *ChannelInfo, response *core.DetailedResponse, err error)

CreateNotificationChannelWithContext is an alternate form of the CreateNotificationChannel method which supports a Context parameter

func (*NotificationsV1) DeleteNotificationChannel

func (notifications *NotificationsV1) DeleteNotificationChannel(deleteNotificationChannelOptions *DeleteNotificationChannelOptions) (result *ChannelDelete, response *core.DetailedResponse, err error)

DeleteNotificationChannel : delete the details of a specific channel delete the details of a specific channel.

func (*NotificationsV1) DeleteNotificationChannelWithContext

func (notifications *NotificationsV1) DeleteNotificationChannelWithContext(ctx context.Context, deleteNotificationChannelOptions *DeleteNotificationChannelOptions) (result *ChannelDelete, response *core.DetailedResponse, err error)

DeleteNotificationChannelWithContext is an alternate form of the DeleteNotificationChannel method which supports a Context parameter

func (*NotificationsV1) DeleteNotificationChannels

func (notifications *NotificationsV1) DeleteNotificationChannels(deleteNotificationChannelsOptions *DeleteNotificationChannelsOptions) (result *ChannelsDelete, response *core.DetailedResponse, err error)

DeleteNotificationChannels : bulk delete of channels bulk delete of channels.

func (*NotificationsV1) DeleteNotificationChannelsWithContext

func (notifications *NotificationsV1) DeleteNotificationChannelsWithContext(ctx context.Context, deleteNotificationChannelsOptions *DeleteNotificationChannelsOptions) (result *ChannelsDelete, response *core.DetailedResponse, err error)

DeleteNotificationChannelsWithContext is an alternate form of the DeleteNotificationChannels method which supports a Context parameter

func (*NotificationsV1) DisableRetries

func (notifications *NotificationsV1) DisableRetries()

DisableRetries disables automatic retries for requests invoked for this service instance.

func (*NotificationsV1) EnableRetries

func (notifications *NotificationsV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)

EnableRetries enables automatic retries for requests invoked for this service instance. If either parameter is specified as 0, then a default value is used instead.

func (*NotificationsV1) GetEnableGzipCompression

func (notifications *NotificationsV1) GetEnableGzipCompression() bool

GetEnableGzipCompression returns the service's EnableGzipCompression field

func (*NotificationsV1) GetNotificationChannel

func (notifications *NotificationsV1) GetNotificationChannel(getNotificationChannelOptions *GetNotificationChannelOptions) (result *ChannelGet, response *core.DetailedResponse, err error)

GetNotificationChannel : get the details of a specific channel get the details of a specific channel.

func (*NotificationsV1) GetNotificationChannelWithContext

func (notifications *NotificationsV1) GetNotificationChannelWithContext(ctx context.Context, getNotificationChannelOptions *GetNotificationChannelOptions) (result *ChannelGet, response *core.DetailedResponse, err error)

GetNotificationChannelWithContext is an alternate form of the GetNotificationChannel method which supports a Context parameter

func (*NotificationsV1) GetPublicKey

func (notifications *NotificationsV1) GetPublicKey(getPublicKeyOptions *GetPublicKeyOptions) (result *PublicKeyGet, response *core.DetailedResponse, err error)

GetPublicKey : fetch notifications public key fetch public key to decrypt messages in notification payload.

func (*NotificationsV1) GetPublicKeyWithContext

func (notifications *NotificationsV1) GetPublicKeyWithContext(ctx context.Context, getPublicKeyOptions *GetPublicKeyOptions) (result *PublicKeyGet, response *core.DetailedResponse, err error)

GetPublicKeyWithContext is an alternate form of the GetPublicKey method which supports a Context parameter

func (*NotificationsV1) GetServiceURL

func (notifications *NotificationsV1) GetServiceURL() string

GetServiceURL returns the service URL

func (*NotificationsV1) ListAllChannels

func (notifications *NotificationsV1) ListAllChannels(listAllChannelsOptions *ListAllChannelsOptions) (result *ChannelsList, response *core.DetailedResponse, err error)

ListAllChannels : list all channels list all channels under this account.

func (*NotificationsV1) ListAllChannelsWithContext

func (notifications *NotificationsV1) ListAllChannelsWithContext(ctx context.Context, listAllChannelsOptions *ListAllChannelsOptions) (result *ChannelsList, response *core.DetailedResponse, err error)

ListAllChannelsWithContext is an alternate form of the ListAllChannels method which supports a Context parameter

func (*NotificationsV1) NewCreateNotificationChannelOptions

func (*NotificationsV1) NewCreateNotificationChannelOptions(accountID string, name string, typeVar string, endpoint string) *CreateNotificationChannelOptions

NewCreateNotificationChannelOptions : Instantiate CreateNotificationChannelOptions

func (*NotificationsV1) NewDeleteNotificationChannelOptions

func (*NotificationsV1) NewDeleteNotificationChannelOptions(accountID string, channelID string) *DeleteNotificationChannelOptions

NewDeleteNotificationChannelOptions : Instantiate DeleteNotificationChannelOptions

func (*NotificationsV1) NewDeleteNotificationChannelsOptions

func (*NotificationsV1) NewDeleteNotificationChannelsOptions(accountID string, body []string) *DeleteNotificationChannelsOptions

NewDeleteNotificationChannelsOptions : Instantiate DeleteNotificationChannelsOptions

func (*NotificationsV1) NewGetNotificationChannelOptions

func (*NotificationsV1) NewGetNotificationChannelOptions(accountID string, channelID string) *GetNotificationChannelOptions

NewGetNotificationChannelOptions : Instantiate GetNotificationChannelOptions

func (*NotificationsV1) NewGetPublicKeyOptions

func (*NotificationsV1) NewGetPublicKeyOptions(accountID string) *GetPublicKeyOptions

NewGetPublicKeyOptions : Instantiate GetPublicKeyOptions

func (*NotificationsV1) NewListAllChannelsOptions

func (*NotificationsV1) NewListAllChannelsOptions(accountID string) *ListAllChannelsOptions

NewListAllChannelsOptions : Instantiate ListAllChannelsOptions

func (*NotificationsV1) NewNotificationChannelAlertSourceItem

func (*NotificationsV1) NewNotificationChannelAlertSourceItem(providerName string) (_model *NotificationChannelAlertSourceItem, err error)

NewNotificationChannelAlertSourceItem : Instantiate NotificationChannelAlertSourceItem (Generic Model Constructor)

func (*NotificationsV1) NewTestNotificationChannelOptions

func (*NotificationsV1) NewTestNotificationChannelOptions(accountID string, channelID string) *TestNotificationChannelOptions

NewTestNotificationChannelOptions : Instantiate TestNotificationChannelOptions

func (*NotificationsV1) NewUpdateNotificationChannelOptions

func (*NotificationsV1) NewUpdateNotificationChannelOptions(accountID string, channelID string, name string, typeVar string, endpoint string) *UpdateNotificationChannelOptions

NewUpdateNotificationChannelOptions : Instantiate UpdateNotificationChannelOptions

func (*NotificationsV1) SetDefaultHeaders

func (notifications *NotificationsV1) SetDefaultHeaders(headers http.Header)

SetDefaultHeaders sets HTTP headers to be sent in every request

func (*NotificationsV1) SetEnableGzipCompression

func (notifications *NotificationsV1) SetEnableGzipCompression(enableGzip bool)

SetEnableGzipCompression sets the service's EnableGzipCompression field

func (*NotificationsV1) SetServiceURL

func (notifications *NotificationsV1) SetServiceURL(url string) error

SetServiceURL sets the service URL

func (*NotificationsV1) TestNotificationChannel

func (notifications *NotificationsV1) TestNotificationChannel(testNotificationChannelOptions *TestNotificationChannelOptions) (result *TestChannel, response *core.DetailedResponse, err error)

TestNotificationChannel : test notification channel test a nofication channel under this account.

func (*NotificationsV1) TestNotificationChannelWithContext

func (notifications *NotificationsV1) TestNotificationChannelWithContext(ctx context.Context, testNotificationChannelOptions *TestNotificationChannelOptions) (result *TestChannel, response *core.DetailedResponse, err error)

TestNotificationChannelWithContext is an alternate form of the TestNotificationChannel method which supports a Context parameter

func (*NotificationsV1) UpdateNotificationChannel

func (notifications *NotificationsV1) UpdateNotificationChannel(updateNotificationChannelOptions *UpdateNotificationChannelOptions) (result *ChannelInfo, response *core.DetailedResponse, err error)

UpdateNotificationChannel : update notification channel update notification channel.

func (*NotificationsV1) UpdateNotificationChannelWithContext

func (notifications *NotificationsV1) UpdateNotificationChannelWithContext(ctx context.Context, updateNotificationChannelOptions *UpdateNotificationChannelOptions) (result *ChannelInfo, response *core.DetailedResponse, err error)

UpdateNotificationChannelWithContext is an alternate form of the UpdateNotificationChannel method which supports a Context parameter

type NotificationsV1Options

type NotificationsV1Options struct {
	ServiceName   string
	URL           string
	Authenticator core.Authenticator
}

NotificationsV1Options : Service options

type PublicKeyGet

type PublicKeyGet struct {
	PublicKey *string `json:"public_key" validate:"required"`
}

PublicKeyGet : PublicKeyGet struct

type TestChannel

type TestChannel struct {
	// response status.
	Test *string `json:"test,omitempty"`
}

TestChannel : The returned response when a webhook is tested for a channel.

type TestNotificationChannelOptions

type TestNotificationChannelOptions struct {
	// Account ID.
	AccountID *string `validate:"required,ne="`

	// Channel ID.
	ChannelID *string `validate:"required,ne="`

	// The transaction id for the request in uuid v4 format.
	TransactionID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

TestNotificationChannelOptions : The TestNotificationChannel options.

func (*TestNotificationChannelOptions) SetAccountID added in v0.0.9

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

SetHeaders : Allow user to set Headers

func (*TestNotificationChannelOptions) SetTransactionID

func (_options *TestNotificationChannelOptions) SetTransactionID(transactionID string) *TestNotificationChannelOptions

SetTransactionID : Allow user to set TransactionID

type UpdateNotificationChannelOptions

type UpdateNotificationChannelOptions struct {
	// Account ID.
	AccountID *string `validate:"required,ne="`

	// Channel ID.
	ChannelID *string `validate:"required,ne="`

	// The name of the notification channel in the form "v1/{account_id}/notifications/channelName".
	Name *string `validate:"required"`

	// Type of callback URL.
	Type *string `validate:"required"`

	// The callback URL which receives the notification.
	Endpoint *string `validate:"required"`

	// A one sentence description of this `Channel`.
	Description *string

	// Severity of the notification to be received.
	Severity []string

	// Channel is enabled or not. Default is disabled.
	Enabled *bool

	AlertSource []NotificationChannelAlertSourceItem

	// The transaction id for the request in uuid v4 format.
	TransactionID *string

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdateNotificationChannelOptions : The UpdateNotificationChannel options.

func (*UpdateNotificationChannelOptions) SetAccountID added in v0.0.9

SetAccountID : Allow user to set AccountID

func (*UpdateNotificationChannelOptions) SetAlertSource

SetAlertSource : Allow user to set AlertSource

func (*UpdateNotificationChannelOptions) SetChannelID

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

SetEnabled : Allow user to set Enabled

func (*UpdateNotificationChannelOptions) SetEndpoint

SetEndpoint : Allow user to set Endpoint

func (*UpdateNotificationChannelOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*UpdateNotificationChannelOptions) SetName

SetName : Allow user to set Name

func (*UpdateNotificationChannelOptions) SetSeverity

SetSeverity : Allow user to set Severity

func (*UpdateNotificationChannelOptions) SetTransactionID

func (_options *UpdateNotificationChannelOptions) SetTransactionID(transactionID string) *UpdateNotificationChannelOptions

SetTransactionID : Allow user to set TransactionID

func (*UpdateNotificationChannelOptions) SetType

SetType : Allow user to set Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL