cognitosync

package
Version: v0.0.0-...-d0813e5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2015 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package cognitosync provides a client for Amazon Cognito Sync.

Index

Constants

View Source
const (
	OperationRemove  = "remove"
	OperationReplace = "replace"
)

Possible values for CognitoSync.

View Source
const (
	PlatformADM         = "ADM"
	PlatformAPNS        = "APNS"
	PlatformAPNSSandbox = "APNS_SANDBOX"
	PlatformGCM         = "GCM"
)

Possible values for CognitoSync.

Variables

This section is empty.

Functions

This section is empty.

Types

type CognitoSync

type CognitoSync struct {
	// contains filtered or unexported fields
}

CognitoSync is a client for Amazon Cognito Sync.

func New

func New(creds aws.CredentialsProvider, region string, client *http.Client) *CognitoSync

New returns a new CognitoSync client.

func (*CognitoSync) DeleteDataset

func (c *CognitoSync) DeleteDataset(req *DeleteDatasetRequest) (resp *DeleteDatasetResponse, err error)

DeleteDataset deletes the specific dataset. The dataset will be deleted permanently, and the action can't be undone. Datasets that this dataset was merged with will no longer report the merge. Any consequent operation on this dataset will result in a ResourceNotFoundException.

func (*CognitoSync) DescribeDataset

func (c *CognitoSync) DescribeDataset(req *DescribeDatasetRequest) (resp *DescribeDatasetResponse, err error)

DescribeDataset gets metadata about a dataset by identity and dataset name. The credentials used to make this API call need to have access to the identity data. With Amazon Cognito Sync, each identity has access only to its own data. You should use Amazon Cognito Identity service to retrieve the credentials necessary to make this API call.

func (*CognitoSync) DescribeIdentityPoolUsage

func (c *CognitoSync) DescribeIdentityPoolUsage(req *DescribeIdentityPoolUsageRequest) (resp *DescribeIdentityPoolUsageResponse, err error)

DescribeIdentityPoolUsage gets usage details (for example, data storage) about a particular identity pool.

func (*CognitoSync) DescribeIdentityUsage

func (c *CognitoSync) DescribeIdentityUsage(req *DescribeIdentityUsageRequest) (resp *DescribeIdentityUsageResponse, err error)

DescribeIdentityUsage gets usage information for an identity, including number of datasets and data usage.

func (*CognitoSync) GetIdentityPoolConfiguration

func (c *CognitoSync) GetIdentityPoolConfiguration(req *GetIdentityPoolConfigurationRequest) (resp *GetIdentityPoolConfigurationResponse, err error)

GetIdentityPoolConfiguration gets the configuration settings of an identity pool.

func (*CognitoSync) ListDatasets

func (c *CognitoSync) ListDatasets(req *ListDatasetsRequest) (resp *ListDatasetsResponse, err error)

ListDatasets lists datasets for an identity. The credentials used to make this API call need to have access to the identity data. With Amazon Cognito Sync, each identity has access only to its own data. You should use Amazon Cognito Identity service to retrieve the credentials necessary to make this API call.

func (*CognitoSync) ListIdentityPoolUsage

func (c *CognitoSync) ListIdentityPoolUsage(req *ListIdentityPoolUsageRequest) (resp *ListIdentityPoolUsageResponse, err error)

ListIdentityPoolUsage gets a list of identity pools registered with Cognito.

func (*CognitoSync) ListRecords

func (c *CognitoSync) ListRecords(req *ListRecordsRequest) (resp *ListRecordsResponse, err error)

ListRecords gets paginated records, optionally changed after a particular sync count for a dataset and identity. The credentials used to make this API call need to have access to the identity data. With Amazon Cognito Sync, each identity has access only to its own data. You should use Amazon Cognito Identity service to retrieve the credentials necessary to make this API call.

func (*CognitoSync) RegisterDevice

func (c *CognitoSync) RegisterDevice(req *RegisterDeviceRequest) (resp *RegisterDeviceResponse, err error)

RegisterDevice registers a device to receive push sync notifications.

func (*CognitoSync) SetIdentityPoolConfiguration

func (c *CognitoSync) SetIdentityPoolConfiguration(req *SetIdentityPoolConfigurationRequest) (resp *SetIdentityPoolConfigurationResponse, err error)

SetIdentityPoolConfiguration is undocumented.

func (*CognitoSync) SubscribeToDataset

func (c *CognitoSync) SubscribeToDataset(req *SubscribeToDatasetRequest) (resp *SubscribeToDatasetResponse, err error)

SubscribeToDataset subscribes to receive notifications when a dataset is modified by another device.

