Documentation ¶
Index ¶
- func ACLsFor(categories ...Category) []acl.ACL
- func NewContext(ctx context.Context, c *Category) context.Context
- type Category
- func (c Category) ACLs() []acl.ACL
- func (c Category) HasACL(a acl.ACL) bool
- func (c Category) IsFromES() bool
- func (c Category) IsFromRS() bool
- func (c Category) JSONSchema() *jsonschema.Schema
- func (c Category) MarshalJSON() ([]byte, error)
- func (c Category) String() string
- func (c *Category) UnmarshalJSON(bytes []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Category ¶
type Category int
Category represents category type
const ( Docs Category = iota Search Indices Cat Clusters Misc User Permission Analytics Streams Rules Suggestions Auth ReactiveSearch SearchRelevancy Synonyms SearchGrader UIBuilder Logs Cache StoredQuery Sync Pipelines )
Currently supported category.
func FromContext ¶
FromContext retrieves the category stored against the category.CtxKey from the context.
func FromString ¶
FromString returns the Categories from string tags.
func (Category) IsFromES ¶
IsFromES checks whether the category is one of the elasticsearch category, i.e. one of [docs, search, indices, cat, clusters, misc]
func (Category) JSONSchema ¶
func (c Category) JSONSchema() *jsonschema.Schema
func (Category) MarshalJSON ¶
MarshalJSON is the implementation of Marshaler interface for marshaling category.Categories type.
func (Category) String ¶
String is an implementation of Stringer interface that returns the string representation of category.Categories.
func (*Category) UnmarshalJSON ¶
UnmarshalJSON is an implementation of Unmarshaler interface for unmarshaling category.Categories.
Click to show internal directories.
Click to hide internal directories.