authz

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package authz authorization

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) string

FromContext 从context中提取登录用户

func NewContext

func NewContext(ctx context.Context, role string) context.Context

NewContext 创建验证上下文

Types

type Config

type Config struct {
}

Config 授权设定档

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler 函數調用跟蹤器

func NewHandler

func NewHandler(cfg *Config) *Handler

NewHandler 创建Handler

func (*Handler) After

func (h *Handler) After(ctx *aop.Context)

After 執行後

func (*Handler) Before

func (h *Handler) Before(ctx *aop.Context) error

Before 執行前

func (*Handler) Update

func (h *Handler) Update(cfg *Config)

Update 更新授权服务

Jump to

Keyboard shortcuts

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