subscriptions

package
v2.124.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 9 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteByID added in v2.107.0

func DeleteByID(client newclient.Client, spaceID string, id string) error

DeleteByID deletes the subscription that matches the input ID.

func Get added in v2.107.0

Get returns a collection of subscriptions based on the criteria defined by its input query parameter.

Types

type EventNotificationSubscription added in v2.107.0

type EventNotificationSubscription struct {
	EmailDigestLastProcessed            *time.Time                           `json:"EmailDigestLastProcessed,omitempty"`
	EmailDigestLastProcessedEventAutoId *int64                               `json:"EmailDigestLastProcessedEventAutoId,omitempty"`
	EmailFrequencyPeriod                string                               `json:"EmailFrequencyPeriod"`
	EmailPriority                       string                               `json:"EmailPriority"`
	EmailShowDatesInTimeZoneId          string                               `json:"EmailShowDatesInTimeZoneId"`
	EmailTeams                          []string                             `json:"EmailTeams"`
	Filter                              *EventNotificationSubscriptionFilter `json:"Filter"`
	SlackChannelIds                     []string                             `json:"SlackChannelIds"`
	SlackChannelNames                   []string                             `json:"SlackChannelNames"`
	// Deprecated: SlackDigestFormat is no longer used by Octopus Server; Slack digests always send a summary. It will be removed in a future release.
	SlackDigestFormat                   string                           `json:"SlackDigestFormat"`
	SlackFrequencyPeriod                string                           `json:"SlackFrequencyPeriod"`
	TeamsDigestLastProcessed            *time.Time                       `json:"TeamsDigestLastProcessed,omitempty"`
	TeamsDigestLastProcessedEventAutoId *int64                           `json:"TeamsDigestLastProcessedEventAutoId,omitempty"`
	TeamsFrequencyPeriod                string                           `json:"TeamsFrequencyPeriod"`
	TeamsChannels                       []TeamsChannelSubscriptionTarget `json:"TeamsChannels"`
	WebhookHeaderKey                    string                           `json:"WebhookHeaderKey"`
	WebhookHeaderValue                  string                           `json:"WebhookHeaderValue"`
	WebhookLastProcessed                *time.Time                       `json:"WebhookLastProcessed,omitempty"`
	WebhookLastProcessedEventAutoId     *int64                           `json:"WebhookLastProcessedEventAutoId,omitempty"`
	WebhookTeams                        []string                         `json:"WebhookTeams"`
	WebhookTimeout                      string                           `json:"WebhookTimeout"`
	WebhookURI                          string                           `json:"WebhookURI"`
}

type EventNotificationSubscriptionFilter added in v2.107.0

type EventNotificationSubscriptionFilter struct {
	DocumentTypes   []string `json:"DocumentTypes"`
	EventAgents     []string `json:"EventAgents"`
	EventCategories []string `json:"EventCategories"`
	EventGroups     []string `json:"EventGroups"`
	Environments    []string `json:"Environments"`
	ProjectGroups   []string `json:"ProjectGroups"`
	Projects        []string `json:"Projects"`
	Tags            []string `json:"Tags"`
	Tenants         []string `json:"Tenants"`
	Users           []string `json:"Users"`
	// Needs Octopus Server 2026.4.12560 or newer. On update, nil keeps the current keys and an empty slice clears them.
	ApiKeyIds []string `json:"ApiKeyIds"`
	// Needs Octopus Server 2026.4.12560 or newer. On update, nil keeps the current setting.
	AiEventsOnly *bool `json:"AiEventsOnly,omitempty"`
}

type Subscription added in v2.107.0

type Subscription struct {
	EventNotificationSubscription *EventNotificationSubscription `json:"EventNotificationSubscription"`
	IsDisabled                    bool                           `json:"IsDisabled"`
	Name                          string                         `json:"Name" validate:"required"`
	SpaceID                       string                         `json:"SpaceId,omitempty"`
	Type                          string                         `json:"Type,omitempty"`

	resources.Resource
}

func Add added in v2.107.0

func Add(client newclient.Client, spaceID string, subscription *Subscription) (*Subscription, error)

Add creates a new subscription.

func GetAll added in v2.107.0

func GetAll(client newclient.Client, spaceID string) ([]*Subscription, error)

GetAll returns all subscriptions for the given space.

func GetByID added in v2.107.0

func GetByID(client newclient.Client, spaceID string, id string) (*Subscription, error)

GetByID returns the subscription that matches the input ID.

func NewSubscription added in v2.107.0

func NewSubscription(name string) *Subscription

func Update added in v2.107.0

func Update(client newclient.Client, spaceID string, subscription *Subscription) (*Subscription, error)

Update modifies a subscription based on the one provided as input.

func (*Subscription) GetName added in v2.107.0

func (s *Subscription) GetName() string

func (*Subscription) SetName added in v2.107.0

func (s *Subscription) SetName(name string)

func (*Subscription) Validate added in v2.107.0

func (s *Subscription) Validate() error

type SubscriptionService

type SubscriptionService struct {
	services.CanDeleteService
}

func NewSubscriptionService

func NewSubscriptionService(sling *sling.Sling, uriTemplate string) *SubscriptionService

type SubscriptionsQuery

type SubscriptionsQuery struct {
	IDs         []string `uri:"ids,omitempty" url:"ids,omitempty"`
	PartialName string   `uri:"partialName,omitempty" url:"partialName,omitempty"`
	Skip        int      `uri:"skip,omitempty" url:"skip,omitempty"`
	Spaces      []string `uri:"spaces,omitempty" url:"spaces,omitempty"`
	Take        int      `uri:"take,omitempty" url:"take,omitempty"`
}

type TeamsChannelSubscriptionTarget added in v2.119.0

type TeamsChannelSubscriptionTarget struct {
	Id         string               `json:"Id"`
	Type       string               `json:"Type,omitempty"`
	Name       string               `json:"Name"`
	WebhookUrl *core.SensitiveValue `json:"WebhookUrl,omitempty"`
	ChannelId  *string              `json:"ChannelId,omitempty"`
	TeamId     *string              `json:"TeamId,omitempty"`
	TeamName   *string              `json:"TeamName,omitempty"`
}

TeamsChannelSubscriptionTarget is one Microsoft Teams destination a subscription notifies. Type is "Webhook" (incoming webhook URL) or "AppChannel" (Octopus Teams app channel). WebhookUrl is sensitive and write-only: the API accepts a NewValue on write but never returns it; reads show HasValue only.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL