adapters

package
v0.0.0-...-d3e8332 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAWSAdapter

func NewAWSAdapter() ports.AWS

NewAWSAdapter creates a new AWS adapter

Types

type AWSSDK

type AWSSDK interface {
	DescribeImages(ctx context.Context, param *ec2.DescribeImagesInput, optFn ...func(*ec2.Options)) (*ec2.DescribeImagesOutput, error)
	DescribeInstanceTypes(ctx context.Context, param *ec2.DescribeInstanceTypesInput, optFn ...func(*ec2.Options)) (*ec2.DescribeInstanceTypesOutput, error)
	DescribeRegions(ctx context.Context, param *ec2.DescribeRegionsInput, optFn ...func(*ec2.Options)) (*ec2.DescribeRegionsOutput, error)
}

AWSSDK is an interface that has all the methods that will be used by awsAdapter. ec2.Client implements this interface. This interface is created to separate the adapter from the AWS sdk, thus allow mocking the AWS sdk for unit testing.

type CredentialMicroservice

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

CredentialMicroservice ...

func NewCredentialMicroservice

func NewCredentialMicroservice(queryConn messaging2.QueryConnection) *CredentialMicroservice

NewCredentialMicroservice ...

func (CredentialMicroservice) GetCredential

func (svc CredentialMicroservice) GetCredential(ctx context.Context, actor, emulator, ID string) (*types.Credential, error)

GetCredential ...

func (CredentialMicroservice) ListCredentialsByTag

func (svc CredentialMicroservice) ListCredentialsByTag(ctx context.Context, actor, emulator, tagName string) ([]types.Credential, error)

ListCredentialsByTag ...

type ProviderMetadataClient

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

ProviderMetadataClient ...

func NewProviderMetadataClient

func NewProviderMetadataClient(queryConn messaging2.QueryConnection) *ProviderMetadataClient

NewProviderMetadataClient ...

func (ProviderMetadataClient) GetMetadata

func (svc ProviderMetadataClient) GetMetadata(ctx context.Context, actor, emulator string, providerID common.ID) (map[string]interface{}, error)

GetMetadata fetches metadata for a provider

type QueryAdapter

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

QueryAdapter implements ports.IncomingQueryPort & ports.OutgoingQueryPort

func (*QueryAdapter) Close

func (adapter *QueryAdapter) Close() error

Close ...

func (*QueryAdapter) Init

func (adapter *QueryAdapter) Init(conf types.Configuration)

Init perform initialization on the adapter

func (*QueryAdapter) SetHandlers

func (adapter *QueryAdapter) SetHandlers(handlers ports.IncomingQueryHandlers)

SetHandlers ...

func (*QueryAdapter) Start

func (adapter *QueryAdapter) Start(ctx context.Context, wg *sync.WaitGroup) error

Start starts the queue subscriber

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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