Documentation
¶
Index ¶
- func ReadTokenRoles(token string) (roles []string, err error)
- type ConditionConfig
- type IdWrapper
- type OpenidToken
- type QueryCheckIds
- type QueryFind
- type QueryListCommons
- type QueryListIds
- type QueryMessage
- type QueryOperationType
- type Security
- func (this *Security) CheckBool(token string, kind string, id string, rights string) (allowed bool, err error)
- func (this *Security) CheckMultiple(token string, kind string, ids []string, rights string) (result map[string]bool, err error)
- func (this *Security) GetAdminToken() (token string, err error)
- func (this *Security) IsAdmin(token string) bool
- type Selection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadTokenRoles ¶
Types ¶
type ConditionConfig ¶
type ConditionConfig struct {
Feature string `json:"feature"`
Operation QueryOperationType `json:"operation"`
Value interface{} `json:"value"`
Ref string `json:"ref"`
}
type OpenidToken ¶
type QueryCheckIds ¶
type QueryFind ¶
type QueryFind struct {
QueryListCommons
Search string `json:"search"`
Filter *Selection `json:"filter"`
}
type QueryListCommons ¶
type QueryListIds ¶
type QueryListIds struct {
QueryListCommons
Ids []string `json:"ids"`
}
type QueryMessage ¶
type QueryMessage struct {
Resource string `json:"resource"`
Find *QueryFind `json:"find"`
ListIds *QueryListIds `json:"list_ids"`
CheckIds *QueryCheckIds `json:"check_ids"`
TermAggregate *string `json:"term_aggregate"`
}
type QueryOperationType ¶
type QueryOperationType string
const ( QueryEqualOperation QueryOperationType = "==" QueryUnequalOperation QueryOperationType = "!=" QueryAnyValueInFeatureOperation QueryOperationType = "any_value_in_feature" )
type Security ¶
type Security struct {
// contains filtered or unexported fields
}
func New ¶
func New(config configuration.Config) *Security
func (*Security) CheckMultiple ¶
func (*Security) GetAdminToken ¶
Click to show internal directories.
Click to hide internal directories.