federationmgmt

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	FederationTypeProvider = "provider"
	FederationTypeConsumer = "consumer"
)
View Source
const (
	ApiRoot      = "operatorplatform/federation/v1"
	CallbackRoot = "operatorplatform/fedcallbacks/v1"

	// callback urls, used by both MC and FRM
	PartnerStatusEventPath           = CallbackRoot + "/onPartnerStatusEvent"
	PartnerZoneResourceUpdatePath    = CallbackRoot + "/onZoneResourceUpdateEvent"
	PartnerAppOnboardStatusEventPath = CallbackRoot + "/onApplicationOnboardStatusEvent"
	PartnerInstanceStatusEventPath   = CallbackRoot + "/onInstanceStatusEvent"
	PartnerResourceStatusChangePath  = CallbackRoot + "/onResourceStatusChangeEvent"

	PathVarAppInstUniqueId = "appInstUniqueId"

	CallbackNotSupported  = "NOT_SUPPORTED"
	NoCallbackApiKey      = "NO_CALLBACK_API_KEY"
	NoCallbackApiKeyError = "no callback API key"
)

Variables

This section is empty.

Functions

func DeleteAPIKeyFromVault

func DeleteAPIKeyFromVault(ctx context.Context, vaultConfig *vault.Config, fedKey *FedKey) error

func GetFedApiKeyUser

func GetFedApiKeyUser(ownerType string, id uint) string

Get the username to associate with the api key. The username uniquely identifies the federation provider or consumer, so we can lookup the provider/consumer based on the username.

func ParseFedKeyUser

func ParseFedKeyUser(username string) (string, uint, error)

func PathCreateAppInst

func PathCreateAppInst(fedCtxId string) (string, string)

func PathGetAppInst

func PathGetAppInst(fedCtxId, appId, appInstId, zoneId string) (string, string)

func PutAPIKeyToVault

func PutAPIKeyToVault(ctx context.Context, vaultConfig *vault.Config, fedKey *FedKey, apiKey *ApiKey) error

Types

type ApiKey

type ApiKey struct {
	Id       string `json:"id"`
	Key      string `json:"key"`
	TokenUrl string `json:"tokenurl"`
}

func GetFederationAPIKey

func GetFederationAPIKey(ctx context.Context, vaultConfig *vault.Config, fedKey *FedKey) (*ApiKey, error)

type FedKey

type FedKey struct {
	OperatorId string
	Name       string
	FedType    string
	ID         uint
}

FedKey uniquely identifies a federation provider or consumer. We include the ID generated by postgres to avoid aliasing in caches if a provider is deleted and recreated with the same name.

Jump to

Keyboard shortcuts

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