Documentation
¶
Index ¶
- type Group
- type ResourceGroupsService
- type ResourceQuery
- type Store
- func (s *Store) CreateGroup(name, description string, query *ResourceQuery, tags map[string]string) (*Group, error)
- func (s *Store) DeleteGroup(name string) (*Group, bool)
- func (s *Store) GetGroup(name string) (*Group, bool)
- func (s *Store) GetGroupQuery(name string) (*Group, bool)
- func (s *Store) GetTags(arn string) (map[string]string, bool)
- func (s *Store) GroupResources(name string, arns []string) ([]string, []string)
- func (s *Store) ListGroupResources(name string) ([]string, bool)
- func (s *Store) ListGroups() []*Group
- func (s *Store) TagResource(arn string, tags map[string]string) bool
- func (s *Store) UngroupResources(name string, arns []string) ([]string, []string)
- func (s *Store) UntagResource(arn string, keys []string) bool
- func (s *Store) UpdateGroup(name, description string) (*Group, error)
- func (s *Store) UpdateGroupQuery(name string, query *ResourceQuery) (*Group, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
type Group struct {
GroupArn string
Name string
Description string
ResourceQuery *ResourceQuery
Tags map[string]string
Resources []string // resource ARNs
CreatedAt time.Time
}
Group represents a Resource Groups group.
type ResourceGroupsService ¶
type ResourceGroupsService struct {
// contains filtered or unexported fields
}
ResourceGroupsService is the cloudmock implementation of the AWS Resource Groups API.
func New ¶
func New(accountID, region string) *ResourceGroupsService
New returns a new ResourceGroupsService for the given AWS account ID and region.
func (*ResourceGroupsService) Actions ¶
func (s *ResourceGroupsService) Actions() []service.Action
Actions returns the list of Resource Groups API actions supported by this service.
func (*ResourceGroupsService) HandleRequest ¶
func (s *ResourceGroupsService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
HandleRequest routes an incoming Resource Groups request to the appropriate handler. Resource Groups uses REST-JSON protocol.
func (*ResourceGroupsService) HealthCheck ¶
func (s *ResourceGroupsService) HealthCheck() error
HealthCheck always returns nil.
func (*ResourceGroupsService) Name ¶
func (s *ResourceGroupsService) Name() string
Name returns the AWS service name used for routing.
type ResourceQuery ¶
type ResourceQuery struct {
Type string // TAG_FILTERS_1_0, CLOUDFORMATION_STACK_1_0
Query string // JSON query string
}
ResourceQuery describes how to find group members.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages Resource Groups resources in memory.
func (*Store) CreateGroup ¶
func (s *Store) CreateGroup(name, description string, query *ResourceQuery, tags map[string]string) (*Group, error)
CreateGroup creates a new resource group.
func (*Store) DeleteGroup ¶
DeleteGroup removes a group.
func (*Store) GetGroupQuery ¶
GetGroupQuery returns the resource query for a group.
func (*Store) GroupResources ¶
GroupResources adds resources to a group.
func (*Store) ListGroupResources ¶
ListGroupResources returns resources in a group.
func (*Store) TagResource ¶
TagResource adds tags to a group.
func (*Store) UngroupResources ¶
UngroupResources removes resources from a group.
func (*Store) UntagResource ¶
UntagResource removes tags from a group.
func (*Store) UpdateGroup ¶
UpdateGroup updates a group's description.
func (*Store) UpdateGroupQuery ¶
func (s *Store) UpdateGroupQuery(name string, query *ResourceQuery) (*Group, bool)
UpdateGroupQuery updates the resource query for a group.