examplev1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GoogleService_Login_FullMethodName  = "/example.v1.GoogleService/Login"
	GoogleService_Logout_FullMethodName = "/example.v1.GoogleService/Logout"
)
View Source
const (
	PrivateService_RequireAuthentication_FullMethodName = "/example.v1.PrivateService/RequireAuthentication"
	PrivateService_Unauthenticated_FullMethodName       = "/example.v1.PrivateService/Unauthenticated"
)

Variables

View Source
var File_example_v1_example_proto protoreflect.FileDescriptor
View Source
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)

View Source
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

func NewAuthentication(environment string, opts ...jwtAuth.Option) (authenticator.AuthFunc, error)

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.

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.

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.

func (UnimplementedGoogleServiceServer) Login

func (UnimplementedGoogleServiceServer) Logout

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.

Jump to

Keyboard shortcuts

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