resource

package
v0.0.0-...-137a528 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 21 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSApiGatewayDetails

type AWSApiGatewayDetails struct {
	Url string
}

type ApiGatewayDetails

type ApiGatewayDetails struct {
	Name        string
	Type        string
	ApiEndpoint string
}

type AwsResource

type AwsResource = string
const (
	AwsResource_Api          AwsResource = "apigateway:apis"
	AwsResource_StateMachine AwsResource = "states:stateMachine"
	AwsResource_Topic        AwsResource = "sns:topic"
	AwsResource_Collection   AwsResource = "dynamodb:table"
	AwsResource_Queue        AwsResource = "sqs:queue"
	AwsResource_Bucket       AwsResource = "s3:bucket"
	AwsResource_Secret       AwsResource = "secretsmanager:secret"
	AwsResource_EventRule    AwsResource = "events:rule"
	AwsResource_Unknown      AwsResource = "unknown"
)

type AwsResourceResolver

type AwsResourceResolver interface {
	GetApiGatewayById(ctx context.Context, apiId string) (*ApiGatewayDetails, error)
	GetAWSApiGatewayDetails(ctx context.Context, identifier *resourcespb.ResourceIdentifier) (*AWSApiGatewayDetails, error)
	GetResources(context.Context, AwsResource) (map[string]ResolvedResource, error)
}

type AwsSSMResourceResolver

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

Aws core utility provider

func NewSSMResourceResolver

func NewSSMResourceResolver() (*AwsSSMResourceResolver, error)

func (*AwsSSMResourceResolver) GetAWSApiGatewayDetails

func (a *AwsSSMResourceResolver) GetAWSApiGatewayDetails(ctx context.Context, identifier *resourcespb.ResourceIdentifier) (*AWSApiGatewayDetails, error)

GetAWSApiGatewayDetails - Get the details for an AWS API Gateway resource related to a Nitric API or Websocket

func (*AwsSSMResourceResolver) GetApiGatewayById

func (a *AwsSSMResourceResolver) GetApiGatewayById(ctx context.Context, apiId string) (*ApiGatewayDetails, error)

func (*AwsSSMResourceResolver) GetResources

func (a *AwsSSMResourceResolver) GetResources(ctx context.Context, resourceType AwsResource) (map[string]ResolvedResource, error)

type AwsTaggedResourceResolver

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

Aws core utility provider

func NewTaggedResourceResolver

func NewTaggedResourceResolver() (*AwsTaggedResourceResolver, error)

func (*AwsTaggedResourceResolver) GetAWSApiGatewayDetails

func (a *AwsTaggedResourceResolver) GetAWSApiGatewayDetails(ctx context.Context, identifier *resourcespb.ResourceIdentifier) (*AWSApiGatewayDetails, error)

GetAWSApiGatewayDetails - Get the details for an AWS API Gateway resource related to a Nitric API or Websocket

func (*AwsTaggedResourceResolver) GetApiGatewayById

func (a *AwsTaggedResourceResolver) GetApiGatewayById(ctx context.Context, apiId string) (*ApiGatewayDetails, error)

func (*AwsTaggedResourceResolver) GetResources

type ResolvedResource

type ResolvedResource struct {
	ARN string
}

type ResourceResolutionError

type ResourceResolutionError struct {
	Msg   string
	Cause error
}

func (*ResourceResolutionError) Error

func (e *ResourceResolutionError) Error() string

func (*ResourceResolutionError) Unwrap

func (e *ResourceResolutionError) Unwrap() error

Jump to

Keyboard shortcuts

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