yubikey

package
v0.0.0-...-0f91fa8 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package yubikey is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	YubikeyService_GetSerials_FullMethodName                = "/yubikey.v1.YubikeyService/GetSerials"
	YubikeyService_GetVersion_FullMethodName                = "/yubikey.v1.YubikeyService/GetVersion"
	YubikeyService_GetRetries_FullMethodName                = "/yubikey.v1.YubikeyService/GetRetries"
	YubikeyService_GetAttestationCertificate_FullMethodName = "/yubikey.v1.YubikeyService/GetAttestationCertificate"
)

Variables

View Source
var File_yubikey_v1_yubikey_proto protoreflect.FileDescriptor
View Source
var YubikeyService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yubikey.v1.YubikeyService",
	HandlerType: (*YubikeyServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetSerials",
			Handler:    _YubikeyService_GetSerials_Handler,
		},
		{
			MethodName: "GetVersion",
			Handler:    _YubikeyService_GetVersion_Handler,
		},
		{
			MethodName: "GetRetries",
			Handler:    _YubikeyService_GetRetries_Handler,
		},
		{
			MethodName: "GetAttestationCertificate",
			Handler:    _YubikeyService_GetAttestationCertificate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yubikey/v1/yubikey.proto",
}

YubikeyService_ServiceDesc is the grpc.ServiceDesc for YubikeyService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterYubikeyServiceHandler

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

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

func RegisterYubikeyServiceHandlerClient

func RegisterYubikeyServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client YubikeyServiceClient) error

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

func RegisterYubikeyServiceHandlerFromEndpoint

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

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

func RegisterYubikeyServiceHandlerServer

func RegisterYubikeyServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server YubikeyServiceServer) error

RegisterYubikeyServiceHandlerServer registers the http handlers for service YubikeyService to "mux". UnaryRPC :call YubikeyServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterYubikeyServiceHandlerFromEndpoint instead.

func RegisterYubikeyServiceServer

func RegisterYubikeyServiceServer(s grpc.ServiceRegistrar, srv YubikeyServiceServer)

Types

type GetAttestationCertificateRequest

type GetAttestationCertificateRequest struct {
	Serial uint32 `protobuf:"varint,1,opt,name=serial,proto3" json:"serial,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAttestationCertificateRequest) Descriptor deprecated

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

Deprecated: Use GetAttestationCertificateRequest.ProtoReflect.Descriptor instead.

func (*GetAttestationCertificateRequest) GetSerial

func (*GetAttestationCertificateRequest) ProtoMessage

func (*GetAttestationCertificateRequest) ProtoMessage()

func (*GetAttestationCertificateRequest) ProtoReflect

func (*GetAttestationCertificateRequest) Reset

func (*GetAttestationCertificateRequest) String

type GetAttestationCertificateResponse

type GetAttestationCertificateResponse struct {
	Certificate []byte `protobuf:"bytes,1,opt,name=certificate,proto3" json:"certificate,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAttestationCertificateResponse) Descriptor deprecated

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

Deprecated: Use GetAttestationCertificateResponse.ProtoReflect.Descriptor instead.

func (*GetAttestationCertificateResponse) GetCertificate

func (x *GetAttestationCertificateResponse) GetCertificate() []byte

func (*GetAttestationCertificateResponse) ProtoMessage

func (*GetAttestationCertificateResponse) ProtoMessage()

func (*GetAttestationCertificateResponse) ProtoReflect

func (*GetAttestationCertificateResponse) Reset

func (*GetAttestationCertificateResponse) String

type GetRetriesRequest

type GetRetriesRequest struct {
	Serial uint32 `protobuf:"varint,1,opt,name=serial,proto3" json:"serial,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRetriesRequest) Descriptor deprecated

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

Deprecated: Use GetRetriesRequest.ProtoReflect.Descriptor instead.

func (*GetRetriesRequest) GetSerial

func (x *GetRetriesRequest) GetSerial() uint32

func (*GetRetriesRequest) ProtoMessage

func (*GetRetriesRequest) ProtoMessage()

func (*GetRetriesRequest) ProtoReflect

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

func (*GetRetriesRequest) Reset

func (x *GetRetriesRequest) Reset()

func (*GetRetriesRequest) String

func (x *GetRetriesRequest) String() string

type GetRetriesResponse

type GetRetriesResponse struct {
	Retries uint32 `protobuf:"varint,1,opt,name=retries,proto3" json:"retries,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRetriesResponse) Descriptor deprecated

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

Deprecated: Use GetRetriesResponse.ProtoReflect.Descriptor instead.

func (*GetRetriesResponse) GetRetries

func (x *GetRetriesResponse) GetRetries() uint32

func (*GetRetriesResponse) ProtoMessage

func (*GetRetriesResponse) ProtoMessage()

func (*GetRetriesResponse) ProtoReflect

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

func (*GetRetriesResponse) Reset

func (x *GetRetriesResponse) Reset()

func (*GetRetriesResponse) String

func (x *GetRetriesResponse) String() string

type GetSerialsRequest

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

func (*GetSerialsRequest) Descriptor deprecated

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

Deprecated: Use GetSerialsRequest.ProtoReflect.Descriptor instead.

func (*GetSerialsRequest) ProtoMessage

func (*GetSerialsRequest) ProtoMessage()

func (*GetSerialsRequest) ProtoReflect

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

func (*GetSerialsRequest) Reset

func (x *GetSerialsRequest) Reset()

func (*GetSerialsRequest) String

func (x *GetSerialsRequest) String() string

type GetSerialsResponse

type GetSerialsResponse struct {
	Serials []uint32 `protobuf:"varint,1,rep,packed,name=serials,proto3" json:"serials,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSerialsResponse) Descriptor deprecated

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

Deprecated: Use GetSerialsResponse.ProtoReflect.Descriptor instead.

func (*GetSerialsResponse) GetSerials

func (x *GetSerialsResponse) GetSerials() []uint32

func (*GetSerialsResponse) ProtoMessage

func (*GetSerialsResponse) ProtoMessage()

func (*GetSerialsResponse) ProtoReflect

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

func (*GetSerialsResponse) Reset

func (x *GetSerialsResponse) Reset()

func (*GetSerialsResponse) String

func (x *GetSerialsResponse) String() string

type GetVersionRequest

type GetVersionRequest struct {
	Serial uint32 `protobuf:"varint,1,opt,name=serial,proto3" json:"serial,omitempty"`
	// contains filtered or unexported fields
}

func (*GetVersionRequest) Descriptor deprecated

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

Deprecated: Use GetVersionRequest.ProtoReflect.Descriptor instead.

func (*GetVersionRequest) GetSerial

func (x *GetVersionRequest) GetSerial() uint32

func (*GetVersionRequest) ProtoMessage

func (*GetVersionRequest) ProtoMessage()

func (*GetVersionRequest) ProtoReflect

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

func (*GetVersionRequest) Reset

func (x *GetVersionRequest) Reset()

func (*GetVersionRequest) String

func (x *GetVersionRequest) String() string

type GetVersionResponse

type GetVersionResponse struct {
	Version *Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*GetVersionResponse) Descriptor deprecated

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

Deprecated: Use GetVersionResponse.ProtoReflect.Descriptor instead.

func (*GetVersionResponse) GetVersion

func (x *GetVersionResponse) GetVersion() *Version

func (*GetVersionResponse) ProtoMessage

func (*GetVersionResponse) ProtoMessage()

func (*GetVersionResponse) ProtoReflect

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

func (*GetVersionResponse) Reset

func (x *GetVersionResponse) Reset()

func (*GetVersionResponse) String

func (x *GetVersionResponse) String() string

type UnimplementedYubikeyServiceServer

type UnimplementedYubikeyServiceServer struct {
}

UnimplementedYubikeyServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedYubikeyServiceServer) GetRetries

func (UnimplementedYubikeyServiceServer) GetSerials

func (UnimplementedYubikeyServiceServer) GetVersion

type UnsafeYubikeyServiceServer

type UnsafeYubikeyServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeYubikeyServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to YubikeyServiceServer will result in compilation errors.

type Version

type Version struct {
	Major uint32 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"`
	Minor uint32 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"`
	Patch uint32 `protobuf:"varint,3,opt,name=patch,proto3" json:"patch,omitempty"`
	// contains filtered or unexported fields
}

func (*Version) Descriptor deprecated

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

Deprecated: Use Version.ProtoReflect.Descriptor instead.

func (*Version) GetMajor

func (x *Version) GetMajor() uint32

func (*Version) GetMinor

func (x *Version) GetMinor() uint32

func (*Version) GetPatch

func (x *Version) GetPatch() uint32

func (*Version) ProtoMessage

func (*Version) ProtoMessage()

func (*Version) ProtoReflect

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

func (*Version) Reset

func (x *Version) Reset()

func (*Version) String

func (x *Version) String() string

type YubikeyServiceClient

type YubikeyServiceClient interface {
	GetSerials(ctx context.Context, in *GetSerialsRequest, opts ...grpc.CallOption) (*GetSerialsResponse, error)
	GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error)
	GetRetries(ctx context.Context, in *GetRetriesRequest, opts ...grpc.CallOption) (*GetRetriesResponse, error)
	GetAttestationCertificate(ctx context.Context, in *GetAttestationCertificateRequest, opts ...grpc.CallOption) (*GetAttestationCertificateResponse, error)
}

YubikeyServiceClient is the client API for YubikeyService 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 YubikeyServiceServer

type YubikeyServiceServer interface {
	GetSerials(context.Context, *GetSerialsRequest) (*GetSerialsResponse, error)
	GetVersion(context.Context, *GetVersionRequest) (*GetVersionResponse, error)
	GetRetries(context.Context, *GetRetriesRequest) (*GetRetriesResponse, error)
	GetAttestationCertificate(context.Context, *GetAttestationCertificateRequest) (*GetAttestationCertificateResponse, error)
	// contains filtered or unexported methods
}

YubikeyServiceServer is the server API for YubikeyService service. All implementations must embed UnimplementedYubikeyServiceServer for forward compatibility

Jump to

Keyboard shortcuts

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