client

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: MIT Imports: 36 Imported by: 27

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetGlobal

func SetGlobal(cli *Client)

SetGlobal todo

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 C

func C() *Client

C Global

func NewClient

func NewClient(conf *Config) (*Client, error)

NewClient todo

func (*Client) ApplicationAdmin

func (c *Client) ApplicationAdmin() application.AdminServiceClient

ApplicationAdmin todo

func (*Client) ApplicationUser

func (c *Client) ApplicationUser() application.UserServiceClient

ApplicationUser todo

func (*Client) Department

func (c *Client) Department() department.DepartmentServiceClient

Department todo

func (*Client) Domain

func (c *Client) Domain() domain.DomainServiceClient

Domain todo

func (*Client) Endpoint

func (c *Client) Endpoint() endpoint.EndpointServiceClient

Endpoint todo

func (*Client) GetClientID added in v0.2.7

func (c *Client) GetClientID() string

GetClientID todo

func (*Client) Mconf added in v0.3.2

Micro todo

func (*Client) Micro

func (c *Client) Micro() micro.MicroServiceClient

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) Policy

func (c *Client) Policy() policy.PolicyServiceClient

Policy todo

func (*Client) Role

func (c *Client) Role() role.RoleServiceClient

Role todo

func (*Client) SessionAdmin

func (c *Client) SessionAdmin() session.AdminServiceClient

SessionAdmin todo

func (*Client) SessionUser

func (c *Client) SessionUser() session.UserServiceClient

SessionUser todo

func (*Client) Tag added in v0.2.8

func (c *Client) Tag() tag.TagServiceClient

Tag todo

func (*Client) Token

func (c *Client) Token() token.TokenServiceClient

Token todo

func (*Client) User

func (c *Client) User() user.UserServiceClient

User todo

func (*Client) Verifycode

func (c *Client) Verifycode() verifycode.VerifyCodeServiceClient

Verifycode todo

type Config

type Config struct {
	*Authentication
	// contains filtered or unexported fields
}

Config 客户端配置

func NewDefaultConfig

func NewDefaultConfig() *Config

NewDefaultConfig todo

func (*Config) Address added in v0.2.1

func (c *Config) Address() string

Address 地址

func (*Config) SetAddress

func (c *Config) SetAddress(addr string)

SetAddress todo

type GrpcAuther

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

GrpcAuther todo

func NewGrpcKeyauthAuther

func NewGrpcKeyauthAuther(hf PathEntryHandleFunc, c *Client) *GrpcAuther

NewGrpcKeyauthAuther todo

func (*GrpcAuther) AuthUnaryServerInterceptor

func (a *GrpcAuther) AuthUnaryServerInterceptor() grpc.UnaryServerInterceptor

AuthUnaryServerInterceptor returns a new unary server interceptor for auth.

func (*GrpcAuther) GetToken added in v0.2.9

func (a *GrpcAuther) GetToken(requestID string) *token.Token

func (*GrpcAuther) SetLogger

func (a *GrpcAuther) SetLogger(l logger.Logger)

SetLogger todo

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) Auth added in v0.3.7

func (a *HTTPAuther) Auth(r *http.Request, entry httpb.Entry) (
	authInfo interface{}, err error)

func (*HTTPAuther) GetToken added in v0.4.0

func (a *HTTPAuther) GetToken(requestID string) *token.Token

type PathEntryHandleFunc added in v0.2.3

type PathEntryHandleFunc func(path string) *httpb.Entry

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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