Documentation
¶
Index ¶
- Constants
- Variables
- func BuildAttachmentCommitObjectRPCParams(record *identity.StoredIdentity, manager *identity.Manager, serviceDID string, ...) (map[string]any, error)
- func BuildAttachmentCreateSlotRPCParams(record *identity.StoredIdentity, manager *identity.Manager, serviceDID string, ...) (map[string]any, error)
- func BuildAttachmentDownloadTicketRPCParams(record *identity.StoredIdentity, manager *identity.Manager, serviceDID string, ...) (map[string]any, error)
- func BuildDirectAttachmentSendRPCParams(record *identity.StoredIdentity, manager *identity.Manager, targetDID string, ...) (map[string]any, error)
- func BuildDirectSendRPCParams(record *identity.StoredIdentity, manager *identity.Manager, targetDID string, ...) (map[string]any, error)
- func BuildGroupAddRPCParams(record *identity.StoredIdentity, manager *identity.Manager, ...) (map[string]any, error)
- func BuildGroupAttachmentSendRPCParams(record *identity.StoredIdentity, manager *identity.Manager, groupDID string, ...) (map[string]any, error)
- func BuildGroupCreateRPCParams(record *identity.StoredIdentity, manager *identity.Manager, serviceDID string, ...) (map[string]any, error)
- func BuildGroupGetInfoRPCParams(record *identity.StoredIdentity, request GroupInfoRequest) (map[string]any, error)
- func BuildGroupGetRPCParams(record *identity.StoredIdentity, request GroupGetRequest) (map[string]any, error)
- func BuildGroupJoinRPCParams(record *identity.StoredIdentity, manager *identity.Manager, ...) (map[string]any, error)
- func BuildGroupLeaveRPCParams(record *identity.StoredIdentity, manager *identity.Manager, ...) (map[string]any, error)
- func BuildGroupListRPCParams(record *identity.StoredIdentity, request GroupListRequest) (map[string]any, error)
- func BuildGroupMembersRPCParams(record *identity.StoredIdentity, request GroupMembersRequest) (map[string]any, error)
- func BuildGroupMessagesRPCParams(record *identity.StoredIdentity, request GroupMessagesRequest) (map[string]any, error)
- func BuildGroupRemoveRPCParams(record *identity.StoredIdentity, manager *identity.Manager, ...) (map[string]any, error)
- func BuildGroupSendRPCParams(record *identity.StoredIdentity, manager *identity.Manager, groupDID string, ...) (map[string]any, error)
- func BuildGroupUpdatePolicyRPCParams(record *identity.StoredIdentity, manager *identity.Manager, groupDID string, ...) (map[string]any, error)
- func BuildGroupUpdateProfileRPCParams(record *identity.StoredIdentity, manager *identity.Manager, groupDID string, ...) (map[string]any, error)
- func BuildHistoryRPCParams(record *identity.StoredIdentity, request HistoryRequest) (map[string]any, error)
- func BuildInboxRPCParams(record *identity.StoredIdentity, request InboxRequest) map[string]any
- func BuildMarkReadRPCParams(record *identity.StoredIdentity, request MarkReadRequest) (map[string]any, error)
- func BuildSecureAckPayload(sessionID string, ackedMessageID string) map[string]any
- func BuildSecureInitPayload() map[string]any
- func CompleteBareHandle(target string, didDomain string) string
- func FlushQueuedSecureOutbox(ctx context.Context, resolved *appconfig.Resolved, manager *identity.Manager, ...) []string
- func IsSecureAckPlaintext(plaintext map[string]any) bool
- func IsSecureInitPlaintext(plaintext map[string]any) bool
- func NewSecureE2EEClientForRecord(ctx context.Context, manager *identity.Manager, ...) (*anpsdk.MessageServiceE2EEClient, error)
- func PublishSecurePrekeys(ctx context.Context, resolved *appconfig.Resolved, manager *identity.Manager, ...) []string
- type AttachmentDownloadRequest
- type CommandResult
- type GroupCreateRequest
- type GroupGetRequest
- type GroupInfoRequest
- type GroupJoinRequest
- type GroupLeaveRequest
- type GroupListRequest
- type GroupMemberRequest
- type GroupMembersRequest
- type GroupMessagesRequest
- type GroupUpdateRequest
- type HTTPTransport
- func (t *HTTPTransport) AddGroupMember(ctx context.Context, request GroupMemberRequest) (map[string]any, error)
- func (t *HTTPTransport) CommitAttachmentObject(ctx context.Context, serviceDID string, prepared *preparedAttachment, ...) (*attachmentCommitObjectResult, error)
- func (t *HTTPTransport) CreateAttachmentSlot(ctx context.Context, targetKind string, targetDID string, ...) (*attachmentCreateSlotResult, error)
- func (t *HTTPTransport) CreateGroup(ctx context.Context, request GroupCreateRequest) (map[string]any, error)
- func (t *HTTPTransport) DownloadAttachmentObject(ctx context.Context, objectURI string, downloadTicket string) ([]byte, http.Header, error)
- func (t *HTTPTransport) GetAttachmentDownloadTicket(ctx context.Context, params map[string]any) (*attachmentDownloadTicketResult, error)
- func (t *HTTPTransport) GetGroup(ctx context.Context, request GroupGetRequest) (map[string]any, error)
- func (t *HTTPTransport) GetGroupInfo(ctx context.Context, request GroupInfoRequest) (map[string]any, error)
- func (t *HTTPTransport) GetHistory(ctx context.Context, request HistoryRequest) (map[string]any, error)
- func (t *HTTPTransport) GetInbox(ctx context.Context, request InboxRequest) (map[string]any, error)
- func (t *HTTPTransport) GetMessageServiceDID(ctx context.Context) (string, error)
- func (t *HTTPTransport) JoinGroup(ctx context.Context, request GroupJoinRequest) (map[string]any, error)
- func (t *HTTPTransport) LeaveGroup(ctx context.Context, request GroupLeaveRequest) (map[string]any, error)
- func (t *HTTPTransport) ListGroupMembers(ctx context.Context, request GroupMembersRequest) (map[string]any, error)
- func (t *HTTPTransport) ListGroupMessages(ctx context.Context, request GroupMessagesRequest) (map[string]any, error)
- func (t *HTTPTransport) ListGroups(ctx context.Context, request GroupListRequest) (map[string]any, error)
- func (t *HTTPTransport) MarkRead(ctx context.Context, request MarkReadRequest) (map[string]any, error)
- func (t *HTTPTransport) RemoveGroupMember(ctx context.Context, request GroupMemberRequest) (map[string]any, error)
- func (t *HTTPTransport) SendDirect(ctx context.Context, request SendRequest) (*directSendResult, error)
- func (t *HTTPTransport) SendDirectAttachment(ctx context.Context, targetDID string, manifest map[string]any) (*directSendResult, error)
- func (t *HTTPTransport) SendGroup(ctx context.Context, request SendRequest) (*groupSendResult, error)
- func (t *HTTPTransport) SendGroupAttachment(ctx context.Context, groupDID string, manifest map[string]any) (*groupSendResult, error)
- func (t *HTTPTransport) UpdateGroupPolicy(ctx context.Context, request GroupGetRequest, patch map[string]any) (map[string]any, error)
- func (t *HTTPTransport) UpdateGroupProfile(ctx context.Context, request GroupGetRequest, patch map[string]any) (map[string]any, error)
- func (t *HTTPTransport) UploadAttachmentObject(ctx context.Context, uploadURI string, headers map[string]string, ...) error
- func (t *HTTPTransport) WithRPCEndpoint(rpcEndpointURL string) *HTTPTransport
- type HistoryRequest
- type InboxRequest
- type MarkReadRequest
- type SecureOutboxActionRequest
- type SecurePeerRequest
- type SecureStatusRequest
- type SendRequest
- type Service
- func (s *Service) AddGroupMember(ctx context.Context, request GroupMemberRequest) (*CommandResult, error)
- func (s *Service) Config() *appconfig.Resolved
- func (s *Service) CreateGroup(ctx context.Context, request GroupCreateRequest) (*CommandResult, error)
- func (s *Service) DownloadAttachment(ctx context.Context, request AttachmentDownloadRequest) (*CommandResult, error)
- func (s *Service) GetGroup(ctx context.Context, request GroupGetRequest) (*CommandResult, error)
- func (s *Service) GroupMembers(ctx context.Context, request GroupMembersRequest) (*CommandResult, error)
- func (s *Service) GroupMessages(ctx context.Context, request GroupMessagesRequest) (*CommandResult, error)
- func (s *Service) History(ctx context.Context, request HistoryRequest) (*CommandResult, error)
- func (s *Service) Inbox(ctx context.Context, request InboxRequest) (*CommandResult, error)
- func (s *Service) JoinGroup(ctx context.Context, request GroupJoinRequest) (*CommandResult, error)
- func (s *Service) LeaveGroup(ctx context.Context, request GroupLeaveRequest) (*CommandResult, error)
- func (s *Service) ListGroups(ctx context.Context, request GroupListRequest) (*CommandResult, error)
- func (s *Service) MarkRead(ctx context.Context, request MarkReadRequest) (*CommandResult, error)
- func (s *Service) RemoveGroupMember(ctx context.Context, request GroupMemberRequest) (*CommandResult, error)
- func (s *Service) SecureDrop(ctx context.Context, request SecureOutboxActionRequest) (*CommandResult, error)
- func (s *Service) SecureFailed(ctx context.Context, request SecureStatusRequest) (*CommandResult, error)
- func (s *Service) SecureInit(ctx context.Context, request SecurePeerRequest) (*CommandResult, error)
- func (s *Service) SecureRepair(ctx context.Context, request SecurePeerRequest) (*CommandResult, error)
- func (s *Service) SecureRetry(ctx context.Context, request SecureOutboxActionRequest) (*CommandResult, error)
- func (s *Service) SecureStatus(ctx context.Context, request SecureStatusRequest) (*CommandResult, error)
- func (s *Service) Send(ctx context.Context, request SendRequest) (*CommandResult, error)
- func (s *Service) UpdateGroup(ctx context.Context, request GroupUpdateRequest) (*CommandResult, error)
- type ServiceError
- type Transport
- type WSProxyTransport
- func (t *WSProxyTransport) AddGroupMember(ctx context.Context, request GroupMemberRequest) (map[string]any, error)
- func (t *WSProxyTransport) CreateGroup(ctx context.Context, request GroupCreateRequest) (map[string]any, error)
- func (t *WSProxyTransport) GetGroup(ctx context.Context, request GroupGetRequest) (map[string]any, error)
- func (t *WSProxyTransport) GetGroupInfo(ctx context.Context, request GroupInfoRequest) (map[string]any, error)
- func (t *WSProxyTransport) GetHistory(ctx context.Context, request HistoryRequest) (map[string]any, error)
- func (t *WSProxyTransport) GetInbox(ctx context.Context, request InboxRequest) (map[string]any, error)
- func (t *WSProxyTransport) JoinGroup(ctx context.Context, request GroupJoinRequest) (map[string]any, error)
- func (t *WSProxyTransport) LeaveGroup(ctx context.Context, request GroupLeaveRequest) (map[string]any, error)
- func (t *WSProxyTransport) ListGroupMembers(ctx context.Context, request GroupMembersRequest) (map[string]any, error)
- func (t *WSProxyTransport) ListGroupMessages(ctx context.Context, request GroupMessagesRequest) (map[string]any, error)
- func (t *WSProxyTransport) ListGroups(ctx context.Context, request GroupListRequest) (map[string]any, error)
- func (t *WSProxyTransport) MarkRead(ctx context.Context, request MarkReadRequest) (map[string]any, error)
- func (t *WSProxyTransport) RemoveGroupMember(ctx context.Context, request GroupMemberRequest) (map[string]any, error)
- func (t *WSProxyTransport) SendDirect(ctx context.Context, request SendRequest) (*directSendResult, error)
- func (t *WSProxyTransport) SendGroup(ctx context.Context, request SendRequest) (*groupSendResult, error)
- func (t *WSProxyTransport) UpdateGroupPolicy(ctx context.Context, request GroupGetRequest, patch map[string]any) (map[string]any, error)
- func (t *WSProxyTransport) UpdateGroupProfile(ctx context.Context, request GroupGetRequest, patch map[string]any) (map[string]any, error)
Constants ¶
View Source
const ( MessageRPCEndpoint = "/im/rpc" MessageWSEndpoint = "/im/ws" )
View Source
const OriginProofScheme = "anp-rfc9421-origin-proof-v1"
Variables ¶
View Source
var ( ErrTargetRequired = errors.New("direct message target is required") ErrGroupRequired = errors.New("group target is required") ErrMemberRequired = errors.New("group member target is required") ErrGroupOwnerCannotLeave = errors.New("group owner cannot leave the group") ErrTextRequired = errors.New("message text is required") ErrFilePathRequired = errors.New("attachment file path is required") ErrMimeTypeWithoutFile = errors.New("mime_type requires an attachment file") ErrMessageIDRequired = errors.New("attachment message id is required") ErrOutputPathRequired = errors.New("attachment output path is required") ErrDownloadTargetNeeded = errors.New("attachment download requires either --with or --group") ErrDownloadTargetConflict = errors.New( "attachment download accepts either --with or --group, but not both", ) ErrAttachmentNotFound = errors.New("attachment not found in message content") ErrAttachmentIDRequired = errors.New("attachment_id is required for messages with multiple attachments") ErrAttachmentMessageInvalid = errors.New("message is not an attachment manifest") ErrAttachmentSenderRequired = errors.New("attachment message sender_did is required") ErrSecureNotSupported = errors.New("secure messaging is not supported for this command yet") ErrMessageNotFound = errors.New("message not found") )
Functions ¶
func BuildGroupAddRPCParams ¶
func BuildGroupAddRPCParams(record *identity.StoredIdentity, manager *identity.Manager, request GroupMemberRequest) (map[string]any, error)
func BuildGroupCreateRPCParams ¶
func BuildGroupCreateRPCParams(record *identity.StoredIdentity, manager *identity.Manager, serviceDID string, request GroupCreateRequest) (map[string]any, error)
func BuildGroupGetInfoRPCParams ¶
func BuildGroupGetInfoRPCParams(record *identity.StoredIdentity, request GroupInfoRequest) (map[string]any, error)
func BuildGroupGetRPCParams ¶
func BuildGroupGetRPCParams(record *identity.StoredIdentity, request GroupGetRequest) (map[string]any, error)
func BuildGroupJoinRPCParams ¶
func BuildGroupJoinRPCParams(record *identity.StoredIdentity, manager *identity.Manager, request GroupJoinRequest) (map[string]any, error)
func BuildGroupLeaveRPCParams ¶
func BuildGroupLeaveRPCParams(record *identity.StoredIdentity, manager *identity.Manager, request GroupLeaveRequest) (map[string]any, error)
func BuildGroupListRPCParams ¶ added in v1.0.13
func BuildGroupListRPCParams(record *identity.StoredIdentity, request GroupListRequest) (map[string]any, error)
func BuildGroupMembersRPCParams ¶
func BuildGroupMembersRPCParams(record *identity.StoredIdentity, request GroupMembersRequest) (map[string]any, error)
func BuildGroupMessagesRPCParams ¶
func BuildGroupMessagesRPCParams(record *identity.StoredIdentity, request GroupMessagesRequest) (map[string]any, error)
func BuildGroupRemoveRPCParams ¶
func BuildGroupRemoveRPCParams(record *identity.StoredIdentity, manager *identity.Manager, request GroupMemberRequest) (map[string]any, error)
func BuildGroupSendRPCParams ¶
func BuildHistoryRPCParams ¶
func BuildHistoryRPCParams(record *identity.StoredIdentity, request HistoryRequest) (map[string]any, error)
func BuildInboxRPCParams ¶
func BuildInboxRPCParams(record *identity.StoredIdentity, request InboxRequest) map[string]any
func BuildMarkReadRPCParams ¶
func BuildMarkReadRPCParams(record *identity.StoredIdentity, request MarkReadRequest) (map[string]any, error)
func BuildSecureAckPayload ¶ added in v1.0.16
func BuildSecureInitPayload ¶ added in v1.0.16
func CompleteBareHandle ¶
CompleteBareHandle expands a bare handle like "alice" to "alice.<didDomain>". Explicit DIDs and full handles pass through unchanged.
func FlushQueuedSecureOutbox ¶ added in v1.0.16
func IsSecureAckPlaintext ¶ added in v1.0.16
func IsSecureInitPlaintext ¶ added in v1.0.16
func NewSecureE2EEClientForRecord ¶ added in v1.0.16
func NewSecureE2EEClientForRecord(ctx context.Context, manager *identity.Manager, record *identity.StoredIdentity, rpc func(string, map[string]any) (map[string]any, error)) (*anpsdk.MessageServiceE2EEClient, error)
NewSecureE2EEClientForRecord creates one direct-e2ee client for the given identity.
Types ¶
type CommandResult ¶
type GroupCreateRequest ¶
type GroupGetRequest ¶
type GroupInfoRequest ¶
type GroupJoinRequest ¶
type GroupLeaveRequest ¶
type GroupListRequest ¶ added in v1.0.13
type GroupMemberRequest ¶
type GroupMembersRequest ¶
type GroupMessagesRequest ¶
type GroupUpdateRequest ¶
type GroupUpdateRequest struct {
IdentityName string
Group string
Name string
Description string
Discoverability string
AdmissionMode string
Slug string
Goal string
Rules string
MessagePrompt string
DocURL string
AttachmentsAllowed *bool
MaxMembers string
MemberMaxMessages *int64
MemberMaxTotalChars *int64
}
type HTTPTransport ¶
type HTTPTransport struct {
// contains filtered or unexported fields
}
func NewHTTPTransport ¶
func NewHTTPTransport(resolved *appconfig.Resolved, auth *authContext, httpClient *http.Client) *HTTPTransport
func (*HTTPTransport) AddGroupMember ¶
func (t *HTTPTransport) AddGroupMember(ctx context.Context, request GroupMemberRequest) (map[string]any, error)
func (*HTTPTransport) CommitAttachmentObject ¶
func (t *HTTPTransport) CommitAttachmentObject( ctx context.Context, serviceDID string, prepared *preparedAttachment, slot *attachmentCreateSlotResult, ) (*attachmentCommitObjectResult, error)
func (*HTTPTransport) CreateAttachmentSlot ¶
func (*HTTPTransport) CreateGroup ¶
func (t *HTTPTransport) CreateGroup(ctx context.Context, request GroupCreateRequest) (map[string]any, error)
func (*HTTPTransport) DownloadAttachmentObject ¶
func (*HTTPTransport) GetAttachmentDownloadTicket ¶
func (*HTTPTransport) GetGroup ¶
func (t *HTTPTransport) GetGroup(ctx context.Context, request GroupGetRequest) (map[string]any, error)
func (*HTTPTransport) GetGroupInfo ¶
func (t *HTTPTransport) GetGroupInfo(ctx context.Context, request GroupInfoRequest) (map[string]any, error)
func (*HTTPTransport) GetHistory ¶
func (t *HTTPTransport) GetHistory(ctx context.Context, request HistoryRequest) (map[string]any, error)
func (*HTTPTransport) GetInbox ¶
func (t *HTTPTransport) GetInbox(ctx context.Context, request InboxRequest) (map[string]any, error)
func (*HTTPTransport) GetMessageServiceDID ¶
func (t *HTTPTransport) GetMessageServiceDID(ctx context.Context) (string, error)
func (*HTTPTransport) JoinGroup ¶
func (t *HTTPTransport) JoinGroup(ctx context.Context, request GroupJoinRequest) (map[string]any, error)
func (*HTTPTransport) LeaveGroup ¶
func (t *HTTPTransport) LeaveGroup(ctx context.Context, request GroupLeaveRequest) (map[string]any, error)
func (*HTTPTransport) ListGroupMembers ¶
func (t *HTTPTransport) ListGroupMembers(ctx context.Context, request GroupMembersRequest) (map[string]any, error)
func (*HTTPTransport) ListGroupMessages ¶
func (t *HTTPTransport) ListGroupMessages(ctx context.Context, request GroupMessagesRequest) (map[string]any, error)
func (*HTTPTransport) ListGroups ¶ added in v1.0.13
func (t *HTTPTransport) ListGroups(ctx context.Context, request GroupListRequest) (map[string]any, error)
func (*HTTPTransport) MarkRead ¶
func (t *HTTPTransport) MarkRead(ctx context.Context, request MarkReadRequest) (map[string]any, error)
func (*HTTPTransport) RemoveGroupMember ¶
func (t *HTTPTransport) RemoveGroupMember(ctx context.Context, request GroupMemberRequest) (map[string]any, error)
func (*HTTPTransport) SendDirect ¶
func (t *HTTPTransport) SendDirect(ctx context.Context, request SendRequest) (*directSendResult, error)
func (*HTTPTransport) SendDirectAttachment ¶
func (*HTTPTransport) SendGroup ¶
func (t *HTTPTransport) SendGroup(ctx context.Context, request SendRequest) (*groupSendResult, error)
func (*HTTPTransport) SendGroupAttachment ¶
func (*HTTPTransport) UpdateGroupPolicy ¶
func (t *HTTPTransport) UpdateGroupPolicy(ctx context.Context, request GroupGetRequest, patch map[string]any) (map[string]any, error)
func (*HTTPTransport) UpdateGroupProfile ¶
func (t *HTTPTransport) UpdateGroupProfile(ctx context.Context, request GroupGetRequest, patch map[string]any) (map[string]any, error)
func (*HTTPTransport) UploadAttachmentObject ¶
func (*HTTPTransport) WithRPCEndpoint ¶
func (t *HTTPTransport) WithRPCEndpoint(rpcEndpointURL string) *HTTPTransport
type HistoryRequest ¶
type InboxRequest ¶
type MarkReadRequest ¶
type SecureOutboxActionRequest ¶ added in v1.0.16
type SecurePeerRequest ¶ added in v1.0.16
type SecureStatusRequest ¶ added in v1.0.16
type SendRequest ¶
type SendRequest struct {
IdentityName string
Target string
Group string
Text string
MessageType string
SecureMode string
FilePath string
MIMEType string
}
func (SendRequest) HasAttachment ¶
func (r SendRequest) HasAttachment() bool
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) AddGroupMember ¶
func (s *Service) AddGroupMember(ctx context.Context, request GroupMemberRequest) (*CommandResult, error)
func (*Service) CreateGroup ¶
func (s *Service) CreateGroup(ctx context.Context, request GroupCreateRequest) (*CommandResult, error)
func (*Service) DownloadAttachment ¶
func (s *Service) DownloadAttachment(ctx context.Context, request AttachmentDownloadRequest) (*CommandResult, error)
func (*Service) GetGroup ¶
func (s *Service) GetGroup(ctx context.Context, request GroupGetRequest) (*CommandResult, error)
func (*Service) GroupMembers ¶
func (s *Service) GroupMembers(ctx context.Context, request GroupMembersRequest) (*CommandResult, error)
func (*Service) GroupMessages ¶
func (s *Service) GroupMessages(ctx context.Context, request GroupMessagesRequest) (*CommandResult, error)
func (*Service) History ¶
func (s *Service) History(ctx context.Context, request HistoryRequest) (*CommandResult, error)
func (*Service) Inbox ¶
func (s *Service) Inbox(ctx context.Context, request InboxRequest) (*CommandResult, error)
func (*Service) JoinGroup ¶
func (s *Service) JoinGroup(ctx context.Context, request GroupJoinRequest) (*CommandResult, error)
func (*Service) LeaveGroup ¶
func (s *Service) LeaveGroup(ctx context.Context, request GroupLeaveRequest) (*CommandResult, error)
func (*Service) ListGroups ¶ added in v1.0.13
func (s *Service) ListGroups(ctx context.Context, request GroupListRequest) (*CommandResult, error)
func (*Service) MarkRead ¶
func (s *Service) MarkRead(ctx context.Context, request MarkReadRequest) (*CommandResult, error)
func (*Service) RemoveGroupMember ¶
func (s *Service) RemoveGroupMember(ctx context.Context, request GroupMemberRequest) (*CommandResult, error)
func (*Service) SecureDrop ¶ added in v1.0.16
func (s *Service) SecureDrop(ctx context.Context, request SecureOutboxActionRequest) (*CommandResult, error)
func (*Service) SecureFailed ¶ added in v1.0.16
func (s *Service) SecureFailed(ctx context.Context, request SecureStatusRequest) (*CommandResult, error)
func (*Service) SecureInit ¶ added in v1.0.16
func (s *Service) SecureInit(ctx context.Context, request SecurePeerRequest) (*CommandResult, error)
func (*Service) SecureRepair ¶ added in v1.0.16
func (s *Service) SecureRepair(ctx context.Context, request SecurePeerRequest) (*CommandResult, error)
func (*Service) SecureRetry ¶ added in v1.0.16
func (s *Service) SecureRetry(ctx context.Context, request SecureOutboxActionRequest) (*CommandResult, error)
func (*Service) SecureStatus ¶ added in v1.0.16
func (s *Service) SecureStatus(ctx context.Context, request SecureStatusRequest) (*CommandResult, error)
func (*Service) Send ¶
func (s *Service) Send(ctx context.Context, request SendRequest) (*CommandResult, error)
func (*Service) UpdateGroup ¶
func (s *Service) UpdateGroup(ctx context.Context, request GroupUpdateRequest) (*CommandResult, error)
type ServiceError ¶
func (*ServiceError) Error ¶
func (e *ServiceError) Error() string
type Transport ¶
type Transport interface {
SendDirect(context.Context, SendRequest) (*directSendResult, error)
SendGroup(context.Context, SendRequest) (*groupSendResult, error)
GetInbox(context.Context, InboxRequest) (map[string]any, error)
GetHistory(context.Context, HistoryRequest) (map[string]any, error)
MarkRead(context.Context, MarkReadRequest) (map[string]any, error)
CreateGroup(context.Context, GroupCreateRequest) (map[string]any, error)
GetGroupInfo(context.Context, GroupInfoRequest) (map[string]any, error)
JoinGroup(context.Context, GroupJoinRequest) (map[string]any, error)
AddGroupMember(context.Context, GroupMemberRequest) (map[string]any, error)
RemoveGroupMember(context.Context, GroupMemberRequest) (map[string]any, error)
LeaveGroup(context.Context, GroupLeaveRequest) (map[string]any, error)
GetGroup(context.Context, GroupGetRequest) (map[string]any, error)
ListGroups(context.Context, GroupListRequest) (map[string]any, error)
ListGroupMembers(context.Context, GroupMembersRequest) (map[string]any, error)
ListGroupMessages(context.Context, GroupMessagesRequest) (map[string]any, error)
UpdateGroupProfile(context.Context, GroupGetRequest, map[string]any) (map[string]any, error)
UpdateGroupPolicy(context.Context, GroupGetRequest, map[string]any) (map[string]any, error)
}
type WSProxyTransport ¶
type WSProxyTransport struct {
// contains filtered or unexported fields
}
func NewWSProxyTransport ¶
func NewWSProxyTransport(resolved *appconfig.Resolved, identityName string) *WSProxyTransport
func (*WSProxyTransport) AddGroupMember ¶
func (t *WSProxyTransport) AddGroupMember(ctx context.Context, request GroupMemberRequest) (map[string]any, error)
func (*WSProxyTransport) CreateGroup ¶
func (t *WSProxyTransport) CreateGroup(ctx context.Context, request GroupCreateRequest) (map[string]any, error)
func (*WSProxyTransport) GetGroup ¶
func (t *WSProxyTransport) GetGroup(ctx context.Context, request GroupGetRequest) (map[string]any, error)
func (*WSProxyTransport) GetGroupInfo ¶
func (t *WSProxyTransport) GetGroupInfo(ctx context.Context, request GroupInfoRequest) (map[string]any, error)
func (*WSProxyTransport) GetHistory ¶
func (t *WSProxyTransport) GetHistory(ctx context.Context, request HistoryRequest) (map[string]any, error)
func (*WSProxyTransport) GetInbox ¶
func (t *WSProxyTransport) GetInbox(ctx context.Context, request InboxRequest) (map[string]any, error)
func (*WSProxyTransport) JoinGroup ¶
func (t *WSProxyTransport) JoinGroup(ctx context.Context, request GroupJoinRequest) (map[string]any, error)
func (*WSProxyTransport) LeaveGroup ¶
func (t *WSProxyTransport) LeaveGroup(ctx context.Context, request GroupLeaveRequest) (map[string]any, error)
func (*WSProxyTransport) ListGroupMembers ¶
func (t *WSProxyTransport) ListGroupMembers(ctx context.Context, request GroupMembersRequest) (map[string]any, error)
func (*WSProxyTransport) ListGroupMessages ¶
func (t *WSProxyTransport) ListGroupMessages(ctx context.Context, request GroupMessagesRequest) (map[string]any, error)
func (*WSProxyTransport) ListGroups ¶ added in v1.0.13
func (t *WSProxyTransport) ListGroups(ctx context.Context, request GroupListRequest) (map[string]any, error)
func (*WSProxyTransport) MarkRead ¶
func (t *WSProxyTransport) MarkRead(ctx context.Context, request MarkReadRequest) (map[string]any, error)
func (*WSProxyTransport) RemoveGroupMember ¶
func (t *WSProxyTransport) RemoveGroupMember(ctx context.Context, request GroupMemberRequest) (map[string]any, error)
func (*WSProxyTransport) SendDirect ¶
func (t *WSProxyTransport) SendDirect(ctx context.Context, request SendRequest) (*directSendResult, error)
func (*WSProxyTransport) SendGroup ¶
func (t *WSProxyTransport) SendGroup(ctx context.Context, request SendRequest) (*groupSendResult, error)
func (*WSProxyTransport) UpdateGroupPolicy ¶
func (t *WSProxyTransport) UpdateGroupPolicy(ctx context.Context, request GroupGetRequest, patch map[string]any) (map[string]any, error)
func (*WSProxyTransport) UpdateGroupProfile ¶
func (t *WSProxyTransport) UpdateGroupProfile(ctx context.Context, request GroupGetRequest, patch map[string]any) (map[string]any, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.