mobileanalytics

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package mobileanalytics provides the client and types for making API requests to Amazon Mobile Analytics.

Amazon Mobile Analytics is a service for collecting, visualizing, and understanding app usage data at scale.

See mobileanalytics package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/mobileanalytics/

Using the Client

To use Amazon Mobile Analytics with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.

See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/

See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the Amazon Mobile Analytics client for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/mobileanalytics/#New

Index

Constants

View Source
const (
	ServiceName = "Amazon Mobile Analytics" // Service's name
	ServiceID   = "MobileAnalytics"         // Service's identifier
	EndpointsID = "mobileanalytics"         // Service's Endpoint identifier
)
View Source
const (

	// ErrCodeBadRequestException for service response error code
	// "BadRequestException".
	//
	// An exception object returned when a request fails.
	ErrCodeBadRequestException = "BadRequestException"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.9.0

type Client struct {
	*aws.Client
}

Client provides the API operation methods for making requests to Amazon Mobile Analytics. See this package's package overview docs for details on the service.

The client's methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

func New(config aws.Config) *Client

New creates a new instance of the client from the provided Config.

Example:

// Create a client from just a config.
svc := mobileanalytics.New(myConfig)

func (*Client) PutEventsRequest added in v0.9.0

func (c *Client) PutEventsRequest(input *PutEventsInput) PutEventsRequest

PutEventsRequest returns a request value for making API operation for Amazon Mobile Analytics.

The PutEvents operation records one or more events. You can have up to 1,500 unique custom events per app, any combination of up to 40 attributes and metrics per custom event, and any number of attribute or metric values.

// Example sending a request using PutEventsRequest.
req := client.PutEventsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

type Event

type Event struct {

	// A collection of key-value pairs that give additional context to the event.
	// The key-value pairs are specified by the developer.
	//
	// This collection can be empty or the attribute object can be omitted.
	Attributes map[string]string `locationName:"attributes" type:"map"`

	// A name signifying an event that occurred in your app. This is used for grouping
	// and aggregating like events together for reporting purposes.
	//
	// EventType is a required field
	EventType *string `locationName:"eventType" min:"1" type:"string" required:"true"`

	// A collection of key-value pairs that gives additional, measurable context
	// to the event. The key-value pairs are specified by the developer.
	//
	// This collection can be empty or the attribute object can be omitted.
	Metrics map[string]float64 `locationName:"metrics" type:"map"`

	// The session the event occured within.
	Session *Session `locationName:"session" type:"structure"`

	// The time the event occurred in ISO 8601 standard date time format. For example,
	// 2014-06-30T19:07:47.885Z
	//
	// Timestamp is a required field
	Timestamp *string `locationName:"timestamp" type:"string" required:"true"`

	// The version of the event.
	Version *string `locationName:"version" min:"1" type:"string"`
	// contains filtered or unexported fields
}

A JSON object representing a batch of unique event occurrences in your app.

func (Event) MarshalFields added in v0.3.0

func (s Event) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (Event) String

func (s Event) String() string

String returns the string representation

func (*Event) Validate

func (s *Event) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type PutEventsInput

type PutEventsInput struct {

	// The client context including the client ID, app title, app version and package
	// name.
	//
	// ClientContext is a required field
	ClientContext *string `location:"header" locationName:"x-amz-Client-Context" type:"string" required:"true"`

	// The encoding used for the client context.
	ClientContextEncoding *string `location:"header" locationName:"x-amz-Client-Context-Encoding" type:"string"`

	// An array of Event JSON objects
	//
	// Events is a required field
	Events []Event `locationName:"events" type:"list" required:"true"`
	// contains filtered or unexported fields
}

A container for the data needed for a PutEvent operation

func (PutEventsInput) MarshalFields added in v0.3.0

func (s PutEventsInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (PutEventsInput) String

func (s PutEventsInput) String() string

String returns the string representation

func (*PutEventsInput) Validate

func (s *PutEventsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type PutEventsOutput

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

func (PutEventsOutput) MarshalFields added in v0.3.0

func (s PutEventsOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (PutEventsOutput) String

func (s PutEventsOutput) String() string

String returns the string representation

type PutEventsRequest

type PutEventsRequest struct {
	*aws.Request
	Input *PutEventsInput
	Copy  func(*PutEventsInput) PutEventsRequest
}

PutEventsRequest is the request type for the PutEvents API operation.

func (PutEventsRequest) Send

Send marshals and sends the PutEvents API request.

type PutEventsResponse added in v0.9.0

type PutEventsResponse struct {
	*PutEventsOutput
	// contains filtered or unexported fields
}

PutEventsResponse is the response type for the PutEvents API operation.

func (*PutEventsResponse) SDKResponseMetdata added in v0.9.0

func (r *PutEventsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the PutEvents request.

type Session

type Session struct {

	// The duration of the session.
	Duration *int64 `locationName:"duration" type:"long"`

	// A unique identifier for the session
	Id *string `locationName:"id" min:"1" type:"string"`

	// The time the event started in ISO 8601 standard date time format. For example,
	// 2014-06-30T19:07:47.885Z
	StartTimestamp *string `locationName:"startTimestamp" type:"string"`

	// The time the event terminated in ISO 8601 standard date time format. For
	// example, 2014-06-30T19:07:47.885Z
	StopTimestamp *string `locationName:"stopTimestamp" type:"string"`
	// contains filtered or unexported fields
}

Describes the session. Session information is required on ALL events.

func (Session) MarshalFields added in v0.3.0

func (s Session) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (Session) String

func (s Session) String() string

String returns the string representation

func (*Session) Validate

func (s *Session) Validate() error

Validate inspects the fields of the type to determine if they are valid.

Directories

Path Synopsis
Package mobileanalyticsiface provides an interface to enable mocking the Amazon Mobile Analytics service client for testing your code.
Package mobileanalyticsiface provides an interface to enable mocking the Amazon Mobile Analytics service client for testing your code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL