queryhandlers

package
v0.0.0-...-e080771 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationCredentialGetHandler

type ApplicationCredentialGetHandler struct {
	OpenStack ports.OpenStack
	CredFac   credsrc.CredentialFactory
}

ApplicationCredentialGetHandler handles getting a single ApplicationCredential

func (ApplicationCredentialGetHandler) Handle

Handle ...

type ApplicationCredentialListHandler

type ApplicationCredentialListHandler struct {
	OpenStack ports.OpenStack
	CredFac   credsrc.CredentialFactory
}

ApplicationCredentialListHandler handles getting a list of ApplicationCredentials

func (ApplicationCredentialListHandler) Handle

Handle handles the app cred list operation. Since app cred exists independent of regions, the args is ignored

type AuthenticationTestHandler

type AuthenticationTestHandler struct {
	OpenStack ports.OpenStack
}

AuthenticationTestHandler handles getting a list of projects

func (AuthenticationTestHandler) Handle

Handle ...

type CatalogListHandler

type CatalogListHandler struct {
	OpenStack ports.OpenStack
	CredFac   credsrc.CredentialFactory
}

CatalogListHandler handles listing Catalog

func (CatalogListHandler) Handle

Handle ...

type CredentialListHandler

type CredentialListHandler struct {
	OpenStack                 ports.OpenStack
	CredMS                    ports.CredentialMS
	ProviderMetadataMS        ports.ProviderMetadataMS
	CredentialMetadataStorage ports.CredentialMetadataStorage
}

CredentialListHandler handles getting a list of Credentials that is suitable for a Provider(of OpenStack type). Request arguments also allows for filtering by OpenStack Project ID/Name.

func (CredentialListHandler) Handle

Handle listing credentials (credential object from credential service) for a provider.

Note, this performs an active search with list of openstack credentials from credential service, not just a simple lookup of the credential metadata we cached in storage. If there are discrepancy between the 2 list (from cred svc & from cred metadata storage), we inspect the credentials that are different; and then we refresh the credential metadata storage with the difference.

Therefore, this is not a simple read-only operation, we could update credential metadata storage.

type FlavorGetHandler

type FlavorGetHandler struct {
	OpenStack ports.OpenStack
	CredFac   credsrc.CredentialFactory
}

FlavorGetHandler handles getting a single flavor

func (FlavorGetHandler) Handle

Handle ...

type FlavorListHandler

type FlavorListHandler struct {
	OpenStack ports.OpenStack
	CredFac   credsrc.CredentialFactory
}

FlavorListHandler handles getting a list of flavors

func (FlavorListHandler) Handle

Handle ...

type Handler

type Handler interface {
	Handle(ctx context.Context, request providers.ProviderRequest) Reply
}

Handler is query handler

type ImageGetHandler

type ImageGetHandler struct {
	OpenStack ports.OpenStack
	CredFac   credsrc.CredentialFactory
}

ImageGetHandler handles getting a single image

func (ImageGetHandler) Handle

Handle ...

type ImageListHandler

type ImageListHandler struct {
	OpenStack ports.OpenStack
	CredFac   credsrc.CredentialFactory
}

ImageListHandler handles getting a list of images

func (ImageListHandler) Handle

Handle ...

type ProjectGetHandler

type ProjectGetHandler struct {
	OpenStack ports.OpenStack
	CredFac   credsrc.CredentialFactory
}

ProjectGetHandler handles getting a single Project

func (ProjectGetHandler) Handle

Handle ...

type ProjectListHandler

type ProjectListHandler struct {
	OpenStack                 ports.OpenStack
	CredFac                   credsrc.CredentialFactory
	ProviderMetadataMS        ports.ProviderMetadataMS
	CredMS                    ports.CredentialMS
	CredentialMetadataStorage ports.CredentialMetadataStorage
}

ProjectListHandler handles getting a list of projects

func (ProjectListHandler) Handle

Handle listing the projects.

If request is specified to use all credentials for a provider. Then we list projects using every suitable credentials that user owns. The resulting openstack project list is de-duplicated.

The special case for using all credentials for a provider is necessary because user generally select an openstack project rather than specific credential to provision their resource; to allow this, user needs to know what openstack projects they have access to on a provider.

JS2 will return a list of projects that the openstack user (that we authenticate as) has access to, but we should not rely on this behavior, since this could change for other openstack provider, and a CACAO user may have credentials that tied to different openstack users, which list different projects.

type RecordsetListHandler

type RecordsetListHandler struct {
	OpenStack ports.OpenStack
	CredFac   credsrc.CredentialFactory
}

RecordsetListHandler handles listing DNS recordset

func (RecordsetListHandler) Handle

Handle ...

type RegionListHandler

type RegionListHandler struct {
	OpenStack ports.OpenStack
	CredFac   credsrc.CredentialFactory
}

RegionListHandler handles getting a list of regions

func (RegionListHandler) Handle

Handle ...

type Reply

type Reply interface {
	ToCloudEvent(source string, providerPrefix common.QueryOp) (cloudevents.Event, error)
}

Reply is an interface implemented by all reply structs in cacao-common (e.g. providers.ImageListReply)

type TokenGetHandler

type TokenGetHandler struct {
	OpenStack ports.OpenStack
	CredFac   credsrc.CredentialFactory
}

TokenGetHandler handles issuing a Token

func (TokenGetHandler) Handle

Handle ...

type ZoneListHandler

type ZoneListHandler struct {
	OpenStack ports.OpenStack
	CredFac   credsrc.CredentialFactory
}

ZoneListHandler handles listing Zone

func (ZoneListHandler) Handle

Handle ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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