dataplane

package
v0.0.0-...-6aa0337 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataPlane

type DataPlane struct {
	Echo      *echo.Echo
	Logger    echo.Logger
	Encryptor crypto.Encryptor
	Hasher    crypto.Hasher
	Repo      repo.Repo
	Enforcer  repo.Enforcer
	Validator *validator.Validate
	Filter    *bloom.BloomFilter
}

DataPlane represents the data plane struct

func MustNewDataPlane

func MustNewDataPlane() *DataPlane

MustNewDataPlane creates a new DataPlane, otherwise panic

func (*DataPlane) CheckBlindIndexExists

func (dp *DataPlane) CheckBlindIndexExists(c echo.Context, blindIndex string, opt *apimodel.GetFactSearch) (bool, []string, error)

func (*DataPlane) CheckExactMatch

func (dp *DataPlane) CheckExactMatch(c echo.Context, query string, opt *apimodel.GetFactSearch) (bool, []string, error)

func (*DataPlane) CreateFact

func (dp *DataPlane) CreateFact(c echo.Context) error

CreateFact godoc @tags Fact @summary Create a fact @description create a fact @id create-fact @accept json @produce json @security ApiKeyAuth @param createFact body apimodel.CreateFact true "Create Fact Parameters" @success 200 {object} apimodel.Fact @failure 400 {object} echo.HTTPError @failure 500 {object} echo.HTTPError @router /facts [post]

func (*DataPlane) CreateScope

func (dp *DataPlane) CreateScope(c echo.Context) error

CreateScope godoc @tags Scope @summary Create a scope @description Create a scope @id create-scope @accept json @produce json @security ApiKeyAuth @param createScope body apimodel.CreateScope true "Create Scope parameters" @success 200 {object} apimodel.Scope @failure 400 {object} echo.HTTPError @failure 500 {object} echo.HTTPError @router /scopes [post]

func (*DataPlane) DestroyFact

func (dp *DataPlane) DestroyFact(c echo.Context) error

func (*DataPlane) GenerateBlindIndex

func (dp *DataPlane) GenerateBlindIndex(data string, domain string) string

func (*DataPlane) GenerateBlindIndexes

func (dp *DataPlane) GenerateBlindIndexes(data string, domain string) []string

func (*DataPlane) Healthz

func (dp *DataPlane) Healthz(c echo.Context) error

Healthz godoc @tags Healthz @summary Show the health of the dataplane @description Show the health of the dataplane @id healthz @produce json @success 200 {object} apimodel.Healthz @failure 500 {object} echo.HTTPError @router /healthz [get]

func (*DataPlane) PreprocessData

func (dp *DataPlane) PreprocessData(data string) string

func (*DataPlane) QueryScopes

func (dp *DataPlane) QueryScopes(c echo.Context) error

QueryScopes godoc @tags Scope @summary Query scopes @description Query scopes @id query-scopes @produce json @security ApiKeyAuth @param custom_id query string false "get scopes by custom_id" @success 200 {object} []apimodel.Scope @failure 400 {object} echo.HTTPError @failure 404 {object} echo.HTTPError @failure 500 {object} echo.HTTPError @router /scopes [get]

func (*DataPlane) Search

func (dp *DataPlane) Search(c echo.Context) error

func (*DataPlane) ShowFact

func (dp *DataPlane) ShowFact(c echo.Context) error

ShowFact godoc @tags Fact @summary Show a fact @description Show a fact by ID @id show-fact-by-id @accept json @produce json @security ApiKeyAuth @param id path string true "Fact ID" @success 200 {object} apimodel.Fact @failure 400 {object} echo.HTTPError @failure 500 {object} echo.HTTPError @router /facts/{id} [get]

func (*DataPlane) Start

func (dp *DataPlane) Start()

Start starts the data plane server

func (*DataPlane) Stop

func (dp *DataPlane) Stop()

Stop will do some cleanup when shutdown

Jump to

Keyboard shortcuts

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