jwt

package
v0.0.0-...-2d9866a Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package jwt is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_proto_jwt_jwt_proto protoreflect.FileDescriptor

Functions

func RegisterJWTServiceHandler

func RegisterJWTServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterJWTServiceHandler registers the http handlers for service JWTService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterJWTServiceHandlerClient

func RegisterJWTServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client JWTServiceClient) error

RegisterJWTServiceHandlerClient registers the http handlers for service JWTService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "JWTServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "JWTServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "JWTServiceClient" to call the correct interceptors.

func RegisterJWTServiceHandlerFromEndpoint

func RegisterJWTServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterJWTServiceHandlerFromEndpoint is same as RegisterJWTServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterJWTServiceHandlerServer

func RegisterJWTServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server JWTServiceServer) error

RegisterJWTServiceHandlerServer registers the http handlers for service JWTService to "mux". UnaryRPC :call JWTServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterJWTServiceServer

func RegisterJWTServiceServer(s *grpc.Server, srv JWTServiceServer)

Types

type CreateJWTTokenRequest

type CreateJWTTokenRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateJWTTokenRequest) Descriptor deprecated

func (*CreateJWTTokenRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateJWTTokenRequest.ProtoReflect.Descriptor instead.

func (*CreateJWTTokenRequest) GetPassword

func (x *CreateJWTTokenRequest) GetPassword() string

func (*CreateJWTTokenRequest) GetUsername

func (x *CreateJWTTokenRequest) GetUsername() string

func (*CreateJWTTokenRequest) ProtoMessage

func (*CreateJWTTokenRequest) ProtoMessage()

func (*CreateJWTTokenRequest) ProtoReflect

func (x *CreateJWTTokenRequest) ProtoReflect() protoreflect.Message

func (*CreateJWTTokenRequest) Reset

func (x *CreateJWTTokenRequest) Reset()

func (*CreateJWTTokenRequest) String

func (x *CreateJWTTokenRequest) String() string

type CreateJWTTokenResponse

type CreateJWTTokenResponse struct {
	Jwt string `protobuf:"bytes,1,opt,name=jwt,proto3" json:"jwt,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateJWTTokenResponse) Descriptor deprecated

func (*CreateJWTTokenResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateJWTTokenResponse.ProtoReflect.Descriptor instead.

func (*CreateJWTTokenResponse) GetJwt

func (x *CreateJWTTokenResponse) GetJwt() string

func (*CreateJWTTokenResponse) ProtoMessage

func (*CreateJWTTokenResponse) ProtoMessage()

func (*CreateJWTTokenResponse) ProtoReflect

func (x *CreateJWTTokenResponse) ProtoReflect() protoreflect.Message

func (*CreateJWTTokenResponse) Reset

func (x *CreateJWTTokenResponse) Reset()

func (*CreateJWTTokenResponse) String

func (x *CreateJWTTokenResponse) String() string

type JWTServiceClient

type JWTServiceClient interface {
	CreateJWTToken(ctx context.Context, in *CreateJWTTokenRequest, opts ...grpc.CallOption) (*CreateJWTTokenResponse, error)
	UpdateJWTToken(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	DeleteJWTToken(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
}

JWTServiceClient is the client API for JWTService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewJWTServiceClient

func NewJWTServiceClient(cc grpc.ClientConnInterface) JWTServiceClient

type JWTServiceServer

type JWTServiceServer interface {
	CreateJWTToken(context.Context, *CreateJWTTokenRequest) (*CreateJWTTokenResponse, error)
	UpdateJWTToken(context.Context, *empty.Empty) (*empty.Empty, error)
	DeleteJWTToken(context.Context, *empty.Empty) (*empty.Empty, error)
}

JWTServiceServer is the server API for JWTService service.

type UnimplementedJWTServiceServer

type UnimplementedJWTServiceServer struct {
}

UnimplementedJWTServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedJWTServiceServer) CreateJWTToken

func (*UnimplementedJWTServiceServer) DeleteJWTToken

func (*UnimplementedJWTServiceServer) UpdateJWTToken

Jump to

Keyboard shortcuts

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