applications

package
v0.0.0-...-f942f97 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package applications contains components for accessing/modifying Application CRD

Index

Constants

View Source
const (
	CredentialsOAuthType          = "OAuth"
	CredentialsBasicType          = "Basic"
	CredentialsCertificateGenType = "CertificateGen"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppManager

type AppManager interface {
	Update(ctx context.Context, application *v1alpha1.Application, options v1.UpdateOptions) (*v1alpha1.Application, error)
	Get(ctx context.Context, name string, options v1.GetOptions) (*v1alpha1.Application, error)
}

AppManager contains operations for managing Application CRD

type CSRFInfo

type CSRFInfo struct {
	TokenEndpointURL string
}

type Credentials

type Credentials struct {
	Type              string
	SecretName        string
	AuthenticationUrl string
	CSRFInfo          *CSRFInfo
	Headers           *map[string][]string
	QueryParameters   *map[string][]string
}

type Service

type Service struct {
	// Mapped to id in Application CRD
	ID string
	// Mapped to identifier in Application CRD
	Identifier string
	// Mapped to displayName in Application CRD
	DisplayName string
	// Mapped to name in Application CRD
	Name string
	// Mapped to shortDescription in Application CRD
	ShortDescription string
	// Mapped to longDescription in Application CRD
	LongDescription string
	// Mapped to labels in Application CRD
	Labels map[string]string
	// Mapped to providerDisplayName in Application CRD
	ProviderDisplayName string
	// Mapped to tags in Application CRD
	Tags []string
	// Mapped to type property under entries element (type: API)
	API *ServiceAPI
	// Mapped to type property under entries element (type: Events)
	Events bool
}

Service represents a service stored in Application RE

type ServiceAPI

type ServiceAPI struct {
	GatewayURL                  string
	CentralGatewayURL           string
	AccessLabel                 string
	TargetUrl                   string
	SpecificationUrl            string
	ApiType                     string
	Credentials                 Credentials
	RequestParametersSecretName string
}

ServiceAPI stores information needed to call an API

type ServiceRepository

type ServiceRepository interface {
	Create(appName string, service Service) apperrors.AppError
	Get(appName, id string) (Service, apperrors.AppError)
	GetAll(appName string) ([]Service, apperrors.AppError)
	Update(appName string, service Service) apperrors.AppError
	Delete(appName, id string) apperrors.AppError
}

ServiceRepository contains operations for managing services stored in Application CRD

func NewServiceRepository

func NewServiceRepository(appManager AppManager) ServiceRepository

NewServiceRepository creates a new ApplicationServiceRepository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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