Documentation
¶
Index ¶
- type MessagingAuthorizer
- func (a *MessagingAuthorizer) CanAdvancePointer(ctx context.Context, chatID *commonpb.ChatId, userID *commonpb.UserId) (bool, string, error)
- func (a *MessagingAuthorizer) CanGetMessage(ctx context.Context, chatID *commonpb.ChatId, userID *commonpb.UserId) (bool, string, error)
- func (a *MessagingAuthorizer) CanGetMessages(ctx context.Context, chatID *commonpb.ChatId, userID *commonpb.UserId) (bool, string, error)
- func (a *MessagingAuthorizer) CanNotifyIsTyping(ctx context.Context, chatID *commonpb.ChatId, userID *commonpb.UserId) (bool, string, error)
- func (a *MessagingAuthorizer) CanSendMessage(ctx context.Context, chatID *commonpb.ChatId, userID *commonpb.UserId, ...) (bool, string, error)
- func (a *MessagingAuthorizer) CanStreamMessages(ctx context.Context, chatID *commonpb.ChatId, userID *commonpb.UserId) (bool, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessagingAuthorizer ¶
type MessagingAuthorizer struct {
// contains filtered or unexported fields
}
todo: this needs more extensive testing
func NewMessagingRpcAuthorizer ¶
func NewMessagingRpcAuthorizer(chats chat.Store, intents intent.Store, messages messaging.MessageStore, codeData codedata.Provider) *MessagingAuthorizer
func (*MessagingAuthorizer) CanAdvancePointer ¶
func (*MessagingAuthorizer) CanGetMessage ¶
func (*MessagingAuthorizer) CanGetMessages ¶
func (*MessagingAuthorizer) CanNotifyIsTyping ¶
func (*MessagingAuthorizer) CanSendMessage ¶
func (a *MessagingAuthorizer) CanSendMessage(ctx context.Context, chatID *commonpb.ChatId, userID *commonpb.UserId, content *messagingpb.Content, paymentIntent *commonpb.IntentId) (bool, string, error)
todo: This needs a refactor/cleanup because it's blowing up in size/complexity
Click to show internal directories.
Click to hide internal directories.