github.com/aavshr/aws-sdk-go@v1.41.3/service/prometheusservice/prometheusserviceiface/interface.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 // Package prometheusserviceiface provides an interface to enable mocking the Amazon Prometheus Service service client 4 // for testing your code. 5 // 6 // It is important to note that this interface will have breaking changes 7 // when the service model is updated and adds new API operations, paginators, 8 // and waiters. 9 package prometheusserviceiface 10 11 import ( 12 "github.com/aavshr/aws-sdk-go/aws" 13 "github.com/aavshr/aws-sdk-go/aws/request" 14 "github.com/aavshr/aws-sdk-go/service/prometheusservice" 15 ) 16 17 // PrometheusServiceAPI provides an interface to enable mocking the 18 // prometheusservice.PrometheusService service client's API operation, 19 // paginators, and waiters. This make unit testing your code that calls out 20 // to the SDK's service client's calls easier. 21 // 22 // The best way to use this interface is so the SDK's service client's calls 23 // can be stubbed out for unit testing your code with the SDK without needing 24 // to inject custom request handlers into the SDK's request pipeline. 25 // 26 // // myFunc uses an SDK service client to make a request to 27 // // Amazon Prometheus Service. 28 // func myFunc(svc prometheusserviceiface.PrometheusServiceAPI) bool { 29 // // Make svc.CreateAlertManagerDefinition request 30 // } 31 // 32 // func main() { 33 // sess := session.New() 34 // svc := prometheusservice.New(sess) 35 // 36 // myFunc(svc) 37 // } 38 // 39 // In your _test.go file: 40 // 41 // // Define a mock struct to be used in your unit tests of myFunc. 42 // type mockPrometheusServiceClient struct { 43 // prometheusserviceiface.PrometheusServiceAPI 44 // } 45 // func (m *mockPrometheusServiceClient) CreateAlertManagerDefinition(input *prometheusservice.CreateAlertManagerDefinitionInput) (*prometheusservice.CreateAlertManagerDefinitionOutput, error) { 46 // // mock response/functionality 47 // } 48 // 49 // func TestMyFunc(t *testing.T) { 50 // // Setup Test 51 // mockSvc := &mockPrometheusServiceClient{} 52 // 53 // myfunc(mockSvc) 54 // 55 // // Verify myFunc's functionality 56 // } 57 // 58 // It is important to note that this interface will have breaking changes 59 // when the service model is updated and adds new API operations, paginators, 60 // and waiters. Its suggested to use the pattern above for testing, or using 61 // tooling to generate mocks to satisfy the interfaces. 62 type PrometheusServiceAPI interface { 63 CreateAlertManagerDefinition(*prometheusservice.CreateAlertManagerDefinitionInput) (*prometheusservice.CreateAlertManagerDefinitionOutput, error) 64 CreateAlertManagerDefinitionWithContext(aws.Context, *prometheusservice.CreateAlertManagerDefinitionInput, ...request.Option) (*prometheusservice.CreateAlertManagerDefinitionOutput, error) 65 CreateAlertManagerDefinitionRequest(*prometheusservice.CreateAlertManagerDefinitionInput) (*request.Request, *prometheusservice.CreateAlertManagerDefinitionOutput) 66 67 CreateRuleGroupsNamespace(*prometheusservice.CreateRuleGroupsNamespaceInput) (*prometheusservice.CreateRuleGroupsNamespaceOutput, error) 68 CreateRuleGroupsNamespaceWithContext(aws.Context, *prometheusservice.CreateRuleGroupsNamespaceInput, ...request.Option) (*prometheusservice.CreateRuleGroupsNamespaceOutput, error) 69 CreateRuleGroupsNamespaceRequest(*prometheusservice.CreateRuleGroupsNamespaceInput) (*request.Request, *prometheusservice.CreateRuleGroupsNamespaceOutput) 70 71 CreateWorkspace(*prometheusservice.CreateWorkspaceInput) (*prometheusservice.CreateWorkspaceOutput, error) 72 CreateWorkspaceWithContext(aws.Context, *prometheusservice.CreateWorkspaceInput, ...request.Option) (*prometheusservice.CreateWorkspaceOutput, error) 73 CreateWorkspaceRequest(*prometheusservice.CreateWorkspaceInput) (*request.Request, *prometheusservice.CreateWorkspaceOutput) 74 75 DeleteAlertManagerDefinition(*prometheusservice.DeleteAlertManagerDefinitionInput) (*prometheusservice.DeleteAlertManagerDefinitionOutput, error) 76 DeleteAlertManagerDefinitionWithContext(aws.Context, *prometheusservice.DeleteAlertManagerDefinitionInput, ...request.Option) (*prometheusservice.DeleteAlertManagerDefinitionOutput, error) 77 DeleteAlertManagerDefinitionRequest(*prometheusservice.DeleteAlertManagerDefinitionInput) (*request.Request, *prometheusservice.DeleteAlertManagerDefinitionOutput) 78 79 DeleteRuleGroupsNamespace(*prometheusservice.DeleteRuleGroupsNamespaceInput) (*prometheusservice.DeleteRuleGroupsNamespaceOutput, error) 80 DeleteRuleGroupsNamespaceWithContext(aws.Context, *prometheusservice.DeleteRuleGroupsNamespaceInput, ...request.Option) (*prometheusservice.DeleteRuleGroupsNamespaceOutput, error) 81 DeleteRuleGroupsNamespaceRequest(*prometheusservice.DeleteRuleGroupsNamespaceInput) (*request.Request, *prometheusservice.DeleteRuleGroupsNamespaceOutput) 82 83 DeleteWorkspace(*prometheusservice.DeleteWorkspaceInput) (*prometheusservice.DeleteWorkspaceOutput, error) 84 DeleteWorkspaceWithContext(aws.Context, *prometheusservice.DeleteWorkspaceInput, ...request.Option) (*prometheusservice.DeleteWorkspaceOutput, error) 85 DeleteWorkspaceRequest(*prometheusservice.DeleteWorkspaceInput) (*request.Request, *prometheusservice.DeleteWorkspaceOutput) 86 87 DescribeAlertManagerDefinition(*prometheusservice.DescribeAlertManagerDefinitionInput) (*prometheusservice.DescribeAlertManagerDefinitionOutput, error) 88 DescribeAlertManagerDefinitionWithContext(aws.Context, *prometheusservice.DescribeAlertManagerDefinitionInput, ...request.Option) (*prometheusservice.DescribeAlertManagerDefinitionOutput, error) 89 DescribeAlertManagerDefinitionRequest(*prometheusservice.DescribeAlertManagerDefinitionInput) (*request.Request, *prometheusservice.DescribeAlertManagerDefinitionOutput) 90 91 DescribeRuleGroupsNamespace(*prometheusservice.DescribeRuleGroupsNamespaceInput) (*prometheusservice.DescribeRuleGroupsNamespaceOutput, error) 92 DescribeRuleGroupsNamespaceWithContext(aws.Context, *prometheusservice.DescribeRuleGroupsNamespaceInput, ...request.Option) (*prometheusservice.DescribeRuleGroupsNamespaceOutput, error) 93 DescribeRuleGroupsNamespaceRequest(*prometheusservice.DescribeRuleGroupsNamespaceInput) (*request.Request, *prometheusservice.DescribeRuleGroupsNamespaceOutput) 94 95 DescribeWorkspace(*prometheusservice.DescribeWorkspaceInput) (*prometheusservice.DescribeWorkspaceOutput, error) 96 DescribeWorkspaceWithContext(aws.Context, *prometheusservice.DescribeWorkspaceInput, ...request.Option) (*prometheusservice.DescribeWorkspaceOutput, error) 97 DescribeWorkspaceRequest(*prometheusservice.DescribeWorkspaceInput) (*request.Request, *prometheusservice.DescribeWorkspaceOutput) 98 99 ListRuleGroupsNamespaces(*prometheusservice.ListRuleGroupsNamespacesInput) (*prometheusservice.ListRuleGroupsNamespacesOutput, error) 100 ListRuleGroupsNamespacesWithContext(aws.Context, *prometheusservice.ListRuleGroupsNamespacesInput, ...request.Option) (*prometheusservice.ListRuleGroupsNamespacesOutput, error) 101 ListRuleGroupsNamespacesRequest(*prometheusservice.ListRuleGroupsNamespacesInput) (*request.Request, *prometheusservice.ListRuleGroupsNamespacesOutput) 102 103 ListRuleGroupsNamespacesPages(*prometheusservice.ListRuleGroupsNamespacesInput, func(*prometheusservice.ListRuleGroupsNamespacesOutput, bool) bool) error 104 ListRuleGroupsNamespacesPagesWithContext(aws.Context, *prometheusservice.ListRuleGroupsNamespacesInput, func(*prometheusservice.ListRuleGroupsNamespacesOutput, bool) bool, ...request.Option) error 105 106 ListTagsForResource(*prometheusservice.ListTagsForResourceInput) (*prometheusservice.ListTagsForResourceOutput, error) 107 ListTagsForResourceWithContext(aws.Context, *prometheusservice.ListTagsForResourceInput, ...request.Option) (*prometheusservice.ListTagsForResourceOutput, error) 108 ListTagsForResourceRequest(*prometheusservice.ListTagsForResourceInput) (*request.Request, *prometheusservice.ListTagsForResourceOutput) 109 110 ListWorkspaces(*prometheusservice.ListWorkspacesInput) (*prometheusservice.ListWorkspacesOutput, error) 111 ListWorkspacesWithContext(aws.Context, *prometheusservice.ListWorkspacesInput, ...request.Option) (*prometheusservice.ListWorkspacesOutput, error) 112 ListWorkspacesRequest(*prometheusservice.ListWorkspacesInput) (*request.Request, *prometheusservice.ListWorkspacesOutput) 113 114 ListWorkspacesPages(*prometheusservice.ListWorkspacesInput, func(*prometheusservice.ListWorkspacesOutput, bool) bool) error 115 ListWorkspacesPagesWithContext(aws.Context, *prometheusservice.ListWorkspacesInput, func(*prometheusservice.ListWorkspacesOutput, bool) bool, ...request.Option) error 116 117 PutAlertManagerDefinition(*prometheusservice.PutAlertManagerDefinitionInput) (*prometheusservice.PutAlertManagerDefinitionOutput, error) 118 PutAlertManagerDefinitionWithContext(aws.Context, *prometheusservice.PutAlertManagerDefinitionInput, ...request.Option) (*prometheusservice.PutAlertManagerDefinitionOutput, error) 119 PutAlertManagerDefinitionRequest(*prometheusservice.PutAlertManagerDefinitionInput) (*request.Request, *prometheusservice.PutAlertManagerDefinitionOutput) 120 121 PutRuleGroupsNamespace(*prometheusservice.PutRuleGroupsNamespaceInput) (*prometheusservice.PutRuleGroupsNamespaceOutput, error) 122 PutRuleGroupsNamespaceWithContext(aws.Context, *prometheusservice.PutRuleGroupsNamespaceInput, ...request.Option) (*prometheusservice.PutRuleGroupsNamespaceOutput, error) 123 PutRuleGroupsNamespaceRequest(*prometheusservice.PutRuleGroupsNamespaceInput) (*request.Request, *prometheusservice.PutRuleGroupsNamespaceOutput) 124 125 TagResource(*prometheusservice.TagResourceInput) (*prometheusservice.TagResourceOutput, error) 126 TagResourceWithContext(aws.Context, *prometheusservice.TagResourceInput, ...request.Option) (*prometheusservice.TagResourceOutput, error) 127 TagResourceRequest(*prometheusservice.TagResourceInput) (*request.Request, *prometheusservice.TagResourceOutput) 128 129 UntagResource(*prometheusservice.UntagResourceInput) (*prometheusservice.UntagResourceOutput, error) 130 UntagResourceWithContext(aws.Context, *prometheusservice.UntagResourceInput, ...request.Option) (*prometheusservice.UntagResourceOutput, error) 131 UntagResourceRequest(*prometheusservice.UntagResourceInput) (*request.Request, *prometheusservice.UntagResourceOutput) 132 133 UpdateWorkspaceAlias(*prometheusservice.UpdateWorkspaceAliasInput) (*prometheusservice.UpdateWorkspaceAliasOutput, error) 134 UpdateWorkspaceAliasWithContext(aws.Context, *prometheusservice.UpdateWorkspaceAliasInput, ...request.Option) (*prometheusservice.UpdateWorkspaceAliasOutput, error) 135 UpdateWorkspaceAliasRequest(*prometheusservice.UpdateWorkspaceAliasInput) (*request.Request, *prometheusservice.UpdateWorkspaceAliasOutput) 136 137 WaitUntilWorkspaceActive(*prometheusservice.DescribeWorkspaceInput) error 138 WaitUntilWorkspaceActiveWithContext(aws.Context, *prometheusservice.DescribeWorkspaceInput, ...request.WaiterOption) error 139 140 WaitUntilWorkspaceDeleted(*prometheusservice.DescribeWorkspaceInput) error 141 WaitUntilWorkspaceDeletedWithContext(aws.Context, *prometheusservice.DescribeWorkspaceInput, ...request.WaiterOption) error 142 } 143 144 var _ PrometheusServiceAPI = (*prometheusservice.PrometheusService)(nil)