Documentation ¶
Index ¶
- Constants
- type Builder
- type Bundle
- type BundleBuilder
- type CancelEventRequest
- type Client
- type ClientConfig
- type Config
- type CreateEventRequest
- type FakeClient
- type MaintenanceEvent
- type NotificationBundle
- type NotificationClient
- type NotificationParams
- type NotificationTenant
- type Request
- type Tenants
- type UpdateEventRequest
Constants ¶
View Source
const ( PathCreateEvent string = "/createMaintenanceEvent" PathUpdateEvent string = "/updateMaintenanceEvent" PathCancelEvent string = "/cancelMaintenanceEvent" KubernetesMaintenanceNumber string = "0" KymaMaintenanceNumber string = "1" UnderMaintenanceEventState string = "1" FinishedMaintenanceState string = "2" CancelledMaintenanceState string = "3" )
View Source
const ( FakeOrchestrationID = "ASKHGK-SAKJHTJ-ALKJSHT-HUZIUOP" FakeInstanceID = "WEAJKG-INSTANCE-1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundleBuilder ¶
type BundleBuilder interface {
NewBundle(identifier string, notificationParams NotificationParams) (Bundle, error)
}
func NewBundleBuilder ¶
func NewBundleBuilder(notificationClient NotificationClient, config Config) BundleBuilder
type CancelEventRequest ¶
type CancelEventRequest struct {
OrchestrationID string `json:"orchestrationId"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CancelEvent ¶
func (c *Client) CancelEvent(payload CancelEventRequest) error
func (*Client) CreateEvent ¶
func (c *Client) CreateEvent(payload CreateEventRequest) error
func (*Client) UpdateEvent ¶
func (c *Client) UpdateEvent(payload UpdateEventRequest) error
type ClientConfig ¶
type ClientConfig struct {
URL string
}
type CreateEventRequest ¶
type CreateEventRequest struct { OrchestrationID string `json:"orchestrationId"` EventType string `json:"eventType"` Tenants []NotificationTenant `json:"tenants"` }
type FakeClient ¶
type FakeClient struct {
// contains filtered or unexported fields
}
func NewFakeClient ¶
func NewFakeClient() *FakeClient
func (*FakeClient) CancelEvent ¶
func (f *FakeClient) CancelEvent(request CancelEventRequest) error
func (*FakeClient) CreateEvent ¶
func (f *FakeClient) CreateEvent(request CreateEventRequest) error
func (*FakeClient) GetMaintenanceEvent ¶
func (f *FakeClient) GetMaintenanceEvent(id string) (*MaintenanceEvent, error)
func (*FakeClient) UpdateEvent ¶
func (f *FakeClient) UpdateEvent(request UpdateEventRequest) error
type MaintenanceEvent ¶
type NotificationBundle ¶
type NotificationBundle struct {
// contains filtered or unexported fields
}
func NewNotificationBundle ¶
func NewNotificationBundle(bundleIdentifier string, notificationParams NotificationParams, c NotificationClient, cfg Config) *NotificationBundle
func (*NotificationBundle) CancelNotificationEvent ¶
func (b *NotificationBundle) CancelNotificationEvent() error
func (*NotificationBundle) CreateNotificationEvent ¶
func (b *NotificationBundle) CreateNotificationEvent() error
func (*NotificationBundle) UpdateNotificationEvent ¶
func (b *NotificationBundle) UpdateNotificationEvent() error
type NotificationClient ¶
type NotificationClient interface { CreateEvent(CreateEventRequest) error UpdateEvent(UpdateEventRequest) error CancelEvent(CancelEventRequest) error }
type NotificationParams ¶
type NotificationParams struct { OrchestrationID string `json:"orchestrationId"` EventType string `json:"eventType"` Tenants []NotificationTenant `json:"tenants"` }
type NotificationTenant ¶
type UpdateEventRequest ¶
type UpdateEventRequest struct { OrchestrationID string `json:"orchestrationId"` Tenants []NotificationTenant `json:"tenants"` }
Click to show internal directories.
Click to hide internal directories.