Documentation
¶
Index ¶
- type Controller
- func (this *Controller) AdminListResourceIds(tokenStr string, topicId string, options model.ListOptions) (ids []string, err error, code int)
- func (this *Controller) CheckMultiplePermissions(tokenStr string, topicId string, ids []string, permissions ...model.Permission) (access map[string]bool, err error, code int)
- func (this *Controller) CheckPermission(tokenStr string, topicId string, id string, permissions ...model.Permission) (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, 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) RemoveResource(tokenStr string, topicId string, id string) (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 TopicHandler
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) AdminListResourceIds ¶ added in v0.0.9
func (this *Controller) AdminListResourceIds(tokenStr string, topicId string, options model.ListOptions) (ids []string, err error, code int)
func (*Controller) CheckMultiplePermissions ¶
func (this *Controller) CheckMultiplePermissions(tokenStr string, topicId string, ids []string, permissions ...model.Permission) (access map[string]bool, err error, code int)
func (*Controller) CheckPermission ¶
func (this *Controller) CheckPermission(tokenStr string, topicId string, id string, permissions ...model.Permission) (access bool, err error, code int)
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, options model.ListOptions, permission ...model.Permission) (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) RemoveResource ¶ added in v0.0.5
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 TopicHandler ¶ added in v0.0.13
func (*TopicHandler) Close ¶ added in v0.0.13
func (this *TopicHandler) Close() (err error)
func (*TopicHandler) SendPermissions ¶ added in v0.0.13
func (this *TopicHandler) SendPermissions(ctx context.Context, id string, permissions model.ResourcePermissions) (err error)
Click to show internal directories.
Click to hide internal directories.