當前位置: 首頁>>代碼示例>>Golang>>正文


Golang aws.MakeParams函數代碼示例

本文整理匯總了Golang中github.com/AdRoll/goamz/aws.MakeParams函數的典型用法代碼示例。如果您正苦於以下問題:Golang MakeParams函數的具體用法?Golang MakeParams怎麽用?Golang MakeParams使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了MakeParams函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: GetTopicAttributes

// Returns all of the properties of a topic. Topic properties returned might differ based on the authorization of the user.
func (sns *SNS) GetTopicAttributes(topicArn string) (*GetTopicAttributesResponse, error) {
	params := aws.MakeParams("GetTopicAttributes")
	params["TopicArn"] = topicArn

	response := &GetTopicAttributesResponse{}
	err := sns.query("GET", params, response)
	return response, err
}
開發者ID:nalin-humin,項目名稱:goamz,代碼行數:9,代碼來源:sns.go

示例2: DeletePlatformApplication

// Deletes a platform application object for one of the supported push notification services, such as APNS and GCM
func (sns *SNS) DeletePlatformApplication(platformApplicationArn string) (*DeletePlatformApplicationResponse, error) {
	params := aws.MakeParams("DeletePlatformApplication")
	params["PlatformApplicationArn"] = platformApplicationArn

	response := &DeletePlatformApplicationResponse{}
	err := sns.query("POST", params, response)

	return response, err
}
開發者ID:nalin-humin,項目名稱:goamz,代碼行數:10,代碼來源:sns.go

示例3: GetPlatformApplicationAttributes

// Retrieves the attributes of the platform application object for the supported push notification services, such as APNS and GCM
func (sns *SNS) GetPlatformApplicationAttributes(platformApplicationArn string) (*GetPlatformApplicationAttributesResponse, error) {
	params := aws.MakeParams("GetPlatformApplicationAttributes")
	params["PlatformApplicationArn"] = platformApplicationArn

	response := &GetPlatformApplicationAttributesResponse{}
	err := sns.query("GET", params, response)

	return response, err
}
開發者ID:nalin-humin,項目名稱:goamz,代碼行數:10,代碼來源:sns.go

示例4: DeleteTopic

// Deletes a topic and all its subscriptions.
// Deleting a topic might prevent some messages previously sent to the topic from being delivered to subscribers.
// This action is idempotent, so deleting a topic that does not exist does not result in an error.
func (sns *SNS) DeleteTopic(topicArn string) (*DeleteTopicResponse, error) {
	params := aws.MakeParams("DeleteTopic")
	params["TopicArn"] = topicArn

	response := &DeleteTopicResponse{}
	err := sns.query("POST", params, response)

	return response, err
}
開發者ID:nalin-humin,項目名稱:goamz,代碼行數:12,代碼來源:sns.go

示例5: CreateTopic

// Creates a topic to which notifications can be published. Users can create at most 3000 topics.
// This action is idempotent, so if the requester already owns a topic with the specified name, that topic's ARN is returned without creating a new topic.
func (sns *SNS) CreateTopic(name string) (*CreateTopicResponse, error) {
	params := aws.MakeParams("CreateTopic")
	params["Name"] = name

	response := &CreateTopicResponse{}
	err := sns.query("POST", params, response)

	return response, err
}
開發者ID:nalin-humin,項目名稱:goamz,代碼行數:11,代碼來源:sns.go

示例6: GetSubscriptionAttributes

// Returns all of the properties of a subscription.
func (sns *SNS) GetSubscriptionAttributes(subscriptionArn string) (*GetSubscriptionAttributesResponse, error) {
	params := aws.MakeParams("GetSubscriptionAttributes")
	params["SubscriptionArn"] = subscriptionArn

	response := &GetSubscriptionAttributesResponse{}
	err := sns.query("GET", params, response)

	return response, err
}
開發者ID:nalin-humin,項目名稱:goamz,代碼行數:10,代碼來源:sns.go

示例7: Unsubscribe

// Deletes a subscription.
// If the subscription requires authentication for deletion, only the owner of the subscription or the topic's owner can unsubscribe, and an AWS signature is required.
// If the Unsubscribe call does not require authentication and the requester is not the subscription owner, a final cancellation message is delivered to the endpoint, so that the endpoint owner can easily resubscribe to the topic if the Unsubscribe request was unintended.
func (sns *SNS) Unsubscribe(subscriptionArn string) (*UnsubscribeResponse, error) {
	params := aws.MakeParams("Unsubscribe")
	params["SubscriptionArn"] = subscriptionArn

	response := &UnsubscribeResponse{}
	err := sns.query("POST", params, response)

	return response, err
}
開發者ID:nalin-humin,項目名稱:goamz,代碼行數:12,代碼來源:sns.go

示例8: DeleteEndpoint

// Deletes the endpoint from Amazon SNS. This action is idempotent.
func (sns *SNS) DeleteEndpoint(endpointArn string) (*DeleteEndpointResponse, error) {
	params := aws.MakeParams("DeleteEndpoint")
	params["EndpointArn"] = endpointArn

	response := &DeleteEndpointResponse{}
	err := sns.query("POST", params, response)

	return response, err
}
開發者ID:nalin-humin,項目名稱:goamz,代碼行數:10,代碼來源:sns.go

示例9: GetEndpointAttributes

// Retrieves the endpoint attributes for a device on one of the supported push notification services, such as GCM and APNS
func (sns *SNS) GetEndpointAttributes(endpointArn string) (*GetEndpointAttributesResponse, error) {
	params := aws.MakeParams("GetEndpointAttributes")
	params["EndpointArn"] = endpointArn

	response := &GetEndpointAttributesResponse{}
	err := sns.query("GET", params, response)

	return response, err
}
開發者ID:nalin-humin,項目名稱:goamz,代碼行數:10,代碼來源:sns.go

示例10: RemovePermission

// Removes a statement from a topic's access control policy.
func (sns *SNS) RemovePermission(label, topicArn string) (*RemovePermissionResponse, error) {
	params := aws.MakeParams("RemovePermission")
	params["Label"] = label
	params["TopicArn"] = topicArn

	response := &RemovePermissionResponse{}
	err := sns.query("POST", params, response)

	return response, err
}
開發者ID:nalin-humin,項目名稱:goamz,代碼行數:11,代碼來源:sns.go

示例11: ListSubscriptions

// Returns a list of the requester's subscriptions. Each call returns a limited list of subscriptions, up to 100.
// If there are more subscriptions, a NextToken is also returned.
// Use the NextToken parameter in a new ListSubscriptions call to get further results.
func (sns *SNS) ListSubscriptions(nextToken string) (*ListSubscriptionsResponse, error) {
	params := aws.MakeParams("ListSubscriptions")
	if nextToken != "" {
		params["NextToken"] = nextToken
	}

	response := &ListSubscriptionsResponse{}
	err := sns.query("GET", params, response)

	return response, err
}
開發者ID:nalin-humin,項目名稱:goamz,代碼行數:14,代碼來源:sns.go

示例12: ListSubscriptionsByTopic

// Returns a list of the subscriptions to a specific topic.
// Each call returns a limited list of subscriptions, up to 100.
// If there are more subscriptions, a NextToken is also returned.
// Use the NextToken parameter in a new ListSubscriptionsByTopic call to get further results.
func (sns *SNS) ListSubscriptionsByTopic(topicArn, nextToken string) (*ListSubscriptionByTopicResponse, error) {
	params := aws.MakeParams("ListSubscriptionsByTopic")
	params["TopicArn"] = topicArn
	if nextToken != "" {
		params["NextToken"] = nextToken
	}

	response := &ListSubscriptionByTopicResponse{}
	err := sns.query("GET", params, response)

	return response, err
}
開發者ID:nalin-humin,項目名稱:goamz,代碼行數:16,代碼來源:sns.go

示例13: ListMetrics

func (c *CloudWatch) ListMetrics(req *ListMetricsRequest) (result *ListMetricsResponse, err error) {

	// Serialize all the params
	params := aws.MakeParams("ListMetrics")
	if req.Namespace != "" {
		params["Namespace"] = req.Namespace
	}
	if req.MetricName != "" {
		params["MetricName"] = req.MetricName
	}
	if len(req.Dimensions) > 0 {
		for i, d := range req.Dimensions {
			prefix := "Dimensions.member." + strconv.Itoa(i+1)
			params[prefix+".Name"] = d.Name
			if len(d.Value) > 0 {
				params[prefix+".Value"] = d.Value
			}
		}
	}

	result = new(ListMetricsResponse)
	err = c.query("GET", "/", params, &result)
	metrics := result.ListMetricsResult.Metrics
	if result.ListMetricsResult.NextToken != "" {
		for result.ListMetricsResult.NextToken != "" && err == nil {
			params = aws.MakeParams("ListMetrics")
			params["NextToken"] = result.ListMetricsResult.NextToken
			result = new(ListMetricsResponse)
			err = c.query("GET", "/", params, &result)
			if err == nil {
				newslice := make([]Metric, len(metrics)+len(result.ListMetricsResult.Metrics))
				copy(newslice, metrics)
				copy(newslice[len(metrics):], result.ListMetricsResult.Metrics)
				metrics = newslice
			}
		}
		result.ListMetricsResult.Metrics = metrics
	}
	return
}
開發者ID:nalin-humin,項目名稱:goamz,代碼行數:40,代碼來源:cloudwatch.go

示例14: ListEndpointsByPlatformApplication

// Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM and APNS.
// The results for ListEndpointsByPlatformApplication are paginated and return a limited list of endpoints, up to 100.
// If additional records are available after the first page results, then a NextToken string will be returned.
// To receive the next page, you call ListEndpointsByPlatformApplication again using the NextToken string received from the previous call.
// When there are no more records to return, NextToken will be null.
func (sns *SNS) ListEndpointsByPlatformApplication(platformApplicationArn, nextToken string) (*ListEndpointsByPlatformApplicationResponse, error) {
	params := aws.MakeParams("ListEndpointsByPlatformApplication")
	params["PlatformApplicationArn"] = platformApplicationArn

	if nextToken != "" {
		params["NextToken"] = nextToken
	}

	response := &ListEndpointsByPlatformApplicationResponse{}
	err := sns.query("GET", params, response)

	return response, err
}
開發者ID:nalin-humin,項目名稱:goamz,代碼行數:18,代碼來源:sns.go

示例15: SetTopicAttributes

// Sets the attributes for an endpoint for a device on one of the supported push notification services, such as GCM and APNS.
func (sns *SNS) SetTopicAttributes(topicArn, attributeName, attributeValue string) (*SetTopicAttributesResponse, error) {
	params := aws.MakeParams("SetTopicAttributes")
	params["AttributeName"] = attributeName
	params["TopicArn"] = topicArn
	if attributeValue != "" {
		params["AttributeValue"] = attributeValue
	}

	response := &SetTopicAttributesResponse{}
	err := sns.query("POST", params, response)

	return response, err
}
開發者ID:nalin-humin,項目名稱:goamz,代碼行數:14,代碼來源:sns.go


注:本文中的github.com/AdRoll/goamz/aws.MakeParams函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。