Documentation ¶
Index ¶
- func GetCustomDeptFromCtx(ctx context.Context) ([]uint64, error)
- func GetFilterFieldFromCtx(ctx context.Context) (string, error)
- func GetScopeFromCtx(ctx context.Context) (uint8, error)
- func WithCustomDeptContext(ctx context.Context, deptIds string) context.Context
- func WithFilterFieldContext(ctx context.Context, filterField string) context.Context
- func WithScopeContext(ctx context.Context, scope string) context.Context
- type DataPermKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCustomDeptFromCtx ¶
GetCustomDeptFromCtx returns custom department ids from context
func GetFilterFieldFromCtx ¶
GetFilterFieldFromCtx returns filter field from context
func GetScopeFromCtx ¶
GetScopeFromCtx returns data scope from context.
func WithCustomDeptContext ¶
WithCustomDeptContext returns context with custom department ids
func WithFilterFieldContext ¶
WithFilterFieldContext returns context with filter field
Types ¶
type DataPermKey ¶
type DataPermKey string
const ( // ScopeKey is the key to store data scope ScopeKey DataPermKey = "data-perm-scope" // CustomDeptKey is the key to store custom department ids CustomDeptKey DataPermKey = "data-perm-custom-dept" // FilterFieldKey is the key to store filter field FilterFieldKey DataPermKey = "data-perm-filter-field" )
Click to show internal directories.
Click to hide internal directories.