client

package
v0.0.0-...-4804ac2 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: Apache-2.0 Imports: 16 Imported by: 3

Documentation

Index

Constants

View Source
const DummyKindID = "service-alerts"

Variables

This section is empty.

Functions

This section is empty.

Types

type CFApiRequest

type CFApiRequest struct {
	Path   string
	Filter string
}

type CFInfoResponse

type CFInfoResponse struct {
	UAAUrl string `json:"token_endpoint"`
}

type CFMetadata

type CFMetadata struct {
	GUID string `json:"guid"`
}

type CFResource

type CFResource struct {
	Metadata CFMetadata `json:"metadata"`
}

type CFResourceNotFound

type CFResourceNotFound struct {
	// contains filtered or unexported fields
}

type CFResources

type CFResources []CFResource

type CFResourcesResponse

type CFResourcesResponse struct {
	TotalResults int         `json:"total_results"`
	Resources    CFResources `json:"resources"`
}

type CloudController

type CloudController struct {
	URL      string `yaml:"url"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
}

type Config

type Config struct {
	CloudController      CloudController `yaml:"cloud_controller"`
	Notifications        Notifications   `yaml:"notifications"`
	GlobalTimeoutSeconds int             `yaml:"timeout_seconds"`
	SkipSSLValidation    *bool           `yaml:"skip_ssl_validation"`
}

type HTTPRequestError

type HTTPRequestError struct {
	// contains filtered or unexported fields
}

func (HTTPRequestError) ErrorMessageForUser

func (n HTTPRequestError) ErrorMessageForUser() string

type Notifications

type Notifications struct {
	ServiceURL   string `yaml:"service_url"`
	CFOrg        string `yaml:"cf_org"`
	CFSpace      string `yaml:"cf_space"`
	ReplyTo      string `yaml:"reply_to"`
	ClientID     string `yaml:"client_id"`
	ClientSecret string `yaml:"client_secret"`
}

type RetryHTTPClient

type RetryHTTPClient struct {
	// contains filtered or unexported fields
}

func NewRetryHTTPClient

func NewRetryHTTPClient(config Config, logger *log.Logger) *RetryHTTPClient

type ServiceAlertsClient

type ServiceAlertsClient struct {
	// contains filtered or unexported fields
}

func New

func New(config Config, logger *log.Logger) *ServiceAlertsClient

func (*ServiceAlertsClient) SendServiceAlert

func (c *ServiceAlertsClient) SendServiceAlert(product, subject, serviceInstanceID, content string) error

type SpaceNotificationRequest

type SpaceNotificationRequest struct {
	KindID  string `json:"kind_id"`
	Subject string `json:"subject"`
	Text    string `json:"text"`
	ReplyTo string `json:"reply_to,omitempty"`
}

type UAATokenResponse

type UAATokenResponse struct {
	Token string `json:"access_token"`
}

Jump to

Keyboard shortcuts

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