Documentation
¶
Index ¶
Constants ¶
View Source
const ( // ObjectTypeOrg is reserved for future use for per-org comments. ObjectTypeOrg = "org" // ObjectTypeDashboard used for dashboard-wide comments. ObjectTypeDashboard = "dashboard" // ObjectTypeAnnotation used for annotation comments. ObjectTypeAnnotation = "annotation" )
Variables ¶
View Source
var RegisteredObjectTypes = map[string]struct{}{ ObjectTypeOrg: {}, ObjectTypeDashboard: {}, ObjectTypeAnnotation: {}, }
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct {
Id int64
GroupId int64
UserId int64
Content string
Created int64
Updated int64
}
func (Comment) ToDTO ¶
func (i Comment) ToDTO(user *CommentUser) *CommentDto
type CommentDto ¶
type CommentDto struct {
Id int64 `json:"id"`
UserId int64 `json:"userId"`
Content string `json:"content"`
Created int64 `json:"created"`
User *CommentUser `json:"user,omitempty"`
}
type CommentGroup ¶
type CommentGroup struct {
Id int64
OrgId int64
ObjectType string
ObjectId string
Settings Settings
Created int64
Updated int64
}
func (CommentGroup) TableName ¶
func (i CommentGroup) TableName() string
type CommentUser ¶
type Event ¶
type Event struct {
Event EventType `json:"event"`
CommentCreated *CommentDto `json:"commentCreated"`
}
Event represents comment event structure.
type PermissionChecker ¶
type PermissionChecker struct {
// contains filtered or unexported fields
}
func NewPermissionChecker ¶
func NewPermissionChecker(sqlStore *sqlstore.SQLStore, features featuremgmt.FeatureToggles, accessControl accesscontrol.AccessControl, dashboardService dashboards.DashboardService, annotationsRepo annotations.Repository, ) *PermissionChecker
func (*PermissionChecker) CheckReadPermissions ¶
func (c *PermissionChecker) CheckReadPermissions(ctx context.Context, orgId int64, signedInUser *user.SignedInUser, objectType string, objectID string) (bool, error)
func (*PermissionChecker) CheckWritePermissions ¶
func (c *PermissionChecker) CheckWritePermissions(ctx context.Context, orgId int64, signedInUser *user.SignedInUser, objectType string, objectID string) (bool, error)
Click to show internal directories.
Click to hide internal directories.