func (*CognitoSync) UnsubscribeFromDataset

func (c *CognitoSync) UnsubscribeFromDataset(req *UnsubscribeFromDatasetRequest) (resp *UnsubscribeFromDatasetResponse, err error)

UnsubscribeFromDataset unsubscribe from receiving notifications when a dataset is modified by another device.

func (*CognitoSync) UpdateRecords

func (c *CognitoSync) UpdateRecords(req *UpdateRecordsRequest) (resp *UpdateRecordsResponse, err error)

UpdateRecords posts updates to records and add and delete records for a dataset and user. The credentials used to make this API call need to have access to the identity data. With Amazon Cognito Sync, each identity has access only to its own data. You should use Amazon Cognito Identity service to retrieve the credentials necessary to make this API call.

type CognitoSyncAPI

type CognitoSyncAPI interface {
	DeleteDataset(req *DeleteDatasetRequest) (resp *DeleteDatasetResponse, err error)
	DescribeDataset(req *DescribeDatasetRequest) (resp *DescribeDatasetResponse, err error)
	DescribeIdentityPoolUsage(req *DescribeIdentityPoolUsageRequest) (resp *DescribeIdentityPoolUsageResponse, err error)
	DescribeIdentityUsage(req *DescribeIdentityUsageRequest) (resp *DescribeIdentityUsageResponse, err error)
	GetIdentityPoolConfiguration(req *GetIdentityPoolConfigurationRequest) (resp *GetIdentityPoolConfigurationResponse, err error)
	ListDatasets(req *ListDatasetsRequest) (resp *ListDatasetsResponse, err error)
	ListIdentityPoolUsage(req *ListIdentityPoolUsageRequest) (resp *ListIdentityPoolUsageResponse, err error)
	ListRecords(req *ListRecordsRequest) (resp *ListRecordsResponse, err error)
	RegisterDevice(req *RegisterDeviceRequest) (resp *RegisterDeviceResponse, err error)
	SetIdentityPoolConfiguration(req *SetIdentityPoolConfigurationRequest) (resp *SetIdentityPoolConfigurationResponse, err error)
	SubscribeToDataset(req *SubscribeToDatasetRequest) (resp *SubscribeToDatasetResponse, err error)
	UnsubscribeFromDataset(req *UnsubscribeFromDatasetRequest) (resp *UnsubscribeFromDatasetResponse, err error)
	UpdateRecords(req *UpdateRecordsRequest) (resp *UpdateRecordsResponse, err error)
}

type Dataset

type Dataset struct {
	CreationDate     time.Time       `json:"CreationDate,omitempty"`
	DataStorage      aws.LongValue   `json:"DataStorage,omitempty"`
	DatasetName      aws.StringValue `json:"DatasetName,omitempty"`
	IdentityID       aws.StringValue `json:"IdentityId,omitempty"`
	LastModifiedBy   aws.StringValue `json:"LastModifiedBy,omitempty"`
	LastModifiedDate time.Time       `json:"LastModifiedDate,omitempty"`
	NumRecords       aws.LongValue   `json:"NumRecords,omitempty"`
}

Dataset is undocumented.

type DeleteDatasetRequest

type DeleteDatasetRequest struct {
	DatasetName    aws.StringValue `json:"-"`
	IdentityID     aws.StringValue `json:"-"`
	IdentityPoolID aws.StringValue `json:"-"`
}

DeleteDatasetRequest is undocumented.

type DeleteDatasetResponse

type DeleteDatasetResponse struct {
	Dataset *Dataset `json:"Dataset,omitempty"`
}

DeleteDatasetResponse is undocumented.

type DescribeDatasetRequest

type DescribeDatasetRequest struct {
	DatasetName    aws.StringValue `json:"-"`
	IdentityID     aws.StringValue `json:"-"`
	IdentityPoolID aws.StringValue `json:"-"`
}

DescribeDatasetRequest is undocumented.

type DescribeDatasetResponse

type DescribeDatasetResponse struct {
	Dataset *Dataset `json:"Dataset,omitempty"`
}

DescribeDatasetResponse is undocumented.

type DescribeIdentityPoolUsageRequest

type DescribeIdentityPoolUsageRequest struct {
	IdentityPoolID aws.StringValue `json:"-"`
}

DescribeIdentityPoolUsageRequest is undocumented.

type DescribeIdentityPoolUsageResponse

type DescribeIdentityPoolUsageResponse struct {
	IdentityPoolUsage *IdentityPoolUsage `json:"IdentityPoolUsage,omitempty"`
}

DescribeIdentityPoolUsageResponse is undocumented.

