package connectparticipant
import "github.com/aws/aws-sdk-go-v2/service/connectparticipant"
Index ¶
- Constants
- func AddResolveEndpointMiddleware(stack *middleware.Stack, options ResolveEndpointMiddlewareOptions)
- func NewDefaultEndpointResolver() *internalendpoints.Resolver
- func RemoveResolveEndpointMiddleware(stack *middleware.Stack) error
- type Client
- func New(options Options, optFns ...func(*Options)) *Client
- func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client
- func (c *Client) CreateParticipantConnection(ctx context.Context, params *CreateParticipantConnectionInput, optFns ...func(*Options)) (*CreateParticipantConnectionOutput, error)
- func (c *Client) DisconnectParticipant(ctx context.Context, params *DisconnectParticipantInput, optFns ...func(*Options)) (*DisconnectParticipantOutput, error)
- func (c *Client) GetTranscript(ctx context.Context, params *GetTranscriptInput, optFns ...func(*Options)) (*GetTranscriptOutput, error)
- func (c *Client) SendEvent(ctx context.Context, params *SendEventInput, optFns ...func(*Options)) (*SendEventOutput, error)
- func (c *Client) SendMessage(ctx context.Context, params *SendMessageInput, optFns ...func(*Options)) (*SendMessageOutput, error)
- type CreateParticipantConnectionInput
- type CreateParticipantConnectionOutput
- type DisconnectParticipantInput
- type DisconnectParticipantOutput
- type EndpointResolver
- type EndpointResolverFunc
- type GetTranscriptInput
- type GetTranscriptOutput
- type HTTPClient
- type HTTPSignerV4
- type IdempotencyTokenProvider
- type Options
- func (o Options) Copy() Options
- func (o Options) GetCredentials() aws.CredentialsProvider
- func (o Options) GetEndpointOptions() ResolverOptions
- func (o Options) GetEndpointResolver() EndpointResolver
- func (o Options) GetHTTPSignerV4() HTTPSignerV4
- func (o Options) GetIdempotencyTokenProvider() IdempotencyTokenProvider
- func (o Options) GetRegion() string
- func (o Options) GetRetryer() retry.Retryer
- type ResolveEndpoint
- func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, )
- func (*ResolveEndpoint) ID() string
- type ResolveEndpointMiddlewareOptions
- type ResolverOptions
- type SendEventInput
- type SendEventOutput
- type SendMessageInput
- type SendMessageOutput
Constants ¶
const ServiceAPIVersion = "2018-09-07"
const ServiceID = "ConnectParticipant"
Functions ¶
func AddResolveEndpointMiddleware ¶
func AddResolveEndpointMiddleware(stack *middleware.Stack, options ResolveEndpointMiddlewareOptions)
func NewDefaultEndpointResolver ¶
func NewDefaultEndpointResolver() *internalendpoints.Resolver
NewDefaultEndpointResolver constructs a new service endpoint resolver
func RemoveResolveEndpointMiddleware ¶
func RemoveResolveEndpointMiddleware(stack *middleware.Stack) error
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Amazon Connect is a cloud-based contact center solution that makes it easy to set up and manage a customer contact center and provide reliable customer engagement at any scale. Amazon Connect enables customer contacts through voice or chat. <p>The APIs described here are used by chat participants, such as agents and customers.</p>
func New ¶
New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.
func NewFromConfig ¶
NewFromConfig returns a new client from the provided config.
func (*Client) CreateParticipantConnection ¶
func (c *Client) CreateParticipantConnection(ctx context.Context, params *CreateParticipantConnectionInput, optFns ...func(*Options)) (*CreateParticipantConnectionOutput, error)
Creates the participant's connection. Note that ParticipantToken is used for invoking this API instead of ConnectionToken. The participant token is valid for the lifetime of the participant – until the they are part of a contact. The response URL for WEBSOCKET Type has a connect expiry timeout of 100s. Clients must manually connect to the returned websocket URL and subscribe to the desired topic. For chat, you need to publish the following on the established websocket connection: <p> <code>{"topic":"aws/subscribe","content":{"topics":["aws/chat"]}}</code> </p> <p>Upon websocket URL expiry, as specified in the response ConnectionExpiry parameter, clients need to call this API again to obtain a new websocket URL and perform the same steps as before.</p>
func (*Client) DisconnectParticipant ¶
func (c *Client) DisconnectParticipant(ctx context.Context, params *DisconnectParticipantInput, optFns ...func(*Options)) (*DisconnectParticipantOutput, error)
Disconnects a participant. Note that ConnectionToken is used for invoking this API instead of ParticipantToken.
func (*Client) GetTranscript ¶
func (c *Client) GetTranscript(ctx context.Context, params *GetTranscriptInput, optFns ...func(*Options)) (*GetTranscriptOutput, error)
Retrieves a transcript of the session. Note that ConnectionToken is used for invoking this API instead of ParticipantToken.
func (*Client) SendEvent ¶
func (c *Client) SendEvent(ctx context.Context, params *SendEventInput, optFns ...func(*Options)) (*SendEventOutput, error)
Sends an event. Note that ConnectionToken is used for invoking this API instead of ParticipantToken.
func (*Client) SendMessage ¶
func (c *Client) SendMessage(ctx context.Context, params *SendMessageInput, optFns ...func(*Options)) (*SendMessageOutput, error)
Sends a message. Note that ConnectionToken is used for invoking this API instead of ParticipantToken.
type CreateParticipantConnectionInput ¶
type CreateParticipantConnectionInput struct { // Participant Token as obtained from StartChatContact // (https://docs.aws.amazon.com/connect/latest/APIReference/API_StartChatContactResponse.html) // API response. ParticipantToken *string // Type of connection information required. Type []types.ConnectionType }
type CreateParticipantConnectionOutput ¶
type CreateParticipantConnectionOutput struct { // Creates the participant's connection credentials. The authentication token // associated with the participant's connection. ConnectionCredentials *types.ConnectionCredentials // Creates the participant's websocket connection. Websocket *types.Websocket // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type DisconnectParticipantInput ¶
type DisconnectParticipantInput struct { // A unique, case-sensitive identifier that you provide to ensure the idempotency // of the request. ClientToken *string // The authentication token associated with the participant's connection. ConnectionToken *string }
type DisconnectParticipantOutput ¶
type DisconnectParticipantOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type EndpointResolver ¶
type EndpointResolver interface { ResolveEndpoint(region string, options ResolverOptions) (aws.Endpoint, error) }
EndpointResolver interface for resolving service endpoints.
func WithEndpointResolver ¶
func WithEndpointResolver(awsResolver aws.EndpointResolver, fallbackResolver EndpointResolver) EndpointResolver
WithEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided fallbackResolver for resolution. awsResolver and fallbackResolver must not be nil
type EndpointResolverFunc ¶
type EndpointResolverFunc func(region string, options ResolverOptions) (aws.Endpoint, error)
EndpointResolverFunc is a helper utility that wraps a function so it satisfies the EndpointResolver interface. This is useful when you want to add additional endpoint resolving logic, or stub out specific endpoints with custom values.
func (EndpointResolverFunc) ResolveEndpoint ¶
func (fn EndpointResolverFunc) ResolveEndpoint(region string, options ResolverOptions) (endpoint aws.Endpoint, err error)
type GetTranscriptInput ¶
type GetTranscriptInput struct { // The sort order for the records. Default: DESCENDING. SortOrder types.SortKey // The contactId from the current contact chain for which transcript is needed. ContactId *string // A filtering option for where to start. StartPosition *types.StartPosition // The authentication token associated with the participant's connection. ConnectionToken *string // The pagination token. Use the value returned previously in the next subsequent // request to retrieve the next set of results. NextToken *string // The maximum number of results to return in the page. Default: 10. MaxResults *int32 // The direction from StartPosition from which to retrieve message. Default: // BACKWARD when no StartPosition is provided, FORWARD with StartPosition. ScanDirection types.ScanDirection }
type GetTranscriptOutput ¶
type GetTranscriptOutput struct { // The initial contact ID for the contact. InitialContactId *string // The list of messages in the session. Transcript []*types.Item // The pagination token. Use the value returned previously in the next subsequent // request to retrieve the next set of results. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type HTTPClient ¶
type HTTPSignerV4 ¶
type HTTPSignerV4 interface { SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time) error }
type IdempotencyTokenProvider ¶
IdempotencyTokenProvider interface for providing idempotency token
type Options ¶
type Options struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this client. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // The credentials object to use when signing requests. Credentials aws.CredentialsProvider // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions ResolverOptions // The service endpoint resolver. EndpointResolver EndpointResolver // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 // Provides idempotency tokens values that will be automatically populated into // idempotent API operations. IdempotencyTokenProvider IdempotencyTokenProvider // The region to send requests to. (Required) Region string // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. Retryer retry.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient }
func (Options) Copy ¶
Copy creates a clone where the APIOptions list is deep copied.
func (Options) GetCredentials ¶
func (o Options) GetCredentials() aws.CredentialsProvider
func (Options) GetEndpointOptions ¶
func (o Options) GetEndpointOptions() ResolverOptions
func (Options) GetEndpointResolver ¶
func (o Options) GetEndpointResolver() EndpointResolver
func (Options) GetHTTPSignerV4 ¶
func (o Options) GetHTTPSignerV4() HTTPSignerV4
func (Options) GetIdempotencyTokenProvider ¶
func (o Options) GetIdempotencyTokenProvider() IdempotencyTokenProvider
func (Options) GetRegion ¶
func (Options) GetRetryer ¶
type ResolveEndpoint ¶
type ResolveEndpoint struct { Resolver EndpointResolver Options ResolverOptions }
func (*ResolveEndpoint) HandleSerialize ¶
func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, )
func (*ResolveEndpoint) ID ¶
func (*ResolveEndpoint) ID() string
type ResolveEndpointMiddlewareOptions ¶
type ResolveEndpointMiddlewareOptions interface { GetEndpointResolver() EndpointResolver GetEndpointOptions() ResolverOptions }
type ResolverOptions ¶
type ResolverOptions = internalendpoints.Options
ResolverOptions is the service endpoint resolver options
type SendEventInput ¶
type SendEventInput struct { // The authentication token associated with the participant's connection. ConnectionToken *string // A unique, case-sensitive identifier that you provide to ensure the idempotency // of the request. ClientToken *string // The content type of the request. Supported types are: <ul> <li> // <p>application/vnd.amazonaws.connect.event.typing</p> </li> <li> // <p>application/vnd.amazonaws.connect.event.connection.acknowledged</p> </li> // </ul> ContentType *string // The content of the event to be sent (for example, message text). This is not yet // supported. Content *string }
type SendEventOutput ¶
type SendEventOutput struct { // The ID of the response. Id *string // The time when the event was sent. It's specified in ISO 8601 format: // yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z. AbsoluteTime *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type SendMessageInput ¶
type SendMessageInput struct { // A unique, case-sensitive identifier that you provide to ensure the idempotency // of the request. ClientToken *string // The type of the content. Supported types are text/plain. ContentType *string // The authentication token associated with the connection. ConnectionToken *string // The content of the message. Content *string }
type SendMessageOutput ¶
type SendMessageOutput struct { // The ID of the message. Id *string // The time when the message was sent. It's specified in ISO 8601 format: // yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z. AbsoluteTime *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
Source Files ¶
api_client.go api_op_CreateParticipantConnection.go api_op_DisconnectParticipant.go api_op_GetTranscript.go api_op_SendEvent.go api_op_SendMessage.go deserializers.go endpoints.go serializers.go validators.go
Directories ¶
Path | Synopsis |
---|---|
internal | |
types |
- Version
- v0.1.0
- Published
- Sep 29, 2020
- Platform
- js/wasm
- Imports
- 26 packages
- Last checked
- now –
Tools for package owners.