mirror of
https://github.com/linka-cloud/grpc.git
synced 2025-06-22 01:02:29 +00:00
rename module grpc-toolkit
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
@ -7,9 +7,9 @@ import (
|
||||
|
||||
grpc_auth "github.com/grpc-ecosystem/go-grpc-middleware/auth"
|
||||
|
||||
"go.linka.cloud/grpc/errors"
|
||||
"go.linka.cloud/grpc/interceptors"
|
||||
"go.linka.cloud/grpc/interceptors/metadata"
|
||||
"go.linka.cloud/grpc-toolkit/errors"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors/metadata"
|
||||
)
|
||||
|
||||
func BasicAuth(user, password string) string {
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/types/known/anypb"
|
||||
|
||||
"go.linka.cloud/grpc/interceptors"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors"
|
||||
)
|
||||
|
||||
func ChainedAuthFuncs(fn ...grpc_auth.AuthFunc) grpc_auth.AuthFunc {
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
"go.linka.cloud/grpc/errors"
|
||||
"go.linka.cloud/grpc-toolkit/errors"
|
||||
)
|
||||
|
||||
func TestNotProtectedOnly(t *testing.T) {
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
|
||||
grpc_auth "github.com/grpc-ecosystem/go-grpc-middleware/auth"
|
||||
|
||||
"go.linka.cloud/grpc/interceptors"
|
||||
"go.linka.cloud/grpc/interceptors/metadata"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors/metadata"
|
||||
)
|
||||
|
||||
type TokenValidator func(ctx context.Context, token string) (context.Context, error)
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/peer"
|
||||
|
||||
"go.linka.cloud/grpc/errors"
|
||||
"go.linka.cloud/grpc-toolkit/errors"
|
||||
)
|
||||
|
||||
type X509Validator func(ctx context.Context, sans []string) (context.Context, error)
|
||||
|
@ -8,8 +8,8 @@ import (
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
"go.linka.cloud/grpc/interceptors"
|
||||
"go.linka.cloud/grpc/logger"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors"
|
||||
"go.linka.cloud/grpc-toolkit/logger"
|
||||
)
|
||||
|
||||
type ban struct {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"go.linka.cloud/grpc/interceptors"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors"
|
||||
)
|
||||
|
||||
type Option func(*chain)
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"go.linka.cloud/grpc/interceptors"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors"
|
||||
)
|
||||
|
||||
type interceptor struct{}
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"go.linka.cloud/grpc/interceptors"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors"
|
||||
)
|
||||
|
||||
type UnaryInterceptor interface {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/metadata"
|
||||
|
||||
"go.linka.cloud/grpc/interceptors"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors"
|
||||
)
|
||||
|
||||
func NewForwardInterceptors() interceptors.ServerInterceptors {
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/metadata"
|
||||
|
||||
"go.linka.cloud/grpc/interceptors"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors"
|
||||
)
|
||||
|
||||
func NewInterceptors(pairs ...string) interceptors.Interceptors {
|
||||
|
@ -5,8 +5,8 @@ import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"go.linka.cloud/grpc/interceptors"
|
||||
"go.linka.cloud/grpc/service"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors"
|
||||
"go.linka.cloud/grpc-toolkit/service"
|
||||
)
|
||||
|
||||
type Registerer interface {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"go.linka.cloud/grpc/interceptors"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors"
|
||||
)
|
||||
|
||||
func New() interceptors.Interceptors {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"go.linka.cloud/grpc/interceptors"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors"
|
||||
)
|
||||
|
||||
func NewInterceptors(opts ...grpc_recovery.Option) interceptors.ServerInterceptors {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
|
||||
grpc_sentry "github.com/johnbellone/grpc-middleware-sentry"
|
||||
|
||||
"go.linka.cloud/grpc/interceptors"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors"
|
||||
)
|
||||
|
||||
type interceptor struct {
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"github.com/opentracing/opentracing-go"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"go.linka.cloud/grpc/interceptors"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors"
|
||||
)
|
||||
|
||||
type tracing struct {
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"google.golang.org/genproto/googleapis/rpc/errdetails"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"go.linka.cloud/grpc/errors"
|
||||
"go.linka.cloud/grpc/interceptors"
|
||||
"go.linka.cloud/grpc-toolkit/errors"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors"
|
||||
)
|
||||
|
||||
type validatorAll interface {
|
||||
|
Reference in New Issue
Block a user