gateway

package
v0.0.0-...-0fd85f3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiGatewayV2Client

type ApiGatewayV2Client interface {
	CreateIntegration(ctx context.Context, params *apigatewayv2.CreateIntegrationInput, optFns ...func(*apigatewayv2.Options)) (*apigatewayv2.CreateIntegrationOutput, error)
	DeleteIntegration(ctx context.Context, params *apigatewayv2.DeleteIntegrationInput, optFns ...func(*apigatewayv2.Options)) (*apigatewayv2.DeleteIntegrationOutput, error)
	GetIntegrations(ctx context.Context, params *apigatewayv2.GetIntegrationsInput, optFns ...func(*apigatewayv2.Options)) (*apigatewayv2.GetIntegrationsOutput, error)
	GetIntegration(ctx context.Context, params *apigatewayv2.GetIntegrationInput, optFns ...func(*apigatewayv2.Options)) (*apigatewayv2.GetIntegrationOutput, error)
	UpdateIntegration(ctx context.Context, params *apigatewayv2.UpdateIntegrationInput, optFns ...func(*apigatewayv2.Options)) (*apigatewayv2.UpdateIntegrationOutput, error)
	CreateRoute(ctx context.Context, params *apigatewayv2.CreateRouteInput, optFns ...func(*apigatewayv2.Options)) (*apigatewayv2.CreateRouteOutput, error)
	GetRoutes(ctx context.Context, params *apigatewayv2.GetRoutesInput, optFns ...func(*apigatewayv2.Options)) (*apigatewayv2.GetRoutesOutput, error)
	GetRoute(ctx context.Context, params *apigatewayv2.GetRouteInput, optFns ...func(*apigatewayv2.Options)) (*apigatewayv2.GetRouteOutput, error)
	DeleteRoute(ctx context.Context, params *apigatewayv2.DeleteRouteInput, optFns ...func(*apigatewayv2.Options)) (*apigatewayv2.DeleteRouteOutput, error)
	UpdateRoute(ctx context.Context, params *apigatewayv2.UpdateRouteInput, optFns ...func(*apigatewayv2.Options)) (*apigatewayv2.UpdateRouteOutput, error)
	GetApi(ctx context.Context, params *apigatewayv2.GetApiInput, optFns ...func(*apigatewayv2.Options)) (*apigatewayv2.GetApiOutput, error)
	GetApis(ctx context.Context, params *apigatewayv2.GetApisInput, optFns ...func(*apigatewayv2.Options)) (*apigatewayv2.GetApisOutput, error)
	CreateAuthorizer(ctx context.Context, params *apigatewayv2.CreateAuthorizerInput, optFns ...func(*apigatewayv2.Options)) (*apigatewayv2.CreateAuthorizerOutput, error)
	DeleteAuthorizer(ctx context.Context, params *apigatewayv2.DeleteAuthorizerInput, optFns ...func(*apigatewayv2.Options)) (*apigatewayv2.DeleteAuthorizerOutput, error)
}

type Client

type Client struct {
	Gw     ApiGatewayV2Client
	Lambda LambdaClient
}

type LambdaClient

type LambdaClient interface {
	AddPermission(ctx context.Context, params *lambda.AddPermissionInput, optFns ...func(*lambda.Options)) (*lambda.AddPermissionOutput, error)
	RemovePermission(ctx context.Context, params *lambda.RemovePermissionInput, optFns ...func(*lambda.Options)) (*lambda.RemovePermissionOutput, error)
}

type Service

type Service struct {
	Client Client
}

func FromClients

func FromClients(gwc ApiGatewayV2Client, lmc LambdaClient) Service

func (Service) DeleteIntegration

func (s Service) DeleteIntegration(ctx context.Context, apiId string, route types.Route) error

func (Service) DeleteLambdaPermission

func (s Service) DeleteLambdaPermission(ctx context.Context, lambdaArn string, route types.Route) error

func (Service) DeleteRoute

func (s Service) DeleteRoute(ctx context.Context, apiId string, route types.Route) error

func (Service) GetApi

func (s Service) GetApi(ctx context.Context, apiId string) (*apigatewayv2.GetApiOutput, error)

func (Service) GetApis

func (Service) GetRouteByRouteKey

func (s Service) GetRouteByRouteKey(ctx context.Context, apiId, routeKey string) (types.Route, error)

func (Service) GetRoutesByFunctionArn

func (s Service) GetRoutesByFunctionArn(ctx context.Context, apiId, functionArn string) ([]types.Route, error)

func (Service) PutIntegration

func (s Service) PutIntegration(ctx context.Context, apiId, lambdaArn, routeKey string) (*apigatewayv2.GetIntegrationOutput, error)

func (Service) PutLambdaPermission

func (s Service) PutLambdaPermission(ctx context.Context, apiId, lambdaArn, routeKey string) error

func (Service) PutRoute

func (s Service) PutRoute(ctx context.Context, apiId, integrationId, routeKey string, authType string, authorizerId *string) (*apigatewayv2.GetRouteOutput, error)

Jump to

Keyboard shortcuts

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