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: 0

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