Documentation
¶
Index ¶
- type ApiKey
- type AppSyncService
- type DataSource
- type Function
- type GraphqlApi
- type Resolver
- type SchemaCreation
- type Store
- func (s *Store) CreateApiKey(apiID, description string, expires int64) (*ApiKey, bool)
- func (s *Store) CreateDataSource(apiID, name, dsType, description, serviceRoleArn string, ...) (*DataSource, bool)
- func (s *Store) CreateFunction(...) (*Function, bool)
- func (s *Store) CreateGraphqlApi(name, authType string, tags map[string]string, xrayEnabled bool) *GraphqlApi
- func (s *Store) CreateResolver(...) (*Resolver, bool)
- func (s *Store) CreateType(apiID, name, format, definition, description string) (*TypeDef, bool)
- func (s *Store) DeleteApiKey(apiID, keyID string) bool
- func (s *Store) DeleteDataSource(apiID, name string) bool
- func (s *Store) DeleteFunction(apiID, functionID string) bool
- func (s *Store) DeleteGraphqlApi(apiID string) bool
- func (s *Store) DeleteResolver(apiID, typeName, fieldName string) bool
- func (s *Store) DeleteType(apiID, typeName string) bool
- func (s *Store) GetDataSource(apiID, name string) (*DataSource, bool)
- func (s *Store) GetFunction(apiID, functionID string) (*Function, bool)
- func (s *Store) GetGraphqlApi(apiID string) (*GraphqlApi, bool)
- func (s *Store) GetResolver(apiID, typeName, fieldName string) (*Resolver, bool)
- func (s *Store) GetSchemaCreationStatus(apiID string) (*SchemaCreation, bool)
- func (s *Store) GetType(apiID, typeName, format string) (*TypeDef, bool)
- func (s *Store) ListApiKeys(apiID string) ([]*ApiKey, bool)
- func (s *Store) ListDataSources(apiID string) ([]*DataSource, bool)
- func (s *Store) ListFunctions(apiID string) ([]*Function, bool)
- func (s *Store) ListGraphqlApis() []*GraphqlApi
- func (s *Store) ListResolvers(apiID, typeName string) ([]*Resolver, bool)
- func (s *Store) ListTagsForResource(arn string) (map[string]string, bool)
- func (s *Store) ListTypes(apiID, format string) []*TypeDef
- func (s *Store) StartSchemaCreation(apiID, definition string) bool
- func (s *Store) TagResource(arn string, tags map[string]string) bool
- func (s *Store) UntagResource(arn string, keys []string) bool
- func (s *Store) UpdateApiKey(apiID, keyID, description string, expires int64) (*ApiKey, bool)
- func (s *Store) UpdateDataSource(apiID, name, dsType, description, serviceRoleArn string) (*DataSource, bool)
- func (s *Store) UpdateFunction(...) (*Function, bool)
- func (s *Store) UpdateGraphqlApi(apiID, name, authType string, xrayEnabled *bool) (*GraphqlApi, bool)
- func (s *Store) UpdateResolver(...) (*Resolver, bool)
- func (s *Store) UpdateType(apiID, typeName, format, definition, description string) (*TypeDef, bool)
- type TypeDef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppSyncService ¶
type AppSyncService struct {
// contains filtered or unexported fields
}
AppSyncService is the cloudmock implementation of the AWS AppSync API.
func New ¶
func New(accountID, region string) *AppSyncService
New returns a new AppSyncService for the given AWS account ID and region.
func (*AppSyncService) Actions ¶
func (s *AppSyncService) Actions() []service.Action
Actions returns the list of AppSync API actions supported by this service.
func (*AppSyncService) HandleRequest ¶
func (s *AppSyncService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
HandleRequest routes an incoming AppSync request to the appropriate handler.
func (*AppSyncService) HealthCheck ¶
func (s *AppSyncService) HealthCheck() error
HealthCheck always returns nil (no external dependencies).
func (*AppSyncService) Name ¶
func (s *AppSyncService) Name() string
Name returns the AWS service name used for routing.
type DataSource ¶
type DataSource struct {
DataSourceArn string
ApiId string
Name string
Type string
Description string
ServiceRoleArn string
DynamodbConfig map[string]any
LambdaConfig map[string]any
HttpConfig map[string]any
ElasticsearchConfig map[string]any
}
DataSource represents an AppSync data source.
type Function ¶
type Function struct {
FunctionId string
ApiId string
Name string
Description string
DataSourceName string
RequestMappingTemplate string
ResponseMappingTemplate string
FunctionVersion string
Runtime map[string]any
Code string
}
Function represents an AppSync function.
type GraphqlApi ¶
type GraphqlApi struct {
ApiId string
Name string
ARN string
AuthenticationType string
LogConfig map[string]any
UserPoolConfig map[string]any
OpenIDConnectConfig map[string]any
AdditionalAuth []map[string]any
XrayEnabled bool
Uris map[string]string
Tags map[string]string
CreatedAt time.Time
}
GraphqlApi represents an AppSync GraphQL API.
type Resolver ¶
type Resolver struct {
ApiId string
TypeName string
FieldName string
DataSourceName string
RequestMappingTemplate string
ResponseMappingTemplate string
Kind string
PipelineConfig map[string]any
CachingConfig map[string]any
Runtime map[string]any
Code string
}
Resolver represents an AppSync resolver.
type SchemaCreation ¶
type SchemaCreation struct {
Status string // PROCESSING | ACTIVE | FAILED | DELETING
Details string
}
SchemaCreation tracks schema creation state.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages all AppSync state in memory.
func (*Store) CreateApiKey ¶
CreateApiKey creates a new API key.
func (*Store) CreateDataSource ¶
func (s *Store) CreateDataSource(apiID, name, dsType, description, serviceRoleArn string, dynamodb, lambda, httpConf, es map[string]any) (*DataSource, bool)
CreateDataSource creates a new data source.
func (*Store) CreateFunction ¶
func (s *Store) CreateFunction(apiID, name, description, dataSourceName, requestTemplate, responseTemplate, functionVersion, code string, runtime map[string]any) (*Function, bool)
CreateFunction creates a new function.
func (*Store) CreateGraphqlApi ¶
func (s *Store) CreateGraphqlApi(name, authType string, tags map[string]string, xrayEnabled bool) *GraphqlApi
CreateGraphqlApi creates a new GraphQL API.
func (*Store) CreateResolver ¶
func (s *Store) CreateResolver(apiID, typeName, fieldName, dataSourceName, requestTemplate, responseTemplate, kind, code string, pipelineConfig, cachingConfig, runtime map[string]any) (*Resolver, bool)
CreateResolver creates a new resolver.
func (*Store) CreateType ¶
CreateType creates a new type definition for an API.
func (*Store) DeleteApiKey ¶
DeleteApiKey removes an API key.
func (*Store) DeleteDataSource ¶
DeleteDataSource removes a data source.
func (*Store) DeleteFunction ¶
DeleteFunction removes a function.
func (*Store) DeleteGraphqlApi ¶
DeleteGraphqlApi removes a GraphQL API.
func (*Store) DeleteResolver ¶
DeleteResolver removes a resolver.
func (*Store) DeleteType ¶
DeleteType removes a type definition.
func (*Store) GetDataSource ¶
func (s *Store) GetDataSource(apiID, name string) (*DataSource, bool)
GetDataSource returns a data source.
func (*Store) GetFunction ¶
GetFunction returns a function by ID.
func (*Store) GetGraphqlApi ¶
func (s *Store) GetGraphqlApi(apiID string) (*GraphqlApi, bool)
GetGraphqlApi returns a GraphQL API by ID.
func (*Store) GetResolver ¶
GetResolver returns a resolver.
func (*Store) GetSchemaCreationStatus ¶
func (s *Store) GetSchemaCreationStatus(apiID string) (*SchemaCreation, bool)
GetSchemaCreationStatus returns the schema creation status for an API.
func (*Store) ListApiKeys ¶
ListApiKeys returns all API keys for an API.
func (*Store) ListDataSources ¶
func (s *Store) ListDataSources(apiID string) ([]*DataSource, bool)
ListDataSources returns all data sources for an API.
func (*Store) ListFunctions ¶
ListFunctions returns all functions for an API.
func (*Store) ListGraphqlApis ¶
func (s *Store) ListGraphqlApis() []*GraphqlApi
ListGraphqlApis returns all GraphQL APIs.
func (*Store) ListResolvers ¶
ListResolvers returns all resolvers for a type.
func (*Store) ListTagsForResource ¶
ListTagsForResource returns tags for an API by ARN.
func (*Store) StartSchemaCreation ¶
StartSchemaCreation begins schema creation for an API.
func (*Store) TagResource ¶
TagResource applies tags to an API by ARN.
func (*Store) UntagResource ¶
UntagResource removes tags from an API by ARN.
func (*Store) UpdateApiKey ¶
UpdateApiKey updates an API key.
func (*Store) UpdateDataSource ¶
func (s *Store) UpdateDataSource(apiID, name, dsType, description, serviceRoleArn string) (*DataSource, bool)
UpdateDataSource updates a data source.
func (*Store) UpdateFunction ¶
func (s *Store) UpdateFunction(apiID, functionID, name, description, dataSourceName, requestTemplate, responseTemplate, code string) (*Function, bool)
UpdateFunction updates a function.
func (*Store) UpdateGraphqlApi ¶
func (s *Store) UpdateGraphqlApi(apiID, name, authType string, xrayEnabled *bool) (*GraphqlApi, bool)
UpdateGraphqlApi updates a GraphQL API.