filters

package
v0.0.0-...-e319382 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: MIT Imports: 2 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filters

type Filters interface {
	Aggregates(*[]interface{}, *jwt.Token) []interface{}
	Checks(*[]interface{}, *jwt.Token) []interface{}
	Client(interface{}, *jwt.Token) bool
	Clients(*[]interface{}, *jwt.Token) []interface{}
	Datacenters([]*structs.Datacenter, *jwt.Token) []*structs.Datacenter
	Events(*[]interface{}, *jwt.Token) []interface{}
	// NEED WORK
	GetRequest(string, *jwt.Token) bool
	Silenced(*[]interface{}, *jwt.Token) []interface{}
	Stashes(*[]interface{}, *jwt.Token) []interface{}
	Subscriptions(*[]structs.Subscription, *jwt.Token) []structs.Subscription
}

Filters contains the different filtering methods based on the edition

type Uchiwa

type Uchiwa struct{}

Uchiwa represents an instance of the Filters interface for the community filters

func (*Uchiwa) Aggregates

func (u *Uchiwa) Aggregates(data *[]interface{}, token *jwt.Token) []interface{}

Aggregates filters based on role's datacenters

func (*Uchiwa) Checks

func (u *Uchiwa) Checks(data *[]interface{}, token *jwt.Token) []interface{}

Checks filters based on role's datacenters and subscriptions

func (*Uchiwa) Client

func (u *Uchiwa) Client(data interface{}, token *jwt.Token) bool

Client is a function that filters GET requests.

func (*Uchiwa) Clients

func (u *Uchiwa) Clients(data *[]interface{}, token *jwt.Token) []interface{}

Clients filters based on role's datacenters and subscriptions

func (*Uchiwa) Datacenters

func (u *Uchiwa) Datacenters(data []*structs.Datacenter, token *jwt.Token) []*structs.Datacenter

Datacenters filters based on role's datacenters

func (*Uchiwa) Events

func (u *Uchiwa) Events(data *[]interface{}, token *jwt.Token) []interface{}

Events filters based on role's datacenters and subscriptions

func (*Uchiwa) GetRequest

func (u *Uchiwa) GetRequest(dc string, token *jwt.Token) bool

GetRequest is a function that filters GET requests.

func (*Uchiwa) Silenced

func (u *Uchiwa) Silenced(data *[]interface{}, token *jwt.Token) []interface{}

Silenced filters based on role's datacenters

func (*Uchiwa) Stashes

func (u *Uchiwa) Stashes(data *[]interface{}, token *jwt.Token) []interface{}

Stashes filters based on role's datacenters

func (*Uchiwa) Subscriptions

func (u *Uchiwa) Subscriptions(data *[]structs.Subscription, token *jwt.Token) []structs.Subscription

Subscriptions filters based on role's subscriptions

Jump to

Keyboard shortcuts

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