type DescribeIdentityUsageRequest

type DescribeIdentityUsageRequest struct {
	IdentityID     aws.StringValue `json:"-"`
	IdentityPoolID aws.StringValue `json:"-"`
}

DescribeIdentityUsageRequest is undocumented.

type DescribeIdentityUsageResponse

type DescribeIdentityUsageResponse struct {
	IdentityUsage *IdentityUsage `json:"IdentityUsage,omitempty"`
}

DescribeIdentityUsageResponse is undocumented.

type GetIdentityPoolConfigurationRequest

type GetIdentityPoolConfigurationRequest struct {
	IdentityPoolID aws.StringValue `json:"-"`
}

GetIdentityPoolConfigurationRequest is undocumented.

type GetIdentityPoolConfigurationResponse

type GetIdentityPoolConfigurationResponse struct {
	IdentityPoolID aws.StringValue `json:"IdentityPoolId,omitempty"`
	PushSync       *PushSync       `json:"PushSync,omitempty"`
}

GetIdentityPoolConfigurationResponse is undocumented.

type IdentityPoolUsage

type IdentityPoolUsage struct {
	DataStorage       aws.LongValue   `json:"DataStorage,omitempty"`
	IdentityPoolID    aws.StringValue `json:"IdentityPoolId,omitempty"`
	LastModifiedDate  time.Time       `json:"LastModifiedDate,omitempty"`
	SyncSessionsCount aws.LongValue   `json:"SyncSessionsCount,omitempty"`
}

IdentityPoolUsage is undocumented.

type IdentityUsage

type IdentityUsage struct {
	DataStorage      aws.LongValue    `json:"DataStorage,omitempty"`
	DatasetCount     aws.IntegerValue `json:"DatasetCount,omitempty"`
	IdentityID       aws.StringValue  `json:"IdentityId,omitempty"`
	IdentityPoolID   aws.StringValue  `json:"IdentityPoolId,omitempty"`
	LastModifiedDate time.Time        `json:"LastModifiedDate,omitempty"`
}

IdentityUsage is undocumented.

type ListDatasetsRequest

type ListDatasetsRequest struct {
	IdentityID     aws.StringValue  `json:"-"`
	IdentityPoolID aws.StringValue  `json:"-"`
	MaxResults     aws.IntegerValue `json:"-"`
	NextToken      aws.StringValue  `json:"-"`
}

ListDatasetsRequest is undocumented.

type ListDatasetsResponse

type ListDatasetsResponse struct {
	Count     aws.IntegerValue `json:"Count,omitempty"`
	Datasets  []Dataset        `json:"Datasets,omitempty"`
	NextToken aws.StringValue  `json:"NextToken,omitempty"`
}

ListDatasetsResponse is undocumented.

type ListIdentityPoolUsageRequest

type ListIdentityPoolUsageRequest struct {
	MaxResults aws.IntegerValue `json:"-"`
	NextToken  aws.StringValue  `json:"-"`
}

ListIdentityPoolUsageRequest is undocumented.

type ListIdentityPoolUsageResponse

type ListIdentityPoolUsageResponse struct {
	Count              aws.IntegerValue    `json:"Count,omitempty"`
	IdentityPoolUsages []IdentityPoolUsage `json:"IdentityPoolUsages,omitempty"`
	MaxResults         aws.IntegerValue    `json:"MaxResults,omitempty"`
	NextToken          aws.StringValue     `json:"NextToken,omitempty"`
}

ListIdentityPoolUsageResponse is undocumented.

type ListRecordsRequest

type ListRecordsRequest struct {
	DatasetName      aws.StringValue  `json:"-"`
	IdentityID       aws.StringValue  `json:"-"`
	IdentityPoolID   aws.StringValue  `json:"-"`
	LastSyncCount    aws.LongValue    `json:"-"`
	MaxResults       aws.IntegerValue `json:"-"`
	NextToken        aws.StringValue  `json:"-"`
	SyncSessionToken aws.StringValue  `json:"-"`
}

ListRecordsRequest is undocumented.

type ListRecordsResponse

type ListRecordsResponse struct {
	Count                                 aws.IntegerValue `json:"Count,omitempty"`
	DatasetDeletedAfterRequestedSyncCount aws.BooleanValue `json:"DatasetDeletedAfterRequestedSyncCount,omitempty"`
	DatasetExists                         aws.BooleanValue `json:"DatasetExists,omitempty"`
	DatasetSyncCount                      aws.LongValue    `json:"DatasetSyncCount,omitempty"`
	LastModifiedBy                        aws.StringValue  `json:"LastModifiedBy,omitempty"`
	MergedDatasetNames                    []string         `json:"MergedDatasetNames,omitempty"`
	NextToken                             aws.StringValue  `json:"NextToken,omitempty"`
	Records                               []Record         `json:"Records,omitempty"`
	SyncSessionToken                      aws.StringValue  `json:"SyncSessionToken,omitempty"`
}

ListRecordsResponse is undocumented.

type PushSync

type PushSync struct {
	ApplicationARNs []string        `json:"ApplicationArns,omitempty"`
	RoleARN         aws.StringValue `json:"RoleArn,omitempty"`
}

PushSync is undocumented.

type Record

type Record struct {
	DeviceLastModifiedDate time.Time       `json:"DeviceLastModifiedDate,omitempty"`
	Key                    aws.StringValue `json:"Key,omitempty"`
	LastModifiedBy         aws.StringValue `json:"LastModifiedBy,omitempty"`
	LastModifiedDate       time.Time       `json:"LastModifiedDate,omitempty"`
	SyncCount              aws.LongValue   `json:"SyncCount,omitempty"`
	Value                  aws.StringValue `json:"Value,omitempty"`
}

Record is undocumented.

type RecordPatch

type RecordPatch struct {
	DeviceLastModifiedDate time.Time       `json:"DeviceLastModifiedDate,omitempty"`
	Key                    aws.StringValue `json:"Key"`
	Op                     aws.StringValue `json:"Op"`
	SyncCount              aws.LongValue   `json:"SyncCount"`
	Value                  aws.StringValue `json:"Value,omitempty"`
}

RecordPatch is undocumented.

type RegisterDeviceRequest

type RegisterDeviceRequest struct {
	IdentityID     aws.StringValue `json:"-"`
	IdentityPoolID aws.StringValue `json:"-"`
	Platform       aws.StringValue `json:"Platform"`
	Token          aws.StringValue `json:"Token"`
}

RegisterDeviceRequest is undocumented.

type RegisterDeviceResponse

type RegisterDeviceResponse struct {
	DeviceID aws.StringValue `json:"DeviceId,omitempty"`
}

RegisterDeviceResponse is undocumented.

type SetIdentityPoolConfigurationRequest

type SetIdentityPoolConfigurationRequest struct {
	IdentityPoolID aws.StringValue `json:"-"`
	PushSync       *PushSync       `json:"PushSync,omitempty"`
}

SetIdentityPoolConfigurationRequest is undocumented.

type SetIdentityPoolConfigurationResponse

type SetIdentityPoolConfigurationResponse struct {
	IdentityPoolID aws.StringValue `json:"IdentityPoolId,omitempty"`
	PushSync       *PushSync       `json:"PushSync,omitempty"`
}

SetIdentityPoolConfigurationResponse is undocumented.

type SubscribeToDatasetRequest

type SubscribeToDatasetRequest struct {
	DatasetName    aws.StringValue `json:"-"`
	DeviceID       aws.StringValue `json:"-"`
	IdentityID     aws.StringValue `json:"-"`
	IdentityPoolID aws.StringValue `json:"-"`
}

SubscribeToDatasetRequest is undocumented.

type SubscribeToDatasetResponse

type SubscribeToDatasetResponse struct {
}

SubscribeToDatasetResponse is undocumented.

type UnsubscribeFromDatasetRequest

type UnsubscribeFromDatasetRequest struct {
	DatasetName    aws.StringValue `json:"-"`
	DeviceID       aws.StringValue `json:"-"`
	IdentityID     aws.StringValue `json:"-"`
	IdentityPoolID aws.StringValue `json:"-"`
}

UnsubscribeFromDatasetRequest is undocumented.

type UnsubscribeFromDatasetResponse

type UnsubscribeFromDatasetResponse struct {
}

UnsubscribeFromDatasetResponse is undocumented.

type UpdateRecordsRequest

type UpdateRecordsRequest struct {
	ClientContext    aws.StringValue `json:"-"`
	DatasetName      aws.StringValue `json:"-"`
	DeviceID         aws.StringValue `json:"DeviceId,omitempty"`
	IdentityID       aws.StringValue `json:"-"`
	IdentityPoolID   aws.StringValue `json:"-"`
	RecordPatches    []RecordPatch   `json:"RecordPatches,omitempty"`
	SyncSessionToken aws.StringValue `json:"SyncSessionToken"`
}

UpdateRecordsRequest is undocumented.

type UpdateRecordsResponse

type UpdateRecordsResponse struct {
	Records []Record `json:"Records,omitempty"`
}

UpdateRecordsResponse is undocumented.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL