Documentation ¶ Overview ¶ Copyright 2019-2020 Axetroy. All rights reserved. MIT license. Index ¶ func Require(accessions ...accession.Accession) gin.HandlerFunc type Controller func New(uid string) (c *Controller, err error) func (c *Controller) Has(a accession.Accession) bool func (c *Controller) Require(a []accession.Accession) bool Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Require ¶ func Require(accessions ...accession.Accession) gin.HandlerFunc 根据 RBAC 鉴权的中间件 Types ¶ type Controller ¶ type Controller struct { Roles []*role.Role } func New ¶ func New(uid string) (c *Controller, err error) func (*Controller) Has ¶ func (c *Controller) Has(a accession.Accession) bool 检验是否拥有单独的权限 func (*Controller) Require ¶ func (c *Controller) Require(a []accession.Accession) bool 验证是否有这些权限 Source Files ¶ View all Source files main.go Directories ¶ Show internal Expand all Path Synopsis accession role Click to show internal directories. Click to hide internal directories.