utils

package
v0.0.0-...-002c67f Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GRPCAuth

func GRPCAuth(token string) func(ctx context.Context) (context.Context, error)

func PrintObject

func PrintObject(object interface{})

Types

type AuthCredential

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

AuthCredential 自定义认证

func NewAuthCredential

func NewAuthCredential(token string) *AuthCredential

func (AuthCredential) GetRequestMetadata

func (c AuthCredential) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)

GetRequestMetadata 实现自定义认证接口

func (AuthCredential) RequireTransportSecurity

func (c AuthCredential) RequireTransportSecurity() bool

RequireTransportSecurity 自定义认证是否开启TLS

Jump to

Keyboard shortcuts

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