Documentation
¶
Index ¶
- func GrpcAuthUnaryServerInterceptor(c *Client) grpc.UnaryServerInterceptor
- func SendOperateEvent(req, resp interface{}, hd *event.Header, od *event.OperateEventData) error
- func SetGlobal(cli *Client)
- type Authentication
- type Client
- func (c *Client) Application() application.ApplicationServiceClient
- func (c *Client) Department() department.DepartmentServiceClient
- func (c *Client) Domain() domain.DomainServiceClient
- func (c *Client) Endpoint() endpoint.EndpointServiceClient
- func (c *Client) GetClientID() string
- func (c *Client) Mconf() mconf.MicroConfigServiceClient
- func (c *Client) Micro() micro.MicroServiceClient
- func (c *Client) Namespace() namespace.NamespaceServiceClient
- func (c *Client) Permission() permission.PermissionServiceClient
- func (c *Client) Policy() policy.PolicyServiceClient
- func (c *Client) Role() role.RoleServiceClient
- func (c *Client) Session() session.ServiceClient
- func (c *Client) Tag() tag.TagServiceClient
- func (c *Client) Token() token.TokenServiceClient
- func (c *Client) User() user.UserServiceClient
- func (c *Client) Verifycode() verifycode.VerifyCodeServiceClient
- type Config
- type HTTPAuther
- func (a *HTTPAuther) Auth(r *http.Request, entry httpb.Entry) (authInfo interface{}, err error)
- func (a *HTTPAuther) ResponseHook(w http.ResponseWriter, r *http.Request, entry httpb.Entry)
- func (a *HTTPAuther) SetLogger(l logger.Logger)
- func (a *HTTPAuther) ValidateIdentity(ctx context.Context, accessToken string) (*token.Token, error)
- func (a *HTTPAuther) ValidatePermission(ctx context.Context, tk *token.Token, e httpb.Entry) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GrpcAuthUnaryServerInterceptor ¶ added in v0.6.0
func GrpcAuthUnaryServerInterceptor(c *Client) grpc.UnaryServerInterceptor
GrpcAuthUnaryServerInterceptor returns a new unary server interceptor for auth.
func SendOperateEvent ¶ added in v0.4.2
func SendOperateEvent(req, resp interface{}, hd *event.Header, od *event.OperateEventData) error
Types ¶
type Authentication ¶
type Authentication struct {
// contains filtered or unexported fields
}
Authentication todo
func (*Authentication) GetRequestMetadata ¶
func (a *Authentication) GetRequestMetadata(context.Context, ...string) ( map[string]string, error, )
GetRequestMetadata todo
func (*Authentication) RequireTransportSecurity ¶
func (a *Authentication) RequireTransportSecurity() bool
RequireTransportSecurity todo
func (*Authentication) SetClientCredentials ¶
func (a *Authentication) SetClientCredentials(clientID, clientSecret string)
SetClientCredentials todo
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client 客户端
func (*Client) Application ¶ added in v0.5.5
func (c *Client) Application() application.ApplicationServiceClient
ApplicationAdmin todo
func (*Client) Department ¶
func (c *Client) Department() department.DepartmentServiceClient
Department todo
func (*Client) Mconf ¶ added in v0.3.2
func (c *Client) Mconf() mconf.MicroConfigServiceClient
Micro todo
func (*Client) Namespace ¶
func (c *Client) Namespace() namespace.NamespaceServiceClient
Namespace todo
func (*Client) Permission ¶
func (c *Client) Permission() permission.PermissionServiceClient
Permission todo
func (*Client) Session ¶ added in v0.6.0
func (c *Client) Session() session.ServiceClient
SessionAdmin todo
func (*Client) Verifycode ¶
func (c *Client) Verifycode() verifycode.VerifyCodeServiceClient
Verifycode todo
type Config ¶
type Config struct { *Authentication // contains filtered or unexported fields }
Config 客户端配置
type HTTPAuther ¶ added in v0.3.7
type HTTPAuther struct {
// contains filtered or unexported fields
}
internal todo
func NewHTTPAuther ¶ added in v0.3.7
func NewHTTPAuther(c *Client) *HTTPAuther
NewInternalAuther 内部使用的auther
func (*HTTPAuther) ResponseHook ¶ added in v0.4.4
func (a *HTTPAuther) ResponseHook(w http.ResponseWriter, r *http.Request, entry httpb.Entry)
func (*HTTPAuther) SetLogger ¶ added in v0.4.2
func (a *HTTPAuther) SetLogger(l logger.Logger)
SetLogger todo
func (*HTTPAuther) ValidateIdentity ¶ added in v0.6.0
func (*HTTPAuther) ValidatePermission ¶ added in v0.6.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.