authz

package
v1.7.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decision

func Decision(ctx context.Context, input *Input) (rego.ResultSet, error)

func NewMiddleware

func NewMiddleware(c *gin.Context)

Types

type Input

type Input struct {
	Uid        int64       `json:"uid"`
	Path       string      `json:"path"`
	PathParams []gin.Param `json:"path_params"`
	Resource   any         `json:"resource"`
}

type Writer

type Writer struct {
	gin.ResponseWriter

	Buf bytes.Buffer
}

func NewWriter

func NewWriter(rw gin.ResponseWriter) *Writer

func (*Writer) Write

func (w *Writer) Write(p []byte) (n int, err error)

func (*Writer) WriteNow

func (w *Writer) WriteNow()

Jump to

Keyboard shortcuts

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