acl

package
v0.0.0-...-f94be1b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(acls []ACL, acl ACL) bool

Contains checks if the given slice of category contains the given acl.

func NewContext

func NewContext(ctx context.Context, acl *ACL) context.Context

NewContext returns a new context with the given ACL.

Types

type ACL

type ACL int

ACL is a type that represents an elasticsearch acl.

const (
	Cat ACL = iota
	Bulk
	Cluster
	Search
	Remote
	Create
	Count
	Scripts
	Delete
	Doc
	Source
	FieldCaps
	Close
	Analyze
	Exists
	Get
	Template
	Explain
	Indices
	Alias
	Aliases
	DeleteByQuery
	Cache
	Index
	Mapping
	Flush
	Forcemerge
	Upgrade
	Settings
	Open
	Recovery
	Mappings
	Rollover
	Refresh
	Segments
	Shrink
	Split
	ShardStores
	Stats
	Ingest
	Validate
	Msearch
	Mget
	Nodes
	Mtermvectors
	Reindex
	UpdateByQuery
	Render
	RankEval
	SearchShards
	Snapshot
	Tasks
	Termvectors
	Update
)

Elasticsearch request Categories.

func FromContext

func FromContext(ctx context.Context) (*ACL, error)

FromContext retrieves the acl stored against the acl.CtxKey from the context.

func FromString

func FromString(s string) (ACL, error)

FromString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func Values

func Values() []ACL

Values returns all values of the enum.

func (ACL) IsAnACL

func (a ACL) IsAnACL() bool

IsAnACL returns "true" if the value is listed in the enum definition. "false" otherwise.

func (ACL) JSONSchema

func (a ACL) JSONSchema() *jsonschema.Schema

func (ACL) MarshalJSON

func (a ACL) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for ACL.

func (ACL) String

func (a ACL) String() string

func (*ACL) UnmarshalJSON

func (a *ACL) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ACL.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL