handler

package
v0.0.0-...-6d13c91 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterHandler

type AdapterHandler struct {
	DirectorGqlClient Client
}

AdapterHandler is the Kyma Tenant Mapping Adapter handler which processes the received requests

func NewHandler

func NewHandler(directorGqlClient Client) *AdapterHandler

NewHandler creates an AdapterHandler

func (AdapterHandler) HandlerFunc

func (a AdapterHandler) HandlerFunc(w http.ResponseWriter, r *http.Request)

HandlerFunc is the implementation of AdapterHandler

type Client

type Client interface {
	GetApplicationBundles(ctx context.Context, appID, tenant string) ([]*graphql.BundleExt, error)
	CreateBundleInstanceAuth(ctx context.Context, tenant string, input gqlclient.BundleInstanceAuthInput) error
	UpdateBundleInstanceAuth(ctx context.Context, tenant string, input gqlclient.BundleInstanceAuthInput) error
	DeleteBundleInstanceAuth(ctx context.Context, tenant string, input gqlclient.BundleInstanceAuthInput) error
	TenantByInternalIDQuery(ctx context.Context, tenantID string) (*graphql.Tenant, error)
}

Client is responsible for making internal graphql calls to the director

type ErrorResponse

type ErrorResponse struct {
	State   string `json:"state,omitempty"`
	Message string `json:"error"`
}

ErrorResponse structure used for JSON encoded error response

type SuccessResponse

type SuccessResponse struct {
	State string `json:"state,omitempty"`
}

SuccessResponse structure used for JSON encoded success response

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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