assertions

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: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SpecAPIType          = "API"
	SpecEventsType       = "Events"
	CredentialsOAuthType = "OAuth"
	CredentialsBasicType = "Basic"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AnyValue

type AnyValue interface{}

type EventAPIAccessChecker

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

func NewEventAPIAccessChecker

func NewEventAPIAccessChecker(eventsURL string, directorClient *compass.Client, skipTLSVerify bool) *EventAPIAccessChecker

func (*EventAPIAccessChecker) AssertEventAPIAccess

func (c *EventAPIAccessChecker) AssertEventAPIAccess(t *testing.T, application compass.Application, certificate tls.Certificate)

func (*EventAPIAccessChecker) SendEvent

func (c *EventAPIAccessChecker) SendEvent(t *testing.T, application compass.Application, certificate tls.Certificate) (*http.Response, error)

type K8sResourceChecker

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

func NewK8sResourceChecker

func NewK8sResourceChecker(serviceClient v1.ServiceInterface, secretClient v1.SecretInterface, appClient v1alpha1.ApplicationInterface, nameResolver *applications.NameResolver,
	istioClient istioclient.Interface, clusterAssetGroupClient dynamic.ResourceInterface, integrationNamespace string) *K8sResourceChecker

func (*K8sResourceChecker) AssertAPIResources

func (c *K8sResourceChecker) AssertAPIResources(t *testing.T, applicationName string, compassAPIs ...*graphql.APIDefinition)

func (*K8sResourceChecker) AssertAPIResourcesDeleted

func (c *K8sResourceChecker) AssertAPIResourcesDeleted(t *testing.T, applicationName, apiId string)

func (*K8sResourceChecker) AssertAppResourcesDeleted

func (c *K8sResourceChecker) AssertAppResourcesDeleted(t *testing.T, applicationName string)

func (*K8sResourceChecker) AssertEventAPIResources

func (c *K8sResourceChecker) AssertEventAPIResources(t *testing.T, applicationName string, compassEventAPIs ...*graphql.EventDefinition)

func (*K8sResourceChecker) AssertResourcesForApp

func (c *K8sResourceChecker) AssertResourcesForApp(t *testing.T, application compass.Application)

type Labels

type Labels map[string]string

type ProxyAPIAccessChecker

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

func NewAPIAccessChecker

func NewAPIAccessChecker(nameResolver *applications.NameResolver) *ProxyAPIAccessChecker

func (*ProxyAPIAccessChecker) AssertAPIAccess

func (c *ProxyAPIAccessChecker) AssertAPIAccess(t *testing.T, applicationName string, apis ...*graphql.APIDefinition)

func (*ProxyAPIAccessChecker) CallAccessService

func (c *ProxyAPIAccessChecker) CallAccessService(t *testing.T, applicationName, apiId, path string) *http.Response

func (*ProxyAPIAccessChecker) GetPathBasedOnAuth

func (c *ProxyAPIAccessChecker) GetPathBasedOnAuth(t *testing.T, auth *graphql.Auth) string

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 ServiceData

type ServiceData struct {
	ServiceId            string
	DisplayName          string
	ProviderDisplayName  string
	LongDescription      string
	HasAPI               bool
	TargetUrl            string
	OauthUrl             string
	GatewayUrl           string
	AccessLabel          string
	HasEvents            bool
	CSRFTokenEndpointURL string
}

Jump to

Keyboard shortcuts

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