services

package
v0.0.0-...-a52e8f6 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequireNoError

func RequireNoError(t *testing.T, errorResponse *ErrorResponse)

Types

type API

type API struct {
	TargetUrl        string               `json:"targetUrl"`
	Credentials      *Credentials         `json:"credentials,omitempty"`
	Spec             json.RawMessage      `json:"spec,omitempty"`
	SpecificationUrl string               `json:"specificationUrl,omitempty"`
	ApiType          string               `json:"apiType"`
	Headers          *map[string][]string `json:"headers,omitempty"`
	QueryParameters  *map[string][]string `json:"queryParameters,omitempty"`
}

func (*API) WithBasicAuth

func (api *API) WithBasicAuth(username, password string) *API

func (*API) WithCustomHeaders

func (api *API) WithCustomHeaders(headers *map[string][]string) *API

func (*API) WithCustomQueryParams

func (api *API) WithCustomQueryParams(queryParams *map[string][]string) *API

func (*API) WithOAuth

func (api *API) WithOAuth(url, clientID, clientSecret string) *API

type AnyValue

type AnyValue interface {
}

type ApplicationConnectorClient

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

func NewApplicationConnectorClient

func NewApplicationConnectorClient(credentials connector.ApplicationCredentials, urls connector.ManagementInfoURLs, skipSSLVerify bool) *ApplicationConnectorClient

func (*ApplicationConnectorClient) GetAllAPIs

func (arc *ApplicationConnectorClient) GetAllAPIs(t *testing.T) ([]Service, *ErrorResponse)

func (*ApplicationConnectorClient) SendEvent

func (arc *ApplicationConnectorClient) SendEvent(t *testing.T, eventId string) (PublishResponse, *ErrorResponse)

type Basic

type Basic struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type CertificateGen

type CertificateGen struct {
	CommonName string `json:"commonName"`
}

type Credentials

type Credentials struct {
	Oauth           *Oauth               `json:"oauth,omitempty"`
	Basic           *Basic               `json:"basic,omitempty"`
	CertificateGen  *CertificateGen      `json:"certificateGen,omitempty"`
	Headers         *map[string][]string `json:"headers,omitempty"`
	QueryParameters *map[string][]string `json:"queryParameters,omitempty"`
}

type DocsObject

type DocsObject struct {
	Title  string `json:"title"`
	Type   string `json:"type"`
	Source string `json:"source"`
}

type Documentation

type Documentation struct {
	DisplayName string       `json:"displayName"`
	Description string       `json:"description"`
	Type        string       `json:"type"`
	Tags        []string     `json:"tags,omitempty"`
	Docs        []DocsObject `json:"docs,omitempty"`
}

type ErrorResponse

type ErrorResponse struct {
	Code  int    `json:"code"`
	Error string `json:"error"`
}

type Events

type Events struct {
	Spec json.RawMessage `json:"spec,omitempty"`
}

type Oauth

type Oauth struct {
	URL          string `json:"url"`
	ClientID     string `json:"clientId"`
	ClientSecret string `json:"clientSecret"`
}

type PostServiceResponse

type PostServiceResponse struct {
	ID string `json:"id"`
}

type PublishRequest

type PublishRequest struct {
	EventType        string   `json:"event-type,omitempty"`
	EventTypeVersion string   `json:"event-type-version,omitempty"`
	EventID          string   `json:"event-id,omitempty"`
	EventTime        string   `json:"event-time,omitempty"`
	Data             AnyValue `json:"data,omitempty"`
}

type PublishResponse

type PublishResponse struct {
	EventID string `json:"event-id,omitempty"`
	Status  string `json:"status"`
	Reason  string `json:"reason"`
}

type Service

type Service struct {
	ID               string            `json:"id"`
	Provider         string            `json:"provider"`
	Name             string            `json:"name"`
	Description      string            `json:"description"`
	ShortDescription string            `json:"shortDescription,omitempty"`
	Identifier       string            `json:"identifier,omitempty"`
	Labels           map[string]string `json:"labels,omitempty"`
}

type ServiceDetails

type ServiceDetails struct {
	Provider         string            `json:"provider"`
	Name             string            `json:"name"`
	Description      string            `json:"description"`
	ShortDescription string            `json:"shortDescription,omitempty"`
	Identifier       string            `json:"identifier,omitempty"`
	Labels           map[string]string `json:"labels,omitempty"`
	Api              *API              `json:"api,omitempty"`
	Events           *Events           `json:"events,omitempty"`
	Documentation    *Documentation    `json:"documentation,omitempty"`
}

Jump to

Keyboard shortcuts

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