mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
glide update
This commit is contained in:
2281
vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go
generated
vendored
Normal file
2281
vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
86
vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/cognitoidentityiface/interface.go
generated
vendored
Normal file
86
vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/cognitoidentityiface/interface.go
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
// Package cognitoidentityiface provides an interface for the Amazon Cognito Identity.
|
||||
package cognitoidentityiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/cognitoidentity"
|
||||
)
|
||||
|
||||
// CognitoIdentityAPI is the interface type for cognitoidentity.CognitoIdentity.
|
||||
type CognitoIdentityAPI interface {
|
||||
CreateIdentityPoolRequest(*cognitoidentity.CreateIdentityPoolInput) (*request.Request, *cognitoidentity.IdentityPool)
|
||||
|
||||
CreateIdentityPool(*cognitoidentity.CreateIdentityPoolInput) (*cognitoidentity.IdentityPool, error)
|
||||
|
||||
DeleteIdentitiesRequest(*cognitoidentity.DeleteIdentitiesInput) (*request.Request, *cognitoidentity.DeleteIdentitiesOutput)
|
||||
|
||||
DeleteIdentities(*cognitoidentity.DeleteIdentitiesInput) (*cognitoidentity.DeleteIdentitiesOutput, error)
|
||||
|
||||
DeleteIdentityPoolRequest(*cognitoidentity.DeleteIdentityPoolInput) (*request.Request, *cognitoidentity.DeleteIdentityPoolOutput)
|
||||
|
||||
DeleteIdentityPool(*cognitoidentity.DeleteIdentityPoolInput) (*cognitoidentity.DeleteIdentityPoolOutput, error)
|
||||
|
||||
DescribeIdentityRequest(*cognitoidentity.DescribeIdentityInput) (*request.Request, *cognitoidentity.IdentityDescription)
|
||||
|
||||
DescribeIdentity(*cognitoidentity.DescribeIdentityInput) (*cognitoidentity.IdentityDescription, error)
|
||||
|
||||
DescribeIdentityPoolRequest(*cognitoidentity.DescribeIdentityPoolInput) (*request.Request, *cognitoidentity.IdentityPool)
|
||||
|
||||
DescribeIdentityPool(*cognitoidentity.DescribeIdentityPoolInput) (*cognitoidentity.IdentityPool, error)
|
||||
|
||||
GetCredentialsForIdentityRequest(*cognitoidentity.GetCredentialsForIdentityInput) (*request.Request, *cognitoidentity.GetCredentialsForIdentityOutput)
|
||||
|
||||
GetCredentialsForIdentity(*cognitoidentity.GetCredentialsForIdentityInput) (*cognitoidentity.GetCredentialsForIdentityOutput, error)
|
||||
|
||||
GetIdRequest(*cognitoidentity.GetIdInput) (*request.Request, *cognitoidentity.GetIdOutput)
|
||||
|
||||
GetId(*cognitoidentity.GetIdInput) (*cognitoidentity.GetIdOutput, error)
|
||||
|
||||
GetIdentityPoolRolesRequest(*cognitoidentity.GetIdentityPoolRolesInput) (*request.Request, *cognitoidentity.GetIdentityPoolRolesOutput)
|
||||
|
||||
GetIdentityPoolRoles(*cognitoidentity.GetIdentityPoolRolesInput) (*cognitoidentity.GetIdentityPoolRolesOutput, error)
|
||||
|
||||
GetOpenIdTokenRequest(*cognitoidentity.GetOpenIdTokenInput) (*request.Request, *cognitoidentity.GetOpenIdTokenOutput)
|
||||
|
||||
GetOpenIdToken(*cognitoidentity.GetOpenIdTokenInput) (*cognitoidentity.GetOpenIdTokenOutput, error)
|
||||
|
||||
GetOpenIdTokenForDeveloperIdentityRequest(*cognitoidentity.GetOpenIdTokenForDeveloperIdentityInput) (*request.Request, *cognitoidentity.GetOpenIdTokenForDeveloperIdentityOutput)
|
||||
|
||||
GetOpenIdTokenForDeveloperIdentity(*cognitoidentity.GetOpenIdTokenForDeveloperIdentityInput) (*cognitoidentity.GetOpenIdTokenForDeveloperIdentityOutput, error)
|
||||
|
||||
ListIdentitiesRequest(*cognitoidentity.ListIdentitiesInput) (*request.Request, *cognitoidentity.ListIdentitiesOutput)
|
||||
|
||||
ListIdentities(*cognitoidentity.ListIdentitiesInput) (*cognitoidentity.ListIdentitiesOutput, error)
|
||||
|
||||
ListIdentityPoolsRequest(*cognitoidentity.ListIdentityPoolsInput) (*request.Request, *cognitoidentity.ListIdentityPoolsOutput)
|
||||
|
||||
ListIdentityPools(*cognitoidentity.ListIdentityPoolsInput) (*cognitoidentity.ListIdentityPoolsOutput, error)
|
||||
|
||||
LookupDeveloperIdentityRequest(*cognitoidentity.LookupDeveloperIdentityInput) (*request.Request, *cognitoidentity.LookupDeveloperIdentityOutput)
|
||||
|
||||
LookupDeveloperIdentity(*cognitoidentity.LookupDeveloperIdentityInput) (*cognitoidentity.LookupDeveloperIdentityOutput, error)
|
||||
|
||||
MergeDeveloperIdentitiesRequest(*cognitoidentity.MergeDeveloperIdentitiesInput) (*request.Request, *cognitoidentity.MergeDeveloperIdentitiesOutput)
|
||||
|
||||
MergeDeveloperIdentities(*cognitoidentity.MergeDeveloperIdentitiesInput) (*cognitoidentity.MergeDeveloperIdentitiesOutput, error)
|
||||
|
||||
SetIdentityPoolRolesRequest(*cognitoidentity.SetIdentityPoolRolesInput) (*request.Request, *cognitoidentity.SetIdentityPoolRolesOutput)
|
||||
|
||||
SetIdentityPoolRoles(*cognitoidentity.SetIdentityPoolRolesInput) (*cognitoidentity.SetIdentityPoolRolesOutput, error)
|
||||
|
||||
UnlinkDeveloperIdentityRequest(*cognitoidentity.UnlinkDeveloperIdentityInput) (*request.Request, *cognitoidentity.UnlinkDeveloperIdentityOutput)
|
||||
|
||||
UnlinkDeveloperIdentity(*cognitoidentity.UnlinkDeveloperIdentityInput) (*cognitoidentity.UnlinkDeveloperIdentityOutput, error)
|
||||
|
||||
UnlinkIdentityRequest(*cognitoidentity.UnlinkIdentityInput) (*request.Request, *cognitoidentity.UnlinkIdentityOutput)
|
||||
|
||||
UnlinkIdentity(*cognitoidentity.UnlinkIdentityInput) (*cognitoidentity.UnlinkIdentityOutput, error)
|
||||
|
||||
UpdateIdentityPoolRequest(*cognitoidentity.IdentityPool) (*request.Request, *cognitoidentity.IdentityPool)
|
||||
|
||||
UpdateIdentityPool(*cognitoidentity.IdentityPool) (*cognitoidentity.IdentityPool, error)
|
||||
}
|
||||
|
||||
var _ CognitoIdentityAPI = (*cognitoidentity.CognitoIdentity)(nil)
|
||||
12
vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/customizations.go
generated
vendored
Normal file
12
vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/customizations.go
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
package cognitoidentity
|
||||
|
||||
import "github.com/aws/aws-sdk-go/aws/request"
|
||||
|
||||
func init() {
|
||||
initRequest = func(r *request.Request) {
|
||||
switch r.Operation.Name {
|
||||
case opGetOpenIdToken, opGetId, opGetCredentialsForIdentity:
|
||||
r.Handlers.Sign.Clear() // these operations are unsigned
|
||||
}
|
||||
}
|
||||
}
|
||||
42
vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/customizations_test.go
generated
vendored
Normal file
42
vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/customizations_test.go
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
package cognitoidentity_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/awstesting/unit"
|
||||
"github.com/aws/aws-sdk-go/service/cognitoidentity"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var svc = cognitoidentity.New(unit.Session)
|
||||
|
||||
func TestUnsignedRequest_GetID(t *testing.T) {
|
||||
req, _ := svc.GetIdRequest(&cognitoidentity.GetIdInput{
|
||||
IdentityPoolId: aws.String("IdentityPoolId"),
|
||||
})
|
||||
|
||||
err := req.Sign()
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "", req.HTTPRequest.Header.Get("Authorization"))
|
||||
}
|
||||
|
||||
func TestUnsignedRequest_GetOpenIDToken(t *testing.T) {
|
||||
req, _ := svc.GetOpenIdTokenRequest(&cognitoidentity.GetOpenIdTokenInput{
|
||||
IdentityId: aws.String("IdentityId"),
|
||||
})
|
||||
|
||||
err := req.Sign()
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "", req.HTTPRequest.Header.Get("Authorization"))
|
||||
}
|
||||
|
||||
func TestUnsignedRequest_GetCredentialsForIdentity(t *testing.T) {
|
||||
req, _ := svc.GetCredentialsForIdentityRequest(&cognitoidentity.GetCredentialsForIdentityInput{
|
||||
IdentityId: aws.String("IdentityId"),
|
||||
})
|
||||
|
||||
err := req.Sign()
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "", req.HTTPRequest.Header.Get("Authorization"))
|
||||
}
|
||||
450
vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/examples_test.go
generated
vendored
Normal file
450
vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/examples_test.go
generated
vendored
Normal file
@@ -0,0 +1,450 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package cognitoidentity_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/cognitoidentity"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleCognitoIdentity_CreateIdentityPool() {
|
||||
svc := cognitoidentity.New(session.New())
|
||||
|
||||
params := &cognitoidentity.CreateIdentityPoolInput{
|
||||
AllowUnauthenticatedIdentities: aws.Bool(true), // Required
|
||||
IdentityPoolName: aws.String("IdentityPoolName"), // Required
|
||||
CognitoIdentityProviders: []*cognitoidentity.Provider{
|
||||
{ // Required
|
||||
ClientId: aws.String("ProviderClientId"),
|
||||
ProviderName: aws.String("ProviderName"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
DeveloperProviderName: aws.String("DeveloperProviderName"),
|
||||
OpenIdConnectProviderARNs: []*string{
|
||||
aws.String("ARNString"), // Required
|
||||
// More values...
|
||||
},
|
||||
SamlProviderARNs: []*string{
|
||||
aws.String("ARNString"), // Required
|
||||
// More values...
|
||||
},
|
||||
SupportedLoginProviders: map[string]*string{
|
||||
"Key": aws.String("IdentityProviderId"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.CreateIdentityPool(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCognitoIdentity_DeleteIdentities() {
|
||||
svc := cognitoidentity.New(session.New())
|
||||
|
||||
params := &cognitoidentity.DeleteIdentitiesInput{
|
||||
IdentityIdsToDelete: []*string{ // Required
|
||||
aws.String("IdentityId"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DeleteIdentities(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCognitoIdentity_DeleteIdentityPool() {
|
||||
svc := cognitoidentity.New(session.New())
|
||||
|
||||
params := &cognitoidentity.DeleteIdentityPoolInput{
|
||||
IdentityPoolId: aws.String("IdentityPoolId"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteIdentityPool(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCognitoIdentity_DescribeIdentity() {
|
||||
svc := cognitoidentity.New(session.New())
|
||||
|
||||
params := &cognitoidentity.DescribeIdentityInput{
|
||||
IdentityId: aws.String("IdentityId"), // Required
|
||||
}
|
||||
resp, err := svc.DescribeIdentity(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCognitoIdentity_DescribeIdentityPool() {
|
||||
svc := cognitoidentity.New(session.New())
|
||||
|
||||
params := &cognitoidentity.DescribeIdentityPoolInput{
|
||||
IdentityPoolId: aws.String("IdentityPoolId"), // Required
|
||||
}
|
||||
resp, err := svc.DescribeIdentityPool(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCognitoIdentity_GetCredentialsForIdentity() {
|
||||
svc := cognitoidentity.New(session.New())
|
||||
|
||||
params := &cognitoidentity.GetCredentialsForIdentityInput{
|
||||
IdentityId: aws.String("IdentityId"), // Required
|
||||
CustomRoleArn: aws.String("ARNString"),
|
||||
Logins: map[string]*string{
|
||||
"Key": aws.String("IdentityProviderToken"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.GetCredentialsForIdentity(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCognitoIdentity_GetId() {
|
||||
svc := cognitoidentity.New(session.New())
|
||||
|
||||
params := &cognitoidentity.GetIdInput{
|
||||
IdentityPoolId: aws.String("IdentityPoolId"), // Required
|
||||
AccountId: aws.String("AccountId"),
|
||||
Logins: map[string]*string{
|
||||
"Key": aws.String("IdentityProviderToken"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.GetId(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCognitoIdentity_GetIdentityPoolRoles() {
|
||||
svc := cognitoidentity.New(session.New())
|
||||
|
||||
params := &cognitoidentity.GetIdentityPoolRolesInput{
|
||||
IdentityPoolId: aws.String("IdentityPoolId"), // Required
|
||||
}
|
||||
resp, err := svc.GetIdentityPoolRoles(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCognitoIdentity_GetOpenIdToken() {
|
||||
svc := cognitoidentity.New(session.New())
|
||||
|
||||
params := &cognitoidentity.GetOpenIdTokenInput{
|
||||
IdentityId: aws.String("IdentityId"), // Required
|
||||
Logins: map[string]*string{
|
||||
"Key": aws.String("IdentityProviderToken"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.GetOpenIdToken(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCognitoIdentity_GetOpenIdTokenForDeveloperIdentity() {
|
||||
svc := cognitoidentity.New(session.New())
|
||||
|
||||
params := &cognitoidentity.GetOpenIdTokenForDeveloperIdentityInput{
|
||||
IdentityPoolId: aws.String("IdentityPoolId"), // Required
|
||||
Logins: map[string]*string{ // Required
|
||||
"Key": aws.String("IdentityProviderToken"), // Required
|
||||
// More values...
|
||||
},
|
||||
IdentityId: aws.String("IdentityId"),
|
||||
TokenDuration: aws.Int64(1),
|
||||
}
|
||||
resp, err := svc.GetOpenIdTokenForDeveloperIdentity(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCognitoIdentity_ListIdentities() {
|
||||
svc := cognitoidentity.New(session.New())
|
||||
|
||||
params := &cognitoidentity.ListIdentitiesInput{
|
||||
IdentityPoolId: aws.String("IdentityPoolId"), // Required
|
||||
MaxResults: aws.Int64(1), // Required
|
||||
HideDisabled: aws.Bool(true),
|
||||
NextToken: aws.String("PaginationKey"),
|
||||
}
|
||||
resp, err := svc.ListIdentities(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCognitoIdentity_ListIdentityPools() {
|
||||
svc := cognitoidentity.New(session.New())
|
||||
|
||||
params := &cognitoidentity.ListIdentityPoolsInput{
|
||||
MaxResults: aws.Int64(1), // Required
|
||||
NextToken: aws.String("PaginationKey"),
|
||||
}
|
||||
resp, err := svc.ListIdentityPools(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCognitoIdentity_LookupDeveloperIdentity() {
|
||||
svc := cognitoidentity.New(session.New())
|
||||
|
||||
params := &cognitoidentity.LookupDeveloperIdentityInput{
|
||||
IdentityPoolId: aws.String("IdentityPoolId"), // Required
|
||||
DeveloperUserIdentifier: aws.String("DeveloperUserIdentifier"),
|
||||
IdentityId: aws.String("IdentityId"),
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("PaginationKey"),
|
||||
}
|
||||
resp, err := svc.LookupDeveloperIdentity(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCognitoIdentity_MergeDeveloperIdentities() {
|
||||
svc := cognitoidentity.New(session.New())
|
||||
|
||||
params := &cognitoidentity.MergeDeveloperIdentitiesInput{
|
||||
DestinationUserIdentifier: aws.String("DeveloperUserIdentifier"), // Required
|
||||
DeveloperProviderName: aws.String("DeveloperProviderName"), // Required
|
||||
IdentityPoolId: aws.String("IdentityPoolId"), // Required
|
||||
SourceUserIdentifier: aws.String("DeveloperUserIdentifier"), // Required
|
||||
}
|
||||
resp, err := svc.MergeDeveloperIdentities(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCognitoIdentity_SetIdentityPoolRoles() {
|
||||
svc := cognitoidentity.New(session.New())
|
||||
|
||||
params := &cognitoidentity.SetIdentityPoolRolesInput{
|
||||
IdentityPoolId: aws.String("IdentityPoolId"), // Required
|
||||
Roles: map[string]*string{ // Required
|
||||
"Key": aws.String("ARNString"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.SetIdentityPoolRoles(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCognitoIdentity_UnlinkDeveloperIdentity() {
|
||||
svc := cognitoidentity.New(session.New())
|
||||
|
||||
params := &cognitoidentity.UnlinkDeveloperIdentityInput{
|
||||
DeveloperProviderName: aws.String("DeveloperProviderName"), // Required
|
||||
DeveloperUserIdentifier: aws.String("DeveloperUserIdentifier"), // Required
|
||||
IdentityId: aws.String("IdentityId"), // Required
|
||||
IdentityPoolId: aws.String("IdentityPoolId"), // Required
|
||||
}
|
||||
resp, err := svc.UnlinkDeveloperIdentity(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCognitoIdentity_UnlinkIdentity() {
|
||||
svc := cognitoidentity.New(session.New())
|
||||
|
||||
params := &cognitoidentity.UnlinkIdentityInput{
|
||||
IdentityId: aws.String("IdentityId"), // Required
|
||||
Logins: map[string]*string{ // Required
|
||||
"Key": aws.String("IdentityProviderToken"), // Required
|
||||
// More values...
|
||||
},
|
||||
LoginsToRemove: []*string{ // Required
|
||||
aws.String("IdentityProviderName"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.UnlinkIdentity(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleCognitoIdentity_UpdateIdentityPool() {
|
||||
svc := cognitoidentity.New(session.New())
|
||||
|
||||
params := &cognitoidentity.IdentityPool{
|
||||
AllowUnauthenticatedIdentities: aws.Bool(true), // Required
|
||||
IdentityPoolId: aws.String("IdentityPoolId"), // Required
|
||||
IdentityPoolName: aws.String("IdentityPoolName"), // Required
|
||||
CognitoIdentityProviders: []*cognitoidentity.Provider{
|
||||
{ // Required
|
||||
ClientId: aws.String("ProviderClientId"),
|
||||
ProviderName: aws.String("ProviderName"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
DeveloperProviderName: aws.String("DeveloperProviderName"),
|
||||
OpenIdConnectProviderARNs: []*string{
|
||||
aws.String("ARNString"), // Required
|
||||
// More values...
|
||||
},
|
||||
SamlProviderARNs: []*string{
|
||||
aws.String("ARNString"), // Required
|
||||
// More values...
|
||||
},
|
||||
SupportedLoginProviders: map[string]*string{
|
||||
"Key": aws.String("IdentityProviderId"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.UpdateIdentityPool(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
119
vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/service.go
generated
vendored
Normal file
119
vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/service.go
generated
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package cognitoidentity
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/client"
|
||||
"github.com/aws/aws-sdk-go/aws/client/metadata"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
|
||||
)
|
||||
|
||||
// Amazon Cognito is a web service that delivers scoped temporary credentials
|
||||
// to mobile devices and other untrusted environments. Amazon Cognito uniquely
|
||||
// identifies a device and supplies the user with a consistent identity over
|
||||
// the lifetime of an application.
|
||||
//
|
||||
// Using Amazon Cognito, you can enable authentication with one or more third-party
|
||||
// identity providers (Facebook, Google, or Login with Amazon), and you can
|
||||
// also choose to support unauthenticated access from your app. Cognito delivers
|
||||
// a unique identifier for each user and acts as an OpenID token provider trusted
|
||||
// by AWS Security Token Service (STS) to access temporary, limited-privilege
|
||||
// AWS credentials.
|
||||
//
|
||||
// To provide end-user credentials, first make an unsigned call to GetId. If
|
||||
// the end user is authenticated with one of the supported identity providers,
|
||||
// set the Logins map with the identity provider token. GetId returns a unique
|
||||
// identifier for the user.
|
||||
//
|
||||
// Next, make an unsigned call to GetCredentialsForIdentity. This call expects
|
||||
// the same Logins map as the GetId call, as well as the IdentityID originally
|
||||
// returned by GetId. Assuming your identity pool has been configured via the
|
||||
// SetIdentityPoolRoles operation, GetCredentialsForIdentity will return AWS
|
||||
// credentials for your use. If your pool has not been configured with SetIdentityPoolRoles,
|
||||
// or if you want to follow legacy flow, make an unsigned call to GetOpenIdToken,
|
||||
// which returns the OpenID token necessary to call STS and retrieve AWS credentials.
|
||||
// This call expects the same Logins map as the GetId call, as well as the IdentityID
|
||||
// originally returned by GetId. The token returned by GetOpenIdToken can be
|
||||
// passed to the STS operation AssumeRoleWithWebIdentity (http://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html)
|
||||
// to retrieve AWS credentials.
|
||||
//
|
||||
// If you want to use Amazon Cognito in an Android, iOS, or Unity application,
|
||||
// you will probably want to make API calls via the AWS Mobile SDK. To learn
|
||||
// more, see the AWS Mobile SDK Developer Guide (http://docs.aws.amazon.com/mobile/index.html).
|
||||
//The service client's operations are safe to be used concurrently.
|
||||
// It is not safe to mutate any of the client's properties though.
|
||||
type CognitoIdentity struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
// Used for custom client initialization logic
|
||||
var initClient func(*client.Client)
|
||||
|
||||
// Used for custom request initialization logic
|
||||
var initRequest func(*request.Request)
|
||||
|
||||
// A ServiceName is the name of the service the client will make API calls to.
|
||||
const ServiceName = "cognito-identity"
|
||||
|
||||
// New creates a new instance of the CognitoIdentity client with a session.
|
||||
// If additional configuration is needed for the client instance use the optional
|
||||
// aws.Config parameter to add your extra config.
|
||||
//
|
||||
// Example:
|
||||
// // Create a CognitoIdentity client from just a session.
|
||||
// svc := cognitoidentity.New(mySession)
|
||||
//
|
||||
// // Create a CognitoIdentity client with additional configuration
|
||||
// svc := cognitoidentity.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CognitoIdentity {
|
||||
c := p.ClientConfig(ServiceName, cfgs...)
|
||||
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
|
||||
}
|
||||
|
||||
// newClient creates, initializes and returns a new service client instance.
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string) *CognitoIdentity {
|
||||
svc := &CognitoIdentity{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2014-06-30",
|
||||
JSONVersion: "1.1",
|
||||
TargetPrefix: "AWSCognitoIdentityService",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a CognitoIdentity operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *CognitoIdentity) newRequest(op *request.Operation, params, data interface{}) *request.Request {
|
||||
req := c.NewRequest(op, params, data)
|
||||
|
||||
// Run custom request initialization if present
|
||||
if initRequest != nil {
|
||||
initRequest(req)
|
||||
}
|
||||
|
||||
return req
|
||||
}
|
||||
Reference in New Issue
Block a user