INNER CODE UNIT · Go

NewAPIV2

mweagle/Sparta · apigatewayv2.go:382

func NewAPIV2(protocol APIV2Protocol,
	name string,
	routeSelectionExpression string,
	stage *APIV2Stage) (*APIV2, error) {
	return &APIV2{
		protocol:                 protocol,
		name:                     name,
		routeSelectionExpression: routeSelectionExpression,
		stage:                    stage,
		routes:                   make(map[APIV2RouteSelectionExpression]*APIV2Route),
		Tags:                     make(map[string]interface{}),
	}, nil
}

// APIV2Route represents a V2 route
type APIV2Route struct {
	routeKey                         APIV2RouteSelectionExpression
	APIKeyRequired                   bool

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…