Documentation
¶
Index ¶
- type AddConnectionToGroupOptions
- type AddConnectionToGroupResponse
- type AddConnectionsToGroupsOptions
- type AddConnectionsToGroupsResponse
- type AddToGroupsRequest
- type AddUserToGroupOptions
- type AddUserToGroupResponse
- type CheckPermissionOptions
- type CheckPermissionResponse
- type Client
- func (client *Client) AddConnectionToGroup(ctx context.Context, hub string, group string, connectionID string, ...) (AddConnectionToGroupResponse, error)
- func (client *Client) AddConnectionsToGroups(ctx context.Context, hub string, groupsToAdd AddToGroupsRequest, ...) (AddConnectionsToGroupsResponse, error)
- func (client *Client) AddUserToGroup(ctx context.Context, hub string, group string, userID string, ...) (AddUserToGroupResponse, error)
- func (client *Client) CloseAllConnections(ctx context.Context, hub string, options *CloseAllConnectionsOptions) (CloseAllConnectionsResponse, error)
- func (client *Client) CloseConnection(ctx context.Context, hub string, connectionID string, ...) (CloseConnectionResponse, error)
- func (client *Client) CloseGroupConnections(ctx context.Context, hub string, group string, ...) (CloseGroupConnectionsResponse, error)
- func (client *Client) CloseUserConnections(ctx context.Context, hub string, userID string, ...) (CloseUserConnectionsResponse, error)
- func (c *Client) GenerateClientAccessURL(ctx context.Context, hub string, options *GenerateClientAccessURLOptions) (*GenerateClientAccessURLResponse, error)
- func (client *Client) GrantPermission(ctx context.Context, hub string, permission Permission, connectionID string, ...) (GrantPermissionResponse, error)
- func (client *Client) RemoveConnectionFromAllGroups(ctx context.Context, hub string, connectionID string, ...) (RemoveConnectionFromAllGroupsResponse, error)
- func (client *Client) RemoveConnectionFromGroup(ctx context.Context, hub string, group string, connectionID string, ...) (RemoveConnectionFromGroupResponse, error)
- func (client *Client) RemoveConnectionsFromGroups(ctx context.Context, hub string, groupsToRemove RemoveFromGroupsRequest, ...) (RemoveConnectionsFromGroupsResponse, error)
- func (client *Client) RemoveUserFromAllGroups(ctx context.Context, hub string, userID string, ...) (RemoveUserFromAllGroupsResponse, error)
- func (client *Client) RemoveUserFromGroup(ctx context.Context, hub string, group string, userID string, ...) (RemoveUserFromGroupResponse, error)
- func (client *Client) RevokePermission(ctx context.Context, hub string, permission Permission, connectionID string, ...) (RevokePermissionResponse, error)
- func (client *Client) SendToAll(ctx context.Context, hub string, contentType ContentType, ...) (SendToAllResponse, error)
- func (client *Client) SendToConnection(ctx context.Context, hub string, connectionID string, contentType ContentType, ...) (SendToConnectionResponse, error)
- func (client *Client) SendToGroup(ctx context.Context, hub string, group string, contentType ContentType, ...) (SendToGroupResponse, error)
- func (client *Client) SendToUser(ctx context.Context, hub string, userID string, contentType ContentType, ...) (SendToUserResponse, error)
- type ClientOptions
- type CloseAllConnectionsOptions
- type CloseAllConnectionsResponse
- type CloseConnectionOptions
- type CloseConnectionResponse
- type CloseGroupConnectionsOptions
- type CloseGroupConnectionsResponse
- type CloseUserConnectionsOptions
- type CloseUserConnectionsResponse
- type ConnectionExistsOptions
- type ConnectionExistsResponse
- type ContentType
- type GenerateClientAccessURLOptions
- type GenerateClientAccessURLResponse
- type GenerateClientTokenOptions
- type GenerateClientTokenResponse
- type GrantPermissionOptions
- type GrantPermissionResponse
- type GroupExistsOptions
- type GroupExistsResponse
- type Permission
- type RemoveConnectionFromAllGroupsOptions
- type RemoveConnectionFromAllGroupsResponse
- type RemoveConnectionFromGroupOptions
- type RemoveConnectionFromGroupResponse
- type RemoveConnectionsFromGroupsOptions
- type RemoveConnectionsFromGroupsResponse
- type RemoveFromGroupsRequest
- type RemoveUserFromAllGroupsOptions
- type RemoveUserFromAllGroupsResponse
- type RemoveUserFromGroupOptions
- type RemoveUserFromGroupResponse
- type RevokePermissionOptions
- type RevokePermissionResponse
- type SendToAllOptions
- type SendToAllResponse
- type SendToConnectionOptions
- type SendToConnectionResponse
- type SendToGroupOptions
- type SendToGroupResponse
- type SendToUserOptions
- type SendToUserResponse
- type TokenResponse
- type UserExistsOptions
- type UserExistsResponse
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddConnectionToGroupOptions ¶
type AddConnectionToGroupOptions struct {
}
AddConnectionToGroupOptions contains the optional parameters for the Client.AddConnectionToGroup method.
type AddConnectionToGroupResponse ¶
type AddConnectionToGroupResponse struct {
}
AddConnectionToGroupResponse contains the response from method Client.AddConnectionToGroup.
type AddConnectionsToGroupsOptions ¶
type AddConnectionsToGroupsOptions struct {
}
AddConnectionsToGroupsOptions contains the optional parameters for the Client.AddConnectionsToGroups method.
type AddConnectionsToGroupsResponse ¶
type AddConnectionsToGroupsResponse struct {
}
AddConnectionsToGroupsResponse contains the response from method Client.AddConnectionsToGroups.
type AddToGroupsRequest ¶
type AddToGroupsRequest struct {
// An OData filter which target connections satisfy
Filter *string
// A list of groups which target connections will be added into
Groups []string
}
AddToGroupsRequest - The request object containing targets groups and a connection filter
func (AddToGroupsRequest) MarshalJSON ¶
func (a AddToGroupsRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AddToGroupsRequest.
func (*AddToGroupsRequest) UnmarshalJSON ¶
func (a *AddToGroupsRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AddToGroupsRequest.
type AddUserToGroupOptions ¶
type AddUserToGroupOptions struct {
}
AddUserToGroupOptions contains the optional parameters for the Client.AddUserToGroup method.
type AddUserToGroupResponse ¶
type AddUserToGroupResponse struct {
}
AddUserToGroupResponse contains the response from method Client.AddUserToGroup.
type CheckPermissionOptions ¶
type CheckPermissionOptions struct {
// The meaning of the target depends on the specific permission. For joinLeaveGroup and sendToGroup, targetName is a required
// parameter standing for the group name.
TargetName *string
}
CheckPermissionOptions contains the optional parameters for the Client.CheckPermission method.
type CheckPermissionResponse ¶
type CheckPermissionResponse struct {
}
CheckPermissionResponse contains the response from method Client.CheckPermission.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client contains the methods for the WebPubSub group. Don't use this type directly, use a constructor function instead.
func NewClient ¶
func NewClient(endpoint string, credential azcore.TokenCredential, options *ClientOptions) (*Client, error)
NewClient creates a client that manages Web PubSub service
Example ¶
ExampleNewClient demonstrates how to create a new client with default Azure credentials.
package main
import (
"log"
"os"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/messaging/azwebpubsub"
)
func main() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
// handle error
}
endpoint := os.Getenv("WEBPUBSUB_ENDPOINT")
if endpoint == "" {
return
}
hub := os.Getenv("WEBPUBSUB_HUB")
if hub == "" {
return
}
client, err := azwebpubsub.NewClient(endpoint, cred, nil)
if err != nil {
// TODO: Update the following line with your application specific error handling logic
log.Fatalf("ERROR: %s", err)
}
_ = client // ignore
}
func NewClientFromConnectionString ¶
func NewClientFromConnectionString(connectionString string, options *ClientOptions) (*Client, error)
NewClientFromConnectionString creates a Client from a connection string
Example ¶
ExampleNewClientFromConnectionString demonstrates how to create a new client with connection string.
package main
import (
"log"
"os"
"github.com/Azure/azure-sdk-for-go/sdk/messaging/azwebpubsub"
)
func main() {
connectionString := os.Getenv("WEBPUBSUB_CONNECTIONSTRING")
if connectionString == "" {
return
}
client, err := azwebpubsub.NewClientFromConnectionString(connectionString, nil)
if err != nil {
// TODO: Update the following line with your application specific error handling logic
log.Fatalf("ERROR: %s", err)
}
_ = client // ignore
}
func (*Client) AddConnectionToGroup ¶
func (client *Client) AddConnectionToGroup(ctx context.Context, hub string, group string, connectionID string, options *AddConnectionToGroupOptions) (AddConnectionToGroupResponse, error)
AddConnectionToGroup - Add a connection to the target group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-07-01
- hub - Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.
- group - Target group name, which length should be greater than 0 and less than 1025.
- connectionID - Target connection Id
- options - AddConnectionToGroupOptions contains the optional parameters for the Client.AddConnectionToGroup method.
func (*Client) AddConnectionsToGroups ¶
func (client *Client) AddConnectionsToGroups(ctx context.Context, hub string, groupsToAdd AddToGroupsRequest, options *AddConnectionsToGroupsOptions) (AddConnectionsToGroupsResponse, error)
AddConnectionsToGroups - Add filtered connections to multiple groups. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-07-01
- hub - Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.
- groupsToAdd - Target groups and connection filter.
- options - AddConnectionsToGroupsOptions contains the optional parameters for the Client.AddConnectionsToGroups method.
func (*Client) AddUserToGroup ¶
func (client *Client) AddUserToGroup(ctx context.Context, hub string, group string, userID string, options *AddUserToGroupOptions) (AddUserToGroupResponse, error)
AddUserToGroup - Add a user to the target group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-07-01
- hub - Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.
- group - Target group name, which length should be greater than 0 and less than 1025.
- userID - Target user Id.
- options - AddUserToGroupOptions contains the optional parameters for the Client.AddUserToGroup method.
func (*Client) CloseAllConnections ¶
func (client *Client) CloseAllConnections(ctx context.Context, hub string, options *CloseAllConnectionsOptions) (CloseAllConnectionsResponse, error)
CloseAllConnections - Close the connections in the hub. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-07-01
- hub - Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.
- options - CloseAllConnectionsOptions contains the optional parameters for the Client.CloseAllConnections method.
func (*Client) CloseConnection ¶
func (client *Client) CloseConnection(ctx context.Context, hub string, connectionID string, options *CloseConnectionOptions) (CloseConnectionResponse, error)
CloseConnection - Close the client connection. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-07-01
- hub - Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.
- connectionID - Target connection Id.
- options - CloseConnectionOptions contains the optional parameters for the Client.CloseConnection method.
func (*Client) CloseGroupConnections ¶
func (client *Client) CloseGroupConnections(ctx context.Context, hub string, group string, options *CloseGroupConnectionsOptions) (CloseGroupConnectionsResponse, error)
CloseGroupConnections - Close connections in the specific group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-07-01
- hub - Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.
- group - Target group name, which length should be greater than 0 and less than 1025.
- options - CloseGroupConnectionsOptions contains the optional parameters for the Client.CloseGroupConnections method.
func (*Client) CloseUserConnections ¶
func (client *Client) CloseUserConnections(ctx context.Context, hub string, userID string, options *CloseUserConnectionsOptions) (CloseUserConnectionsResponse, error)
CloseUserConnections - Close connections for the specific user. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-07-01
- hub - Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.
- userID - The user Id.
- options - CloseUserConnectionsOptions contains the optional parameters for the Client.CloseUserConnections method.
func (*Client) GenerateClientAccessURL ¶
func (c *Client) GenerateClientAccessURL(ctx context.Context, hub string, options *GenerateClientAccessURLOptions) (*GenerateClientAccessURLResponse, error)
GenerateClientAccessURL - generate URL for the WebSocket clients
- hub - The hub name.
- options - GenerateClientAccessUrlOptions contains the optional parameters for the Client.GenerateClientAccessURL method.
func (*Client) GrantPermission ¶
func (client *Client) GrantPermission(ctx context.Context, hub string, permission Permission, connectionID string, options *GrantPermissionOptions) (GrantPermissionResponse, error)
GrantPermission - Grant permission to the connection. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-07-01
- hub - Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.
- permission - The permission: current supported actions are joinLeaveGroup and sendToGroup.
- connectionID - Target connection Id.
- options - GrantPermissionOptions contains the optional parameters for the Client.GrantPermission method.
func (*Client) RemoveConnectionFromAllGroups ¶
func (client *Client) RemoveConnectionFromAllGroups(ctx context.Context, hub string, connectionID string, options *RemoveConnectionFromAllGroupsOptions) (RemoveConnectionFromAllGroupsResponse, error)
RemoveConnectionFromAllGroups - Remove a connection from all groups. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-07-01
- hub - Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.
- connectionID - Target connection Id.
- options - RemoveConnectionFromAllGroupsOptions contains the optional parameters for the Client.RemoveConnectionFromAllGroups method.
func (*Client) RemoveConnectionFromGroup ¶
func (client *Client) RemoveConnectionFromGroup(ctx context.Context, hub string, group string, connectionID string, options *RemoveConnectionFromGroupOptions) (RemoveConnectionFromGroupResponse, error)
RemoveConnectionFromGroup - Remove a connection from the target group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-07-01
- hub - Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.
- group - Target group name, which length should be greater than 0 and less than 1025.
- connectionID - Target connection Id.
- options - RemoveConnectionFromGroupOptions contains the optional parameters for the Client.RemoveConnectionFromGroup method.
func (*Client) RemoveConnectionsFromGroups ¶
func (client *Client) RemoveConnectionsFromGroups(ctx context.Context, hub string, groupsToRemove RemoveFromGroupsRequest, options *RemoveConnectionsFromGroupsOptions) (RemoveConnectionsFromGroupsResponse, error)
RemoveConnectionsFromGroups - Remove filtered connections from multiple groups. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-07-01
- hub - Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.
- groupsToRemove - Target groups and connection filter.
- options - RemoveConnectionsFromGroupsOptions contains the optional parameters for the Client.RemoveConnectionsFromGroups method.
func (*Client) RemoveUserFromAllGroups ¶
func (client *Client) RemoveUserFromAllGroups(ctx context.Context, hub string, userID string, options *RemoveUserFromAllGroupsOptions) (RemoveUserFromAllGroupsResponse, error)
RemoveUserFromAllGroups - Remove a user from all groups. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-07-01
- hub - Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.
- userID - Target user Id.
- options - RemoveUserFromAllGroupsOptions contains the optional parameters for the Client.RemoveUserFromAllGroups method.
func (*Client) RemoveUserFromGroup ¶
func (client *Client) RemoveUserFromGroup(ctx context.Context, hub string, group string, userID string, options *RemoveUserFromGroupOptions) (RemoveUserFromGroupResponse, error)
RemoveUserFromGroup - Remove a user from the target group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-07-01
- hub - Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.
- group - Target group name, which length should be greater than 0 and less than 1025.
- userID - Target user Id.
- options - RemoveUserFromGroupOptions contains the optional parameters for the Client.RemoveUserFromGroup method.
func (*Client) RevokePermission ¶
func (client *Client) RevokePermission(ctx context.Context, hub string, permission Permission, connectionID string, options *RevokePermissionOptions) (RevokePermissionResponse, error)
RevokePermission - Revoke permission for the connection. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-07-01
- hub - Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.
- permission - The permission: current supported actions are joinLeaveGroup and sendToGroup.
- connectionID - Target connection Id.
- options - RevokePermissionOptions contains the optional parameters for the Client.RevokePermission method.
func (*Client) SendToAll ¶
func (client *Client) SendToAll(ctx context.Context, hub string, contentType ContentType, message io.ReadSeekCloser, options *SendToAllOptions) (SendToAllResponse, error)
SendToAll - Broadcast content inside request body to all the connected client connections. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-07-01
- hub - Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.
- contentType - Upload file type
- message - The payload body.
- options - SendToAllOptions contains the optional parameters for the Client.SendToAll method.
func (*Client) SendToConnection ¶
func (client *Client) SendToConnection(ctx context.Context, hub string, connectionID string, contentType ContentType, message io.ReadSeekCloser, options *SendToConnectionOptions) (SendToConnectionResponse, error)
SendToConnection - Send content inside request body to the specific connection. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-07-01
- hub - Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.
- connectionID - The connection Id.
- contentType - Upload file type
- message - The payload body.
- options - SendToConnectionOptions contains the optional parameters for the Client.SendToConnection method.
func (*Client) SendToGroup ¶
func (client *Client) SendToGroup(ctx context.Context, hub string, group string, contentType ContentType, message io.ReadSeekCloser, options *SendToGroupOptions) (SendToGroupResponse, error)
SendToGroup - Send content inside request body to a group of connections. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-07-01
- hub - Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.
- group - Target group name, which length should be greater than 0 and less than 1025.
- contentType - Upload file type
- message - The payload body.
- options - SendToGroupOptions contains the optional parameters for the Client.SendToGroup method.
func (*Client) SendToUser ¶
func (client *Client) SendToUser(ctx context.Context, hub string, userID string, contentType ContentType, message io.ReadSeekCloser, options *SendToUserOptions) (SendToUserResponse, error)
SendToUser - Send content inside request body to the specific user. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-07-01
- hub - Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.
- userID - The user Id.
- contentType - Upload file type
- message - The payload body.
- options - SendToUserOptions contains the optional parameters for the Client.SendToUser method.
type ClientOptions ¶
type ClientOptions struct {
azcore.ClientOptions
}
ClientOptions contains optional settings for Client
type CloseAllConnectionsOptions ¶
type CloseAllConnectionsOptions struct {
// Exclude these connectionIds when closing the connections in the hub.
Excluded []string
// The reason closing the client connection.
Reason *string
}
CloseAllConnectionsOptions contains the optional parameters for the Client.CloseAllConnections method.
type CloseAllConnectionsResponse ¶
type CloseAllConnectionsResponse struct {
}
CloseAllConnectionsResponse contains the response from method Client.CloseAllConnections.
type CloseConnectionOptions ¶
type CloseConnectionOptions struct {
// The reason closing the client connection.
Reason *string
}
CloseConnectionOptions contains the optional parameters for the Client.CloseConnection method.
type CloseConnectionResponse ¶
type CloseConnectionResponse struct {
}
CloseConnectionResponse contains the response from method Client.CloseConnection.
type CloseGroupConnectionsOptions ¶
type CloseGroupConnectionsOptions struct {
// Exclude these connectionIds when closing the connections in the group.
Excluded []string
// The reason closing the client connection.
Reason *string
}
CloseGroupConnectionsOptions contains the optional parameters for the Client.CloseGroupConnections method.
type CloseGroupConnectionsResponse ¶
type CloseGroupConnectionsResponse struct {
}
CloseGroupConnectionsResponse contains the response from method Client.CloseGroupConnections.
type CloseUserConnectionsOptions ¶
type CloseUserConnectionsOptions struct {
// Exclude these connectionIds when closing the connections for the user.
Excluded []string
// The reason closing the client connection.
Reason *string
}
CloseUserConnectionsOptions contains the optional parameters for the Client.CloseUserConnections method.
type CloseUserConnectionsResponse ¶
type CloseUserConnectionsResponse struct {
}
CloseUserConnectionsResponse contains the response from method Client.CloseUserConnections.
type ConnectionExistsOptions ¶
type ConnectionExistsOptions struct {
}
ConnectionExistsOptions contains the optional parameters for the Client.ConnectionExists method.
type ConnectionExistsResponse ¶
type ConnectionExistsResponse struct {
}
ConnectionExistsResponse contains the response from method Client.ConnectionExists.
type ContentType ¶
type ContentType string
ContentType - Content type for upload
const ( // ContentTypeApplicationJSON - Content Type 'application/json' ContentTypeApplicationJSON ContentType = "application/json" // ContentTypeApplicationOctetStream - Content Type 'application/octet-stream' ContentTypeApplicationOctetStream ContentType = "application/octet-stream" // ContentTypeTextPlain - Content Type 'text/plain' ContentTypeTextPlain ContentType = "text/plain" )
func PossibleContentTypeValues ¶
func PossibleContentTypeValues() []ContentType
PossibleContentTypeValues returns the possible values for the ContentType const type.
type GenerateClientAccessURLOptions ¶
type GenerateClientAccessURLOptions struct {
// UserID is the user ID for the client.
UserID string
// Roles are the roles that the connection with the generated token will have.
// Roles give the client initial permissions to leave, join, or publish to groups when using PubSub subprotocol.
// Possible role values:
// - webpubsub.joinLeaveGroup: the client can join or leave any group.
// - webpubsub.sendToGroup: the client can send messages to any group.
// - webpubsub.joinLeaveGroup.<group>: the client can join or leave group <group>.
// - webpubsub.sendToGroup.<group>: the client can send messages to group <group>.
// More info: https://azure.github.io/azure-webpubsub/references/pubsub-websocket-subprotocol#permissions
Roles []string
// ExpirationTimeInMinutes is the number of minutes until the token expires. Default value(60 minutes) is used if the value is 0.
ExpirationTimeInMinutes int32
// Groups are the groups to join when the client connects.
Groups []string
}
GenerateClientAccessURLOptions represents the options for generating a client access url
type GenerateClientAccessURLResponse ¶
type GenerateClientAccessURLResponse struct {
// The client token
Token string
// The base URL for the client to connect to
BaseURL string
// The URL client connects to with access_token query string
URL string
}
GenerateClientAccessURLResponse represents the response type for the generated client access url
type GenerateClientTokenOptions ¶
type GenerateClientTokenOptions struct {
// Groups that the connection will join when it connects.
Group []string
// The expire time of the generated token.
MinutesToExpire *int32
// Roles that the connection with the generated token will have.
Role []string
// User Id.
UserID *string
}
GenerateClientTokenOptions contains the optional parameters for the Client.GenerateClientToken method.
type GenerateClientTokenResponse ¶
type GenerateClientTokenResponse struct {
// The response object containing the token for the client
TokenResponse
}
GenerateClientTokenResponse contains the response from method Client.GenerateClientToken.
type GrantPermissionOptions ¶
type GrantPermissionOptions struct {
// The meaning of the target depends on the specific permission. For joinLeaveGroup and sendToGroup, targetName is a required
// parameter standing for the group name.
TargetName *string
}
GrantPermissionOptions contains the optional parameters for the Client.GrantPermission method.
type GrantPermissionResponse ¶
type GrantPermissionResponse struct {
}
GrantPermissionResponse contains the response from method Client.GrantPermission.
type GroupExistsOptions ¶
type GroupExistsOptions struct {
}
GroupExistsOptions contains the optional parameters for the Client.GroupExists method.
type GroupExistsResponse ¶
type GroupExistsResponse struct {
}
GroupExistsResponse contains the response from method Client.GroupExists.
type Permission ¶
type Permission string
Permission contains the allowed permissions
const ( PermissionJoinLeaveGroup Permission = "joinLeaveGroup" PermissionSendToGroup Permission = "sendToGroup" )
func PossiblePermissionValues ¶
func PossiblePermissionValues() []Permission
PossiblePermissionValues returns the possible values for the Permission const type.
type RemoveConnectionFromAllGroupsOptions ¶
type RemoveConnectionFromAllGroupsOptions struct {
}
RemoveConnectionFromAllGroupsOptions contains the optional parameters for the Client.RemoveConnectionFromAllGroups method.
type RemoveConnectionFromAllGroupsResponse ¶
type RemoveConnectionFromAllGroupsResponse struct {
}
RemoveConnectionFromAllGroupsResponse contains the response from method Client.RemoveConnectionFromAllGroups.
type RemoveConnectionFromGroupOptions ¶
type RemoveConnectionFromGroupOptions struct {
}
RemoveConnectionFromGroupOptions contains the optional parameters for the Client.RemoveConnectionFromGroup method.
type RemoveConnectionFromGroupResponse ¶
type RemoveConnectionFromGroupResponse struct {
}
RemoveConnectionFromGroupResponse contains the response from method Client.RemoveConnectionFromGroup.
type RemoveConnectionsFromGroupsOptions ¶
type RemoveConnectionsFromGroupsOptions struct {
}
RemoveConnectionsFromGroupsOptions contains the optional parameters for the Client.RemoveConnectionsFromGroups method.
type RemoveConnectionsFromGroupsResponse ¶
type RemoveConnectionsFromGroupsResponse struct {
}
RemoveConnectionsFromGroupsResponse contains the response from method Client.RemoveConnectionsFromGroups.
type RemoveFromGroupsRequest ¶
type RemoveFromGroupsRequest struct {
// An OData filter which target connections satisfy
Filter *string
// A list of groups which target connections will be removed from
Groups []string
}
RemoveFromGroupsRequest - The request object containing targets groups and a connection filter
func (RemoveFromGroupsRequest) MarshalJSON ¶
func (r RemoveFromGroupsRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RemoveFromGroupsRequest.
func (*RemoveFromGroupsRequest) UnmarshalJSON ¶
func (r *RemoveFromGroupsRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RemoveFromGroupsRequest.
type RemoveUserFromAllGroupsOptions ¶
type RemoveUserFromAllGroupsOptions struct {
}
RemoveUserFromAllGroupsOptions contains the optional parameters for the Client.RemoveUserFromAllGroups method.
type RemoveUserFromAllGroupsResponse ¶
type RemoveUserFromAllGroupsResponse struct {
}
RemoveUserFromAllGroupsResponse contains the response from method Client.RemoveUserFromAllGroups.
type RemoveUserFromGroupOptions ¶
type RemoveUserFromGroupOptions struct {
}
RemoveUserFromGroupOptions contains the optional parameters for the Client.RemoveUserFromGroup method.
type RemoveUserFromGroupResponse ¶
type RemoveUserFromGroupResponse struct {
}
RemoveUserFromGroupResponse contains the response from method Client.RemoveUserFromGroup.
type RevokePermissionOptions ¶
type RevokePermissionOptions struct {
// The meaning of the target depends on the specific permission. For joinLeaveGroup and sendToGroup, targetName is a required
// parameter standing for the group name.
TargetName *string
}
RevokePermissionOptions contains the optional parameters for the Client.RevokePermission method.
type RevokePermissionResponse ¶
type RevokePermissionResponse struct {
}
RevokePermissionResponse contains the response from method Client.RevokePermission.
type SendToAllOptions ¶
type SendToAllOptions struct {
// Excluded connection Ids.
Excluded []string
// Following OData filter syntax to filter out the subscribers receiving the messages.
Filter *string
// The time-to-live (TTL) value in seconds for messages sent to the service. 0 is the default value, which means the message
// never expires. 300 is the maximum value. If this parameter is non-zero,
// messages that are not consumed by the client within the specified TTL will be dropped by the service. This parameter can
// help when the client's bandwidth is limited.
MessageTTLSeconds *int32
}
SendToAllOptions contains the optional parameters for the Client.SendToAll method.
type SendToAllResponse ¶
type SendToAllResponse struct {
}
SendToAllResponse contains the response from method Client.SendToAll.
type SendToConnectionOptions ¶
type SendToConnectionOptions struct {
// The time-to-live (TTL) value in seconds for messages sent to the service. 0 is the default value, which means the message
// never expires. 300 is the maximum value. If this parameter is non-zero,
// messages that are not consumed by the client within the specified TTL will be dropped by the service. This parameter can
// help when the client's bandwidth is limited.
MessageTTLSeconds *int32
}
SendToConnectionOptions contains the optional parameters for the Client.SendToConnection method.
type SendToConnectionResponse ¶
type SendToConnectionResponse struct {
}
SendToConnectionResponse contains the response from method Client.SendToConnection.
type SendToGroupOptions ¶
type SendToGroupOptions struct {
// Excluded connection Ids
Excluded []string
// Following OData filter syntax to filter out the subscribers receiving the messages.
Filter *string
// The time-to-live (TTL) value in seconds for messages sent to the service. 0 is the default value, which means the message
// never expires. 300 is the maximum value. If this parameter is non-zero,
// messages that are not consumed by the client within the specified TTL will be dropped by the service. This parameter can
// help when the client's bandwidth is limited.
MessageTTLSeconds *int32
}
SendToGroupOptions contains the optional parameters for the Client.SendToGroup method.
type SendToGroupResponse ¶
type SendToGroupResponse struct {
}
SendToGroupResponse contains the response from method Client.SendToGroup.
type SendToUserOptions ¶
type SendToUserOptions struct {
// Following OData filter syntax to filter out the subscribers receiving the messages.
Filter *string
// The time-to-live (TTL) value in seconds for messages sent to the service. 0 is the default value, which means the message
// never expires. 300 is the maximum value. If this parameter is non-zero,
// messages that are not consumed by the client within the specified TTL will be dropped by the service. This parameter can
// help when the client's bandwidth is limited.
MessageTTLSeconds *int32
}
SendToUserOptions contains the optional parameters for the Client.SendToUser method.
type SendToUserResponse ¶
type SendToUserResponse struct {
}
SendToUserResponse contains the response from method Client.SendToUser.
type TokenResponse ¶
type TokenResponse struct {
// The token value for the WebSocket client to connect to the service
Token *string
}
TokenResponse - The response object containing the token for the client
func (TokenResponse) MarshalJSON ¶
func (c TokenResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TokenResponse.
func (*TokenResponse) UnmarshalJSON ¶
func (c *TokenResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TokenResponse.
type UserExistsOptions ¶
type UserExistsOptions struct {
}
UserExistsOptions contains the optional parameters for the Client.UserExists method.
type UserExistsResponse ¶
type UserExistsResponse struct {
}
UserExistsResponse contains the response from method Client.UserExists.
.