Documentation ¶
Index ¶
- Constants
- Variables
- func NewAuthentication(environment string, opts ...jwtAuth.Option) (authenticator.AuthFunc, error)
- func RegisterGoogleServiceServer(s grpc.ServiceRegistrar, srv GoogleServiceServer)
- func RegisterPrivateServiceServer(s grpc.ServiceRegistrar, srv PrivateServiceServer)
- type GoogleServiceClient
- type GoogleServiceServer
- type PrivateServiceClient
- type PrivateServiceServer
- type UnimplementedGoogleServiceServer
- type UnimplementedPrivateServiceServer
- type UnsafeGoogleServiceServer
- type UnsafePrivateServiceServer
Constants ¶
const ( GoogleService_Login_FullMethodName = "/example.v1.GoogleService/Login" GoogleService_Logout_FullMethodName = "/example.v1.GoogleService/Logout" )
const ( PrivateService_RequireAuthentication_FullMethodName = "/example.v1.PrivateService/RequireAuthentication" PrivateService_Unauthenticated_FullMethodName = "/example.v1.PrivateService/Unauthenticated" )
Variables ¶
var File_example_v1_example_proto protoreflect.FileDescriptor
var GoogleService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "example.v1.GoogleService", HandlerType: (*GoogleServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _GoogleService_Login_Handler, }, { MethodName: "Logout", Handler: _GoogleService_Logout_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "example/v1/example.proto", }
GoogleService_ServiceDesc is the grpc.ServiceDesc for GoogleService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var PrivateService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "example.v1.PrivateService", HandlerType: (*PrivateServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "RequireAuthentication", Handler: _PrivateService_RequireAuthentication_Handler, }, { MethodName: "Unauthenticated", Handler: _PrivateService_Unauthenticated_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "example/v1/example.proto", }
PrivateService_ServiceDesc is the grpc.ServiceDesc for PrivateService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func NewAuthentication ¶
NewAuthentication returns a new authenticator that can be used in unary/stream interceptors The authenticator will use the claimsToContext function to add claims to the context if the request is authenticated
func RegisterGoogleServiceServer ¶
func RegisterGoogleServiceServer(s grpc.ServiceRegistrar, srv GoogleServiceServer)
func RegisterPrivateServiceServer ¶
func RegisterPrivateServiceServer(s grpc.ServiceRegistrar, srv PrivateServiceServer)
Types ¶
type GoogleServiceClient ¶
type GoogleServiceClient interface { Login(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) Logout(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) }
GoogleServiceClient is the client API for GoogleService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewGoogleServiceClient ¶
func NewGoogleServiceClient(cc grpc.ClientConnInterface) GoogleServiceClient
type GoogleServiceServer ¶
type GoogleServiceServer interface { Login(context.Context, *emptypb.Empty) (*emptypb.Empty, error) Logout(context.Context, *emptypb.Empty) (*emptypb.Empty, error) // contains filtered or unexported methods }
GoogleServiceServer is the server API for GoogleService service. All implementations must embed UnimplementedGoogleServiceServer for forward compatibility
type PrivateServiceClient ¶
type PrivateServiceClient interface { RequireAuthentication(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) Unauthenticated(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) }
PrivateServiceClient is the client API for PrivateService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewPrivateServiceClient ¶
func NewPrivateServiceClient(cc grpc.ClientConnInterface) PrivateServiceClient
type PrivateServiceServer ¶
type PrivateServiceServer interface { RequireAuthentication(context.Context, *emptypb.Empty) (*emptypb.Empty, error) Unauthenticated(context.Context, *emptypb.Empty) (*emptypb.Empty, error) // contains filtered or unexported methods }
PrivateServiceServer is the server API for PrivateService service. All implementations must embed UnimplementedPrivateServiceServer for forward compatibility
type UnimplementedGoogleServiceServer ¶
type UnimplementedGoogleServiceServer struct { }
UnimplementedGoogleServiceServer must be embedded to have forward compatible implementations.
type UnimplementedPrivateServiceServer ¶
type UnimplementedPrivateServiceServer struct { }
UnimplementedPrivateServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedPrivateServiceServer) RequireAuthentication ¶
func (UnimplementedPrivateServiceServer) Unauthenticated ¶
type UnsafeGoogleServiceServer ¶
type UnsafeGoogleServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGoogleServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GoogleServiceServer will result in compilation errors.
type UnsafePrivateServiceServer ¶
type UnsafePrivateServiceServer interface {
// contains filtered or unexported methods
}
UnsafePrivateServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PrivateServiceServer will result in compilation errors.