Documentation
¶
Index ¶
- type Controller
- func (this *Controller) CheckMultiplePermissions(tokenStr string, topicId string, ids []string, permissions string) (access map[string]bool, err error, code int)
- func (this *Controller) CheckPermission(tokenStr string, topicId string, id string, permissions string) (access bool, err error, code int)
- func (this *Controller) GetResource(tokenStr string, topicId string, id string) (result model.Resource, err error, code int)
- func (this *Controller) GetTopic(tokenStr string, id string) (result model.Topic, err error, code int)
- func (this *Controller) HandleReaderError(topic model.Topic, err error)
- func (this *Controller) HandleReceivedCommand(topic model.Topic, resource model.Resource, t time.Time) error
- func (this *Controller) HandleResourceDelete(topic model.Topic, id string) error
- func (this *Controller) HandleResourceUpdate(topic model.Topic, id string, owner string) error
- func (this *Controller) ListAccessibleResourceIds(tokenStr string, topicId string, permissions string, options model.ListOptions) (ids []string, err error, code int)
- func (this *Controller) ListResourcesWithAdminPermission(tokenStr string, topicId string, options model.ListOptions) (result []model.Resource, err error, code int)
- func (this *Controller) ListTopics(tokenStr string, options model.ListOptions) (result []model.Topic, err error, code int)
- func (this *Controller) RemoveTopic(tokenStr string, id string) (err error, code int)
- func (this *Controller) SetPermission(tokenStr string, topicId string, id string, ...) (result model.ResourcePermissions, err error, code int)
- func (this *Controller) SetTopic(tokenStr string, topic model.Topic) (result model.Topic, err error, code int)
- type DB
- type Done
- type LogNotifier
- type TopicWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewWithDependencies ¶
func NewWithDependencies(ctx context.Context, config configuration.Config, db DB, c com.Provider) (*Controller, error)
func (*Controller) CheckMultiplePermissions ¶
func (*Controller) CheckPermission ¶
func (*Controller) GetResource ¶
func (*Controller) HandleReaderError ¶
func (this *Controller) HandleReaderError(topic model.Topic, err error)
func (*Controller) HandleReceivedCommand ¶
func (*Controller) HandleResourceDelete ¶
func (this *Controller) HandleResourceDelete(topic model.Topic, id string) error
func (*Controller) HandleResourceUpdate ¶
func (*Controller) ListAccessibleResourceIds ¶
func (this *Controller) ListAccessibleResourceIds(tokenStr string, topicId string, permissions string, options model.ListOptions) (ids []string, err error, code int)
func (*Controller) ListResourcesWithAdminPermission ¶
func (this *Controller) ListResourcesWithAdminPermission(tokenStr string, topicId string, options model.ListOptions) (result []model.Resource, err error, code int)
func (*Controller) ListTopics ¶
func (this *Controller) ListTopics(tokenStr string, options model.ListOptions) (result []model.Topic, err error, code int)
func (*Controller) RemoveTopic ¶
func (this *Controller) RemoveTopic(tokenStr string, id string) (err error, code int)
func (*Controller) SetPermission ¶
func (this *Controller) SetPermission(tokenStr string, topicId string, id string, permissions model.ResourcePermissions, options model.SetPermissionOptions) (result model.ResourcePermissions, err error, code int)
type LogNotifier ¶
type LogNotifier struct{}
func (LogNotifier) SendMessage ¶
func (this LogNotifier) SendMessage(message client.Message) error
type TopicWrapper ¶
func (*TopicWrapper) Close ¶
func (this *TopicWrapper) Close() (err error)
func (*TopicWrapper) SendPermissions ¶
func (this *TopicWrapper) SendPermissions(ctx context.Context, id string, permissions model.ResourcePermissions) (err error)
Click to show internal directories.
Click to hide internal directories.