Documentation
¶
Index ¶
- Variables
- type AccessLogSubscription
- type AccessLogSubscriptionSummary
- type AuthPolicy
- type Handler
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Snapshot(ctx context.Context) []byte
- type HeaderMatch
- type HealthCheckConfig
- type InMemoryBackend
- func (b *InMemoryBackend) AccountID() string
- func (b *InMemoryBackend) BatchUpdateRule(serviceID, listenerID string, updates []*RuleUpdate) ([]*RuleUpdateSuccess, []*RuleUpdateFailure, error)
- func (b *InMemoryBackend) CreateAccessLogSubscription(ctx context.Context, resourceID, destinationArn, logType string, ...) (*AccessLogSubscription, error)
- func (b *InMemoryBackend) CreateListener(serviceID, name, protocol string, port int32, defaultAction *RuleAction, ...) (*Listener, error)
- func (b *InMemoryBackend) CreateRule(serviceID, listenerID, name string, priority int32, action *RuleAction, ...) (*Rule, error)
- func (b *InMemoryBackend) CreateService(ctx context.Context, name, authType, certificateArn, customDomainName string, ...) (*Service, error)
- func (b *InMemoryBackend) CreateServiceNetwork(ctx context.Context, name, authType string, tags map[string]string) (*ServiceNetwork, error)
- func (b *InMemoryBackend) CreateServiceNetworkServiceAssociation(ctx context.Context, serviceNetworkID, serviceID string, ...) (*ServiceNetworkServiceAssociation, error)
- func (b *InMemoryBackend) CreateServiceNetworkVpcAssociation(ctx context.Context, serviceNetworkID, vpcID string, securityGroupIDs []string, ...) (*ServiceNetworkVpcAssociation, error)
- func (b *InMemoryBackend) CreateTargetGroup(ctx context.Context, name, tgType string, config *TargetGroupConfig, ...) (*TargetGroup, error)
- func (b *InMemoryBackend) DeleteAccessLogSubscription(alsID string) error
- func (b *InMemoryBackend) DeleteAuthPolicy(resourceID string) error
- func (b *InMemoryBackend) DeleteListener(serviceID, listenerID string) error
- func (b *InMemoryBackend) DeleteResourcePolicy(resourceArn string) error
- func (b *InMemoryBackend) DeleteRule(serviceID, listenerID, ruleID string) error
- func (b *InMemoryBackend) DeleteService(serviceID string) (*Service, error)
- func (b *InMemoryBackend) DeleteServiceNetwork(snID string) error
- func (b *InMemoryBackend) DeleteServiceNetworkServiceAssociation(snsaID string) error
- func (b *InMemoryBackend) DeleteServiceNetworkVpcAssociation(snvaID string) error
- func (b *InMemoryBackend) DeleteTargetGroup(tgID string) error
- func (b *InMemoryBackend) DeregisterTargets(tgID string, targets []*Target) ([]*TargetFailure, error)
- func (b *InMemoryBackend) GetAccessLogSubscription(alsID string) (*AccessLogSubscription, error)
- func (b *InMemoryBackend) GetAuthPolicy(resourceID string) (*AuthPolicy, error)
- func (b *InMemoryBackend) GetListener(serviceID, listenerID string) (*Listener, error)
- func (b *InMemoryBackend) GetResourcePolicy(resourceArn string) (string, error)
- func (b *InMemoryBackend) GetRule(serviceID, listenerID, ruleID string) (*Rule, error)
- func (b *InMemoryBackend) GetService(serviceID string) (*Service, error)
- func (b *InMemoryBackend) GetServiceNetwork(snID string) (*ServiceNetwork, error)
- func (b *InMemoryBackend) GetServiceNetworkServiceAssociation(snsaID string) (*ServiceNetworkServiceAssociation, error)
- func (b *InMemoryBackend) GetServiceNetworkVpcAssociation(snvaID string) (*ServiceNetworkVpcAssociation, error)
- func (b *InMemoryBackend) GetTargetGroup(tgID string) (*TargetGroup, error)
- func (b *InMemoryBackend) ListAccessLogSubscriptions(_ context.Context, resourceID string, maxResults int32, nextToken string) ([]*AccessLogSubscriptionSummary, string, error)
- func (b *InMemoryBackend) ListListeners(serviceID string, maxResults int32, nextToken string) ([]*ListenerSummary, string, error)
- func (b *InMemoryBackend) ListRules(serviceID, listenerID string, maxResults int32, nextToken string) ([]*RuleSummary, string, error)
- func (b *InMemoryBackend) ListServiceNetworkServiceAssociations(ctx context.Context, serviceNetworkID, serviceID string, maxResults int32, ...) ([]*ServiceNetworkServiceAssociationSummary, string, error)
- func (b *InMemoryBackend) ListServiceNetworkVpcAssociations(ctx context.Context, serviceNetworkID, vpcID string, maxResults int32, ...) ([]*ServiceNetworkVpcAssociationSummary, string, error)
- func (b *InMemoryBackend) ListServiceNetworks(ctx context.Context, maxResults int32, nextToken string) ([]*ServiceNetworkSummary, string, error)
- func (b *InMemoryBackend) ListServices(ctx context.Context, maxResults int32, nextToken string) ([]*ServiceSummary, string, error)
- func (b *InMemoryBackend) ListTagsForResource(resourceArn string) (map[string]string, error)
- func (b *InMemoryBackend) ListTargetGroups(ctx context.Context, tgType, serviceArn string, maxResults int32, ...) ([]*TargetGroupSummary, string, error)
- func (b *InMemoryBackend) ListTargets(_ context.Context, tgID string, filters []Target, maxResults int32, ...) ([]*TargetSummary, string, error)
- func (b *InMemoryBackend) PutAuthPolicy(resourceID, policy string) (*AuthPolicy, error)
- func (b *InMemoryBackend) PutResourcePolicy(resourceArn, policy string) error
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) RegisterTargets(tgID string, targets []*Target) ([]*TargetFailure, error)
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) TagResource(resourceArn string, tags map[string]string) error
- func (b *InMemoryBackend) UntagResource(resourceArn string, keys []string) error
- func (b *InMemoryBackend) UpdateAccessLogSubscription(alsID, destinationArn string) (*AccessLogSubscription, error)
- func (b *InMemoryBackend) UpdateListener(serviceID, listenerID string, defaultAction *RuleAction) (*Listener, error)
- func (b *InMemoryBackend) UpdateRule(serviceID, listenerID, ruleID string, priority int32, action *RuleAction, ...) (*Rule, error)
- func (b *InMemoryBackend) UpdateService(serviceID, authType, certificateArn string) (*Service, error)
- func (b *InMemoryBackend) UpdateServiceNetwork(snID, authType string) (*ServiceNetwork, error)
- func (b *InMemoryBackend) UpdateServiceNetworkVpcAssociation(snvaID string, securityGroupIDs []string) (*ServiceNetworkVpcAssociation, error)
- func (b *InMemoryBackend) UpdateTargetGroup(tgID string, healthCheck *HealthCheckConfig) (*TargetGroup, error)
- type Listener
- type ListenerSummary
- type Provider
- type Rule
- type RuleAction
- type RuleMatch
- type RuleSummary
- type RuleUpdate
- type RuleUpdateFailure
- type RuleUpdateSuccess
- type Service
- type ServiceNetwork
- type ServiceNetworkServiceAssociation
- type ServiceNetworkServiceAssociationSummary
- type ServiceNetworkSummary
- type ServiceNetworkVpcAssociation
- type ServiceNetworkVpcAssociationSummary
- type ServiceSummary
- type StorageBackend
- type Target
- type TargetFailure
- type TargetGroup
- type TargetGroupConfig
- type TargetGroupSummary
- type TargetSummary
- type WeightedTargetGroup
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotFound is returned when a resource does not exist. ErrNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound) // ErrAlreadyExists is returned when a resource already exists with the same name. ErrAlreadyExists = awserr.New("ConflictException", awserr.ErrAlreadyExists) // ErrInvalidParameter is returned for invalid input. ErrInvalidParameter = awserr.New("ValidationException", awserr.ErrInvalidParameter) )
var ErrNilAppContext = errors.New("AppContext is required")
ErrNilAppContext is returned when Provider.Init is called with a nil AppContext.
Functions ¶
This section is empty.
Types ¶
type AccessLogSubscription ¶
type AccessLogSubscription struct {
CreatedAt time.Time
LastUpdatedAt time.Time
ARN string
ID string
ResourceARN string
ResourceID string
DestinationARN string
ServiceNetworkLogType string
}
AccessLogSubscription represents a VPC Lattice access log subscription.
type AccessLogSubscriptionSummary ¶
type AccessLogSubscriptionSummary struct {
CreatedAt time.Time
LastUpdatedAt time.Time
ARN string
ID string
ResourceARN string
ResourceID string
DestinationARN string
}
AccessLogSubscriptionSummary is a summary for list responses.
type AuthPolicy ¶
AuthPolicy represents an auth policy on a VPC Lattice resource.
type Handler ¶
type Handler struct {
Backend StorageBackend
}
Handler handles VPC Lattice HTTP requests.
func (*Handler) ExtractOperation ¶
ExtractOperation classifies the request into an operation name.
func (*Handler) ExtractResource ¶
ExtractResource returns the primary resource identifier.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns all supported operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler function for VPC Lattice requests.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority.
func (*Handler) Restore ¶
Restore implements persistence.Persistable by delegating to the backend. See the Snapshot doc comment above for why this delegation is new.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a function that matches VPC Lattice API requests.
func (*Handler) Snapshot ¶
Snapshot implements persistence.Persistable by delegating to the backend.
Prior to Phase 3.3, Handler had no Snapshot/Restore of its own even though InMemoryBackend implemented both (dead wiring: cli.go's setupPersistence type-asserts each registered service.Registerable -- here, *Handler -- against a persistable{Snapshot,Restore} interface, and only registers it with the persistence.Manager if that assertion succeeds; since Handler never declared these methods, VPC Lattice was silently never registered and never persisted). This delegation is what actually wires VPC Lattice into the persistence Manager.
type HeaderMatch ¶
type HeaderMatch struct {
Name string `json:"name"`
MatchType string `json:"matchType"`
MatchValue string `json:"matchValue"`
CaseSensitive bool `json:"caseSensitive"`
}
HeaderMatch is an HTTP header match condition.
type HealthCheckConfig ¶
type HealthCheckConfig struct {
Protocol string `json:"protocol,omitempty"`
ProtocolVersion string `json:"protocolVersion,omitempty"`
Path string `json:"path,omitempty"`
MatcherHTTPCode string `json:"matcherHttpCode,omitempty"`
Port int32 `json:"port,omitempty"`
HealthyThresholdCount int32 `json:"healthyThresholdCount,omitempty"`
UnhealthyThresholdCount int32 `json:"unhealthyThresholdCount,omitempty"`
HealthCheckIntervalSeconds int32 `json:"healthCheckIntervalSeconds,omitempty"`
HealthCheckTimeoutSeconds int32 `json:"healthCheckTimeoutSeconds,omitempty"`
Enabled bool `json:"enabled,omitempty"`
}
HealthCheckConfig is the health check configuration for a target group.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend is an in-memory implementation of StorageBackend.
func NewInMemoryBackend ¶
func NewInMemoryBackend(accountID, region string) *InMemoryBackend
NewInMemoryBackend creates a new InMemoryBackend.
func (*InMemoryBackend) AccountID ¶
func (b *InMemoryBackend) AccountID() string
AccountID returns the configured account ID.
func (*InMemoryBackend) BatchUpdateRule ¶
func (b *InMemoryBackend) BatchUpdateRule( serviceID, listenerID string, updates []*RuleUpdate, ) ([]*RuleUpdateSuccess, []*RuleUpdateFailure, error)
BatchUpdateRule updates multiple rules atomically.
func (*InMemoryBackend) CreateAccessLogSubscription ¶
func (b *InMemoryBackend) CreateAccessLogSubscription( ctx context.Context, resourceID, destinationArn, logType string, tags map[string]string, ) (*AccessLogSubscription, error)
CreateAccessLogSubscription creates an access log subscription.
func (*InMemoryBackend) CreateListener ¶
func (b *InMemoryBackend) CreateListener( serviceID, name, protocol string, port int32, defaultAction *RuleAction, tags map[string]string, ) (*Listener, error)
CreateListener creates a listener on a service.
func (*InMemoryBackend) CreateRule ¶
func (b *InMemoryBackend) CreateRule( serviceID, listenerID, name string, priority int32, action *RuleAction, match *RuleMatch, tags map[string]string, ) (*Rule, error)
CreateRule creates a listener rule.
func (*InMemoryBackend) CreateService ¶
func (b *InMemoryBackend) CreateService( ctx context.Context, name, authType, certificateArn, customDomainName string, tags map[string]string, ) (*Service, error)
CreateService creates a new service.
func (*InMemoryBackend) CreateServiceNetwork ¶
func (b *InMemoryBackend) CreateServiceNetwork( ctx context.Context, name, authType string, tags map[string]string, ) (*ServiceNetwork, error)
CreateServiceNetwork creates a new service network.
func (*InMemoryBackend) CreateServiceNetworkServiceAssociation ¶
func (b *InMemoryBackend) CreateServiceNetworkServiceAssociation( ctx context.Context, serviceNetworkID, serviceID string, tags map[string]string, ) (*ServiceNetworkServiceAssociation, error)
CreateServiceNetworkServiceAssociation creates a service-to-network association.
func (*InMemoryBackend) CreateServiceNetworkVpcAssociation ¶
func (b *InMemoryBackend) CreateServiceNetworkVpcAssociation( ctx context.Context, serviceNetworkID, vpcID string, securityGroupIDs []string, tags map[string]string, ) (*ServiceNetworkVpcAssociation, error)
CreateServiceNetworkVpcAssociation creates a VPC-to-network association.
func (*InMemoryBackend) CreateTargetGroup ¶
func (b *InMemoryBackend) CreateTargetGroup( ctx context.Context, name, tgType string, config *TargetGroupConfig, tags map[string]string, ) (*TargetGroup, error)
CreateTargetGroup creates a target group.
func (*InMemoryBackend) DeleteAccessLogSubscription ¶
func (b *InMemoryBackend) DeleteAccessLogSubscription(alsID string) error
DeleteAccessLogSubscription deletes an access log subscription.
func (*InMemoryBackend) DeleteAuthPolicy ¶
func (b *InMemoryBackend) DeleteAuthPolicy(resourceID string) error
DeleteAuthPolicy deletes the auth policy for a resource.
func (*InMemoryBackend) DeleteListener ¶
func (b *InMemoryBackend) DeleteListener(serviceID, listenerID string) error
DeleteListener deletes a listener and its rules.
func (*InMemoryBackend) DeleteResourcePolicy ¶
func (b *InMemoryBackend) DeleteResourcePolicy(resourceArn string) error
DeleteResourcePolicy deletes a resource policy.
func (*InMemoryBackend) DeleteRule ¶
func (b *InMemoryBackend) DeleteRule(serviceID, listenerID, ruleID string) error
DeleteRule deletes a rule.
func (*InMemoryBackend) DeleteService ¶
func (b *InMemoryBackend) DeleteService(serviceID string) (*Service, error)
DeleteService deletes a service.
func (*InMemoryBackend) DeleteServiceNetwork ¶
func (b *InMemoryBackend) DeleteServiceNetwork(snID string) error
DeleteServiceNetwork deletes a service network.
func (*InMemoryBackend) DeleteServiceNetworkServiceAssociation ¶
func (b *InMemoryBackend) DeleteServiceNetworkServiceAssociation(snsaID string) error
DeleteServiceNetworkServiceAssociation deletes a SNSA.
func (*InMemoryBackend) DeleteServiceNetworkVpcAssociation ¶
func (b *InMemoryBackend) DeleteServiceNetworkVpcAssociation(snvaID string) error
DeleteServiceNetworkVpcAssociation deletes a SNVA.
func (*InMemoryBackend) DeleteTargetGroup ¶
func (b *InMemoryBackend) DeleteTargetGroup(tgID string) error
DeleteTargetGroup deletes a target group.
func (*InMemoryBackend) DeregisterTargets ¶
func (b *InMemoryBackend) DeregisterTargets( tgID string, targets []*Target, ) ([]*TargetFailure, error)
DeregisterTargets deregisters targets from a target group.
func (*InMemoryBackend) GetAccessLogSubscription ¶
func (b *InMemoryBackend) GetAccessLogSubscription(alsID string) (*AccessLogSubscription, error)
GetAccessLogSubscription returns an access log subscription.
func (*InMemoryBackend) GetAuthPolicy ¶
func (b *InMemoryBackend) GetAuthPolicy(resourceID string) (*AuthPolicy, error)
GetAuthPolicy returns the auth policy for a resource.
func (*InMemoryBackend) GetListener ¶
func (b *InMemoryBackend) GetListener(serviceID, listenerID string) (*Listener, error)
GetListener returns a listener.
func (*InMemoryBackend) GetResourcePolicy ¶
func (b *InMemoryBackend) GetResourcePolicy(resourceArn string) (string, error)
GetResourcePolicy returns a resource policy.
func (*InMemoryBackend) GetRule ¶
func (b *InMemoryBackend) GetRule(serviceID, listenerID, ruleID string) (*Rule, error)
GetRule returns a rule.
func (*InMemoryBackend) GetService ¶
func (b *InMemoryBackend) GetService(serviceID string) (*Service, error)
GetService returns a service by ID or ARN.
func (*InMemoryBackend) GetServiceNetwork ¶
func (b *InMemoryBackend) GetServiceNetwork(snID string) (*ServiceNetwork, error)
GetServiceNetwork returns a service network.
func (*InMemoryBackend) GetServiceNetworkServiceAssociation ¶
func (b *InMemoryBackend) GetServiceNetworkServiceAssociation( snsaID string, ) (*ServiceNetworkServiceAssociation, error)
GetServiceNetworkServiceAssociation returns a SNSA by ID or ARN.
func (*InMemoryBackend) GetServiceNetworkVpcAssociation ¶
func (b *InMemoryBackend) GetServiceNetworkVpcAssociation( snvaID string, ) (*ServiceNetworkVpcAssociation, error)
GetServiceNetworkVpcAssociation returns a SNVA.
func (*InMemoryBackend) GetTargetGroup ¶
func (b *InMemoryBackend) GetTargetGroup(tgID string) (*TargetGroup, error)
GetTargetGroup returns a target group.
func (*InMemoryBackend) ListAccessLogSubscriptions ¶
func (b *InMemoryBackend) ListAccessLogSubscriptions( _ context.Context, resourceID string, maxResults int32, nextToken string, ) ([]*AccessLogSubscriptionSummary, string, error)
ListAccessLogSubscriptions lists access log subscriptions for a resource.
func (*InMemoryBackend) ListListeners ¶
func (b *InMemoryBackend) ListListeners( serviceID string, maxResults int32, nextToken string, ) ([]*ListenerSummary, string, error)
ListListeners lists listeners for a service.
func (*InMemoryBackend) ListRules ¶
func (b *InMemoryBackend) ListRules( serviceID, listenerID string, maxResults int32, nextToken string, ) ([]*RuleSummary, string, error)
ListRules lists rules for a listener.
func (*InMemoryBackend) ListServiceNetworkServiceAssociations ¶
func (b *InMemoryBackend) ListServiceNetworkServiceAssociations( ctx context.Context, serviceNetworkID, serviceID string, maxResults int32, nextToken string, ) ([]*ServiceNetworkServiceAssociationSummary, string, error)
ListServiceNetworkServiceAssociations lists SNSAs with optional filters.
func (*InMemoryBackend) ListServiceNetworkVpcAssociations ¶
func (b *InMemoryBackend) ListServiceNetworkVpcAssociations( ctx context.Context, serviceNetworkID, vpcID string, maxResults int32, nextToken string, ) ([]*ServiceNetworkVpcAssociationSummary, string, error)
ListServiceNetworkVpcAssociations lists SNVAs with optional filters.
func (*InMemoryBackend) ListServiceNetworks ¶
func (b *InMemoryBackend) ListServiceNetworks( ctx context.Context, maxResults int32, nextToken string, ) ([]*ServiceNetworkSummary, string, error)
ListServiceNetworks returns a paginated list of service networks.
func (*InMemoryBackend) ListServices ¶
func (b *InMemoryBackend) ListServices( ctx context.Context, maxResults int32, nextToken string, ) ([]*ServiceSummary, string, error)
ListServices returns a paginated list of services.
func (*InMemoryBackend) ListTagsForResource ¶
func (b *InMemoryBackend) ListTagsForResource(resourceArn string) (map[string]string, error)
ListTagsForResource returns tags for a resource.
func (*InMemoryBackend) ListTargetGroups ¶
func (b *InMemoryBackend) ListTargetGroups( ctx context.Context, tgType, serviceArn string, maxResults int32, nextToken string, ) ([]*TargetGroupSummary, string, error)
ListTargetGroups lists target groups with optional filters.
func (*InMemoryBackend) ListTargets ¶
func (b *InMemoryBackend) ListTargets( _ context.Context, tgID string, filters []Target, maxResults int32, nextToken string, ) ([]*TargetSummary, string, error)
ListTargets lists registered targets for a target group.
func (*InMemoryBackend) PutAuthPolicy ¶
func (b *InMemoryBackend) PutAuthPolicy(resourceID, policy string) (*AuthPolicy, error)
PutAuthPolicy sets an auth policy on a resource.
func (*InMemoryBackend) PutResourcePolicy ¶
func (b *InMemoryBackend) PutResourcePolicy(resourceArn, policy string) error
PutResourcePolicy sets a resource policy.
func (*InMemoryBackend) Region ¶
func (b *InMemoryBackend) Region() string
Region returns the configured region.
func (*InMemoryBackend) RegisterTargets ¶
func (b *InMemoryBackend) RegisterTargets( tgID string, targets []*Target, ) ([]*TargetFailure, error)
RegisterTargets registers targets to a target group.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore deserializes state from JSON.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serializes current state to JSON.
func (*InMemoryBackend) TagResource ¶
func (b *InMemoryBackend) TagResource(resourceArn string, tags map[string]string) error
TagResource adds tags to a resource.
func (*InMemoryBackend) UntagResource ¶
func (b *InMemoryBackend) UntagResource(resourceArn string, keys []string) error
UntagResource removes tags from a resource.
func (*InMemoryBackend) UpdateAccessLogSubscription ¶
func (b *InMemoryBackend) UpdateAccessLogSubscription( alsID, destinationArn string, ) (*AccessLogSubscription, error)
UpdateAccessLogSubscription updates the destination ARN.
func (*InMemoryBackend) UpdateListener ¶
func (b *InMemoryBackend) UpdateListener( serviceID, listenerID string, defaultAction *RuleAction, ) (*Listener, error)
UpdateListener updates the default action of a listener.
func (*InMemoryBackend) UpdateRule ¶
func (b *InMemoryBackend) UpdateRule( serviceID, listenerID, ruleID string, priority int32, action *RuleAction, match *RuleMatch, ) (*Rule, error)
UpdateRule updates a rule.
func (*InMemoryBackend) UpdateService ¶
func (b *InMemoryBackend) UpdateService( serviceID, authType, certificateArn string, ) (*Service, error)
UpdateService updates a service.
func (*InMemoryBackend) UpdateServiceNetwork ¶
func (b *InMemoryBackend) UpdateServiceNetwork(snID, authType string) (*ServiceNetwork, error)
UpdateServiceNetwork updates a service network.
func (*InMemoryBackend) UpdateServiceNetworkVpcAssociation ¶
func (b *InMemoryBackend) UpdateServiceNetworkVpcAssociation( snvaID string, securityGroupIDs []string, ) (*ServiceNetworkVpcAssociation, error)
UpdateServiceNetworkVpcAssociation updates security groups on a SNVA.
func (*InMemoryBackend) UpdateTargetGroup ¶
func (b *InMemoryBackend) UpdateTargetGroup( tgID string, healthCheck *HealthCheckConfig, ) (*TargetGroup, error)
UpdateTargetGroup updates a target group's health check config.
type Listener ¶
type Listener struct {
DefaultAction *RuleAction
CreatedAt time.Time
LastUpdatedAt time.Time
ARN string
ID string
ServiceARN string
ServiceID string
Name string
Protocol string
Port int32
}
Listener represents a VPC Lattice listener.
type ListenerSummary ¶
type ListenerSummary struct {
CreatedAt time.Time
LastUpdatedAt time.Time
ARN string
ID string
Name string
Protocol string
Port int32
}
ListenerSummary is a listener entry for list responses.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for the VPC Lattice service.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the VPC Lattice backend and handler.
type Rule ¶
type Rule struct {
Action *RuleAction
Match *RuleMatch
CreatedAt time.Time
LastUpdatedAt time.Time
ARN string
ID string
Name string
Priority int32
IsDefault bool
}
Rule represents a VPC Lattice listener rule.
type RuleAction ¶
type RuleAction struct {
ForwardTargetGroups []*WeightedTargetGroup `json:"forwardTargetGroups,omitempty"`
FixedResponseStatusCode int32 `json:"fixedResponseStatusCode,omitempty"`
IsFixedResponse bool `json:"isFixedResponse,omitempty"`
}
RuleAction is the action for a listener rule.
type RuleMatch ¶
type RuleMatch struct {
HTTPMethod string `json:"httpMethod,omitempty"`
PathMatchType string `json:"pathMatchType,omitempty"`
PathMatchValue string `json:"pathMatchValue,omitempty"`
HeaderMatches []*HeaderMatch `json:"headerMatches,omitempty"`
}
RuleMatch is the match conditions for a listener rule.
type RuleSummary ¶
type RuleSummary struct {
CreatedAt time.Time
LastUpdatedAt time.Time
ARN string
ID string
Name string
Priority int32
IsDefault bool
}
RuleSummary is a rule entry for list responses.
type RuleUpdate ¶
type RuleUpdate struct {
Action *RuleAction
Match *RuleMatch
RuleIdentifier string
Priority int32
}
RuleUpdate is an update spec for BatchUpdateRule.
type RuleUpdateFailure ¶
RuleUpdateFailure is a failed rule update result.
type RuleUpdateSuccess ¶
type RuleUpdateSuccess struct {
Action *RuleAction
Match *RuleMatch
ARN string
ID string
Name string
Priority int32
IsDefault bool
}
RuleUpdateSuccess is a successful rule update result.
type Service ¶
type Service struct {
CreatedAt time.Time
LastUpdatedAt time.Time
ARN string
ID string
Name string
AuthType string
CertificateArn string
CustomDomainName string
DNSName string
Status string
}
Service represents a VPC Lattice service.
type ServiceNetwork ¶
type ServiceNetwork struct {
CreatedAt time.Time
LastUpdatedAt time.Time
ARN string
ID string
Name string
AuthType string
NumberOfAssociatedServices int64
NumberOfAssociatedVPCs int64
}
ServiceNetwork represents a VPC Lattice service network.
type ServiceNetworkServiceAssociation ¶
type ServiceNetworkServiceAssociation struct {
CreatedAt time.Time
ARN string
ID string
ServiceARN string
ServiceID string
ServiceName string
ServiceNetworkARN string
ServiceNetworkID string
ServiceNetworkName string
Status string
CreatedBy string
CustomDomainName string
DNSName string
}
ServiceNetworkServiceAssociation is a service-to-service-network association.
type ServiceNetworkServiceAssociationSummary ¶
type ServiceNetworkServiceAssociationSummary struct {
CreatedAt time.Time
ARN string
ID string
ServiceARN string
ServiceID string
ServiceName string
ServiceNetworkARN string
ServiceNetworkID string
ServiceNetworkName string
Status string
CustomDomainName string
DNSName string
}
ServiceNetworkServiceAssociationSummary is a summary for list responses.
type ServiceNetworkSummary ¶
type ServiceNetworkSummary struct {
CreatedAt time.Time
ARN string
ID string
Name string
NumberOfAssociatedServices int64
NumberOfAssociatedVPCs int64
}
ServiceNetworkSummary is a service network entry for list responses.
type ServiceNetworkVpcAssociation ¶
type ServiceNetworkVpcAssociation struct {
CreatedAt time.Time
LastUpdatedAt time.Time
ARN string
ID string
VpcID string
ServiceNetworkARN string
ServiceNetworkID string
ServiceNetworkName string
Status string
CreatedBy string
SecurityGroupIDs []string
}
ServiceNetworkVpcAssociation is a VPC-to-service-network association.
type ServiceNetworkVpcAssociationSummary ¶
type ServiceNetworkVpcAssociationSummary struct {
CreatedAt time.Time
ARN string
ID string
VpcID string
ServiceNetworkARN string
ServiceNetworkID string
ServiceNetworkName string
Status string
}
ServiceNetworkVpcAssociationSummary is a summary for list responses.
type ServiceSummary ¶
type ServiceSummary struct {
CreatedAt time.Time
LastUpdatedAt time.Time
ARN string
ID string
Name string
CustomDomainName string
DNSName string
Status string
}
ServiceSummary is a service entry for list responses.
type StorageBackend ¶
type StorageBackend interface {
CreateService(
ctx context.Context,
name, authType, certificateArn, customDomainName string,
tags map[string]string,
) (*Service, error)
GetService(serviceID string) (*Service, error)
UpdateService(serviceID, authType, certificateArn string) (*Service, error)
DeleteService(serviceID string) (*Service, error)
ListServices(ctx context.Context, maxResults int32, nextToken string) ([]*ServiceSummary, string, error)
CreateServiceNetwork(ctx context.Context, name, authType string, tags map[string]string) (*ServiceNetwork, error)
GetServiceNetwork(snID string) (*ServiceNetwork, error)
UpdateServiceNetwork(snID, authType string) (*ServiceNetwork, error)
DeleteServiceNetwork(snID string) error
ListServiceNetworks(
ctx context.Context,
maxResults int32,
nextToken string,
) ([]*ServiceNetworkSummary, string, error)
CreateServiceNetworkServiceAssociation(
ctx context.Context,
serviceNetworkID, serviceID string,
tags map[string]string,
) (*ServiceNetworkServiceAssociation, error)
GetServiceNetworkServiceAssociation(snsaID string) (*ServiceNetworkServiceAssociation, error)
DeleteServiceNetworkServiceAssociation(snsaID string) error
ListServiceNetworkServiceAssociations(
ctx context.Context,
serviceNetworkID, serviceID string,
maxResults int32,
nextToken string,
) ([]*ServiceNetworkServiceAssociationSummary, string, error)
CreateServiceNetworkVpcAssociation(
ctx context.Context,
serviceNetworkID, vpcID string,
securityGroupIDs []string,
tags map[string]string,
) (*ServiceNetworkVpcAssociation, error)
GetServiceNetworkVpcAssociation(snvaID string) (*ServiceNetworkVpcAssociation, error)
UpdateServiceNetworkVpcAssociation(
snvaID string,
securityGroupIDs []string,
) (*ServiceNetworkVpcAssociation, error)
DeleteServiceNetworkVpcAssociation(snvaID string) error
ListServiceNetworkVpcAssociations(
ctx context.Context,
serviceNetworkID, vpcID string,
maxResults int32,
nextToken string,
) ([]*ServiceNetworkVpcAssociationSummary, string, error)
CreateListener(
serviceID, name, protocol string,
port int32,
defaultAction *RuleAction,
tags map[string]string,
) (*Listener, error)
GetListener(serviceID, listenerID string) (*Listener, error)
UpdateListener(serviceID, listenerID string, defaultAction *RuleAction) (*Listener, error)
DeleteListener(serviceID, listenerID string) error
ListListeners(
serviceID string,
maxResults int32,
nextToken string,
) ([]*ListenerSummary, string, error)
CreateRule(
serviceID, listenerID, name string,
priority int32,
action *RuleAction,
match *RuleMatch,
tags map[string]string,
) (*Rule, error)
GetRule(serviceID, listenerID, ruleID string) (*Rule, error)
UpdateRule(
serviceID, listenerID, ruleID string,
priority int32,
action *RuleAction,
match *RuleMatch,
) (*Rule, error)
DeleteRule(serviceID, listenerID, ruleID string) error
ListRules(
serviceID, listenerID string,
maxResults int32,
nextToken string,
) ([]*RuleSummary, string, error)
BatchUpdateRule(
serviceID, listenerID string,
updates []*RuleUpdate,
) ([]*RuleUpdateSuccess, []*RuleUpdateFailure, error)
CreateTargetGroup(
ctx context.Context,
name, tgType string,
config *TargetGroupConfig,
tags map[string]string,
) (*TargetGroup, error)
GetTargetGroup(tgID string) (*TargetGroup, error)
UpdateTargetGroup(tgID string, healthCheck *HealthCheckConfig) (*TargetGroup, error)
DeleteTargetGroup(tgID string) error
ListTargetGroups(
ctx context.Context,
tgType, serviceArn string,
maxResults int32,
nextToken string,
) ([]*TargetGroupSummary, string, error)
RegisterTargets(tgID string, targets []*Target) ([]*TargetFailure, error)
DeregisterTargets(tgID string, targets []*Target) ([]*TargetFailure, error)
ListTargets(
ctx context.Context,
tgID string,
filters []Target,
maxResults int32,
nextToken string,
) ([]*TargetSummary, string, error)
CreateAccessLogSubscription(
ctx context.Context,
resourceID, destinationArn, logType string,
tags map[string]string,
) (*AccessLogSubscription, error)
GetAccessLogSubscription(alsID string) (*AccessLogSubscription, error)
UpdateAccessLogSubscription(alsID, destinationArn string) (*AccessLogSubscription, error)
DeleteAccessLogSubscription(alsID string) error
ListAccessLogSubscriptions(
ctx context.Context,
resourceID string,
maxResults int32,
nextToken string,
) ([]*AccessLogSubscriptionSummary, string, error)
PutAuthPolicy(resourceID, policy string) (*AuthPolicy, error)
GetAuthPolicy(resourceID string) (*AuthPolicy, error)
DeleteAuthPolicy(resourceID string) error
PutResourcePolicy(resourceArn, policy string) error
GetResourcePolicy(resourceArn string) (string, error)
DeleteResourcePolicy(resourceArn string) error
TagResource(resourceArn string, tags map[string]string) error
UntagResource(resourceArn string, keys []string) error
ListTagsForResource(resourceArn string) (map[string]string, error)
AccountID() string
Region() string
Reset()
Snapshot(ctx context.Context) []byte
Restore(ctx context.Context, data []byte) error
}
StorageBackend is the interface for VPC Lattice storage operations.
type TargetFailure ¶
TargetFailure is a target registration/deregistration failure.
type TargetGroup ¶
type TargetGroup struct {
CreatedAt time.Time
LastUpdatedAt time.Time
ARN string
ID string
Name string
Type string
Status string
Config *TargetGroupConfig
ServiceARNs []string
}
TargetGroup represents a VPC Lattice target group.
type TargetGroupConfig ¶
type TargetGroupConfig struct {
HealthCheck *HealthCheckConfig `json:"healthCheck,omitempty"`
Protocol string `json:"protocol,omitempty"`
ProtocolVersion string `json:"protocolVersion,omitempty"`
VpcID string `json:"vpcId,omitempty"`
IPAddressType string `json:"ipAddressType,omitempty"`
LambdaEventStructureVersion string `json:"lambdaEventStructureVersion,omitempty"`
Port int32 `json:"port,omitempty"`
}
TargetGroupConfig is the configuration for a target group.
type TargetGroupSummary ¶
type TargetGroupSummary struct {
CreatedAt time.Time
LastUpdatedAt time.Time
ARN string
ID string
Name string
Type string
Status string
Protocol string
VpcID string
IPAddressType string
LambdaEventStructureVersion string
ServiceARNs []string
Port int32
}
TargetGroupSummary is a target group entry for list responses.
type TargetSummary ¶
TargetSummary is a target entry for list responses.
type WeightedTargetGroup ¶
type WeightedTargetGroup struct {
TargetGroupID string `json:"targetGroupId"`
Weight int32 `json:"weight"`
}
WeightedTargetGroup is a weighted target group for forward actions.
Source Files
¶
- access_log_subscriptions.go
- auth_policy.go
- errors.go
- handler.go
- handler_access_log_subscriptions.go
- handler_auth_policy.go
- handler_listeners.go
- handler_resource_policy.go
- handler_rules.go
- handler_service_network_associations.go
- handler_service_networks.go
- handler_services.go
- handler_tags.go
- handler_target_groups.go
- handler_targets.go
- interfaces.go
- listeners.go
- models.go
- persistence.go
- provider.go
- resource_policy.go
- rules.go
- service_network_associations.go
- service_networks.go
- services.go
- store.go
- store_setup.go
- tags.go
- target_groups.go
- targets.go