Documentation ¶
Index ¶
- func ComputePermissionsMap(token jwt.Token, resource model.Resource, ...) (result model.PermissionsMap)
- type Controller
- func (this *Controller) AdminListResourceIds(tokenStr string, topicId string, options model.ListOptions) (ids []string, err error, code int)
- func (this *Controller) AdminLoadFromPermissionSearch(req model.AdminLoadPermSearchRequest) (updateCount int, err error, code int)
- func (this *Controller) CheckMultiplePermissions(tokenStr string, topicId string, ids []string, permissions ...model.Permission) (accessMap 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) CheckTopicDefaultPermission(token jwt.Token, topicId string, permissions model.PermissionList) (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) ListAccessibleResourceIds(tokenStr string, topicId string, options model.ListOptions, ...) (ids []string, err error, code int)
- func (this *Controller) ListComputedPermissions(tokenStr string, topicId string, ids []string) (result []model.ComputedPermissions, 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) RetryPublishOfUnsyncedResources() error
- 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)
- func (this *Controller) StartSyncLoop(ctx context.Context)
- type DB
- type LogNotifier
- type PermissionSearchResponseElement
- type PermissionSearchResponseElementRight
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputePermissionsMap ¶ added in v0.0.15
func ComputePermissionsMap(token jwt.Token, resource model.Resource, defaultPerm model.ResourcePermissions) (result model.PermissionsMap)
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewWithDependencies ¶
func NewWithDependencies(ctx context.Context, config configuration.Config, db DB, producerProvider kafka.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) AdminLoadFromPermissionSearch ¶ added in v0.0.27
func (this *Controller) AdminLoadFromPermissionSearch(req model.AdminLoadPermSearchRequest) (updateCount int, err error, code int)
func (*Controller) CheckMultiplePermissions ¶
func (this *Controller) CheckMultiplePermissions(tokenStr string, topicId string, ids []string, permissions ...model.Permission) (accessMap 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) CheckTopicDefaultPermission ¶ added in v0.0.18
func (this *Controller) CheckTopicDefaultPermission(token jwt.Token, topicId string, permissions model.PermissionList) (access bool, err error, code int)
func (*Controller) GetResource ¶
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) ListComputedPermissions ¶ added in v0.0.15
func (this *Controller) ListComputedPermissions(tokenStr string, topicId string, ids []string) (result []model.ComputedPermissions, 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) RetryPublishOfUnsyncedResources ¶ added in v0.0.16
func (this *Controller) RetryPublishOfUnsyncedResources() error
func (*Controller) SetPermission ¶
func (this *Controller) SetPermission(tokenStr string, topicId string, id string, permissions model.ResourcePermissions) (result model.ResourcePermissions, err error, code int)
func (*Controller) StartSyncLoop ¶ added in v0.0.16
func (this *Controller) StartSyncLoop(ctx context.Context)
type LogNotifier ¶
type LogNotifier struct{}
func (LogNotifier) SendMessage ¶
func (this LogNotifier) SendMessage(message client.Message) error
type PermissionSearchResponseElement ¶ added in v0.0.27
type PermissionSearchResponseElement struct { UserRights map[string]PermissionSearchResponseElementRight `json:"user_rights"` GroupRights map[string]PermissionSearchResponseElementRight `json:"group_rights"` ResourceId string `json:"resource_id"` Creator string `json:"creator"` }
type PermissionSearchResponseElementRight ¶ added in v0.0.27
Click to show internal directories.
Click to hide internal directories.