Documentation ¶
Overview ¶
Package kas is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterAccessServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAccessServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccessServiceClient) error
- func RegisterAccessServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAccessServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AccessServiceServer) error
- func RegisterAccessServiceServer(s grpc.ServiceRegistrar, srv AccessServiceServer)
- type AccessServiceClient
- type AccessServiceServer
- type InfoRequest
- type InfoResponse
- type LegacyPublicKeyRequest
- func (*LegacyPublicKeyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LegacyPublicKeyRequest) GetAlgorithm() string
- func (*LegacyPublicKeyRequest) ProtoMessage()
- func (x *LegacyPublicKeyRequest) ProtoReflect() protoreflect.Message
- func (x *LegacyPublicKeyRequest) Reset()
- func (x *LegacyPublicKeyRequest) String() string
- type PublicKeyRequest
- func (*PublicKeyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PublicKeyRequest) GetAlgorithm() string
- func (x *PublicKeyRequest) GetFmt() string
- func (x *PublicKeyRequest) GetV() string
- func (*PublicKeyRequest) ProtoMessage()
- func (x *PublicKeyRequest) ProtoReflect() protoreflect.Message
- func (x *PublicKeyRequest) Reset()
- func (x *PublicKeyRequest) String() string
- type PublicKeyResponse
- func (*PublicKeyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PublicKeyResponse) GetKid() string
- func (x *PublicKeyResponse) GetPublicKey() string
- func (*PublicKeyResponse) ProtoMessage()
- func (x *PublicKeyResponse) ProtoReflect() protoreflect.Message
- func (x *PublicKeyResponse) Reset()
- func (x *PublicKeyResponse) String() string
- type RewrapRequest
- type RewrapResponse
- func (*RewrapResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RewrapResponse) GetEntityWrappedKey() []byte
- func (x *RewrapResponse) GetMetadata() map[string]*structpb.Value
- func (x *RewrapResponse) GetSchemaVersion() string
- func (x *RewrapResponse) GetSessionPublicKey() string
- func (*RewrapResponse) ProtoMessage()
- func (x *RewrapResponse) ProtoReflect() protoreflect.Message
- func (x *RewrapResponse) Reset()
- func (x *RewrapResponse) String() string
- type UnimplementedAccessServiceServer
- func (UnimplementedAccessServiceServer) LegacyPublicKey(context.Context, *LegacyPublicKeyRequest) (*wrapperspb.StringValue, error)
- func (UnimplementedAccessServiceServer) PublicKey(context.Context, *PublicKeyRequest) (*PublicKeyResponse, error)
- func (UnimplementedAccessServiceServer) Rewrap(context.Context, *RewrapRequest) (*RewrapResponse, error)
- type UnsafeAccessServiceServer
Constants ¶
const ( AccessService_PublicKey_FullMethodName = "/kas.AccessService/PublicKey" AccessService_LegacyPublicKey_FullMethodName = "/kas.AccessService/LegacyPublicKey" AccessService_Rewrap_FullMethodName = "/kas.AccessService/Rewrap" )
Variables ¶
var AccessService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "kas.AccessService", HandlerType: (*AccessServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "PublicKey", Handler: _AccessService_PublicKey_Handler, }, { MethodName: "LegacyPublicKey", Handler: _AccessService_LegacyPublicKey_Handler, }, { MethodName: "Rewrap", Handler: _AccessService_Rewrap_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "kas/kas.proto", }
AccessService_ServiceDesc is the grpc.ServiceDesc for AccessService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_kas_kas_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAccessServiceHandler ¶
func RegisterAccessServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterAccessServiceHandler registers the http handlers for service AccessService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAccessServiceHandlerClient ¶
func RegisterAccessServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccessServiceClient) error
RegisterAccessServiceHandlerClient registers the http handlers for service AccessService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AccessServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AccessServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AccessServiceClient" to call the correct interceptors.
func RegisterAccessServiceHandlerFromEndpoint ¶
func RegisterAccessServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAccessServiceHandlerFromEndpoint is same as RegisterAccessServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAccessServiceHandlerServer ¶
func RegisterAccessServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AccessServiceServer) error
RegisterAccessServiceHandlerServer registers the http handlers for service AccessService to "mux". UnaryRPC :call AccessServiceServer 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 RegisterAccessServiceHandlerFromEndpoint instead.
func RegisterAccessServiceServer ¶
func RegisterAccessServiceServer(s grpc.ServiceRegistrar, srv AccessServiceServer)
Types ¶
type AccessServiceClient ¶
type AccessServiceClient interface { PublicKey(ctx context.Context, in *PublicKeyRequest, opts ...grpc.CallOption) (*PublicKeyResponse, error) // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME LegacyPublicKey(ctx context.Context, in *LegacyPublicKeyRequest, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) Rewrap(ctx context.Context, in *RewrapRequest, opts ...grpc.CallOption) (*RewrapResponse, error) }
AccessServiceClient is the client API for AccessService 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 NewAccessServiceClient ¶
func NewAccessServiceClient(cc grpc.ClientConnInterface) AccessServiceClient
type AccessServiceServer ¶
type AccessServiceServer interface { PublicKey(context.Context, *PublicKeyRequest) (*PublicKeyResponse, error) // buf:lint:ignore RPC_RESPONSE_STANDARD_NAME LegacyPublicKey(context.Context, *LegacyPublicKeyRequest) (*wrapperspb.StringValue, error) Rewrap(context.Context, *RewrapRequest) (*RewrapResponse, error) // contains filtered or unexported methods }
AccessServiceServer is the server API for AccessService service. All implementations must embed UnimplementedAccessServiceServer for forward compatibility
type InfoRequest ¶
type InfoRequest struct {
// contains filtered or unexported fields
}
func (*InfoRequest) Descriptor
deprecated
func (*InfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead.
func (*InfoRequest) ProtoMessage ¶
func (*InfoRequest) ProtoMessage()
func (*InfoRequest) ProtoReflect ¶
func (x *InfoRequest) ProtoReflect() protoreflect.Message
func (*InfoRequest) Reset ¶
func (x *InfoRequest) Reset()
func (*InfoRequest) String ¶
func (x *InfoRequest) String() string
type InfoResponse ¶
type InfoResponse struct { Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // contains filtered or unexported fields }
Service application level metadata
func (*InfoResponse) Descriptor
deprecated
func (*InfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use InfoResponse.ProtoReflect.Descriptor instead.
func (*InfoResponse) GetVersion ¶
func (x *InfoResponse) GetVersion() string
func (*InfoResponse) ProtoMessage ¶
func (*InfoResponse) ProtoMessage()
func (*InfoResponse) ProtoReflect ¶
func (x *InfoResponse) ProtoReflect() protoreflect.Message
func (*InfoResponse) Reset ¶
func (x *InfoResponse) Reset()
func (*InfoResponse) String ¶
func (x *InfoResponse) String() string
type LegacyPublicKeyRequest ¶
type LegacyPublicKeyRequest struct { Algorithm string `protobuf:"bytes,1,opt,name=algorithm,proto3" json:"algorithm,omitempty"` // contains filtered or unexported fields }
func (*LegacyPublicKeyRequest) Descriptor
deprecated
func (*LegacyPublicKeyRequest) Descriptor() ([]byte, []int)
Deprecated: Use LegacyPublicKeyRequest.ProtoReflect.Descriptor instead.
func (*LegacyPublicKeyRequest) GetAlgorithm ¶
func (x *LegacyPublicKeyRequest) GetAlgorithm() string
func (*LegacyPublicKeyRequest) ProtoMessage ¶
func (*LegacyPublicKeyRequest) ProtoMessage()
func (*LegacyPublicKeyRequest) ProtoReflect ¶
func (x *LegacyPublicKeyRequest) ProtoReflect() protoreflect.Message
func (*LegacyPublicKeyRequest) Reset ¶
func (x *LegacyPublicKeyRequest) Reset()
func (*LegacyPublicKeyRequest) String ¶
func (x *LegacyPublicKeyRequest) String() string
type PublicKeyRequest ¶
type PublicKeyRequest struct { Algorithm string `protobuf:"bytes,1,opt,name=algorithm,proto3" json:"algorithm,omitempty"` Fmt string `protobuf:"bytes,2,opt,name=fmt,proto3" json:"fmt,omitempty"` V string `protobuf:"bytes,3,opt,name=v,proto3" json:"v,omitempty"` // contains filtered or unexported fields }
func (*PublicKeyRequest) Descriptor
deprecated
func (*PublicKeyRequest) Descriptor() ([]byte, []int)
Deprecated: Use PublicKeyRequest.ProtoReflect.Descriptor instead.
func (*PublicKeyRequest) GetAlgorithm ¶
func (x *PublicKeyRequest) GetAlgorithm() string
func (*PublicKeyRequest) GetFmt ¶
func (x *PublicKeyRequest) GetFmt() string
func (*PublicKeyRequest) GetV ¶
func (x *PublicKeyRequest) GetV() string
func (*PublicKeyRequest) ProtoMessage ¶
func (*PublicKeyRequest) ProtoMessage()
func (*PublicKeyRequest) ProtoReflect ¶
func (x *PublicKeyRequest) ProtoReflect() protoreflect.Message
func (*PublicKeyRequest) Reset ¶
func (x *PublicKeyRequest) Reset()
func (*PublicKeyRequest) String ¶
func (x *PublicKeyRequest) String() string
type PublicKeyResponse ¶
type PublicKeyResponse struct { PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` Kid string `protobuf:"bytes,2,opt,name=kid,proto3" json:"kid,omitempty"` // contains filtered or unexported fields }
func (*PublicKeyResponse) Descriptor
deprecated
func (*PublicKeyResponse) Descriptor() ([]byte, []int)
Deprecated: Use PublicKeyResponse.ProtoReflect.Descriptor instead.
func (*PublicKeyResponse) GetKid ¶ added in v0.2.4
func (x *PublicKeyResponse) GetKid() string
func (*PublicKeyResponse) GetPublicKey ¶
func (x *PublicKeyResponse) GetPublicKey() string
func (*PublicKeyResponse) ProtoMessage ¶
func (*PublicKeyResponse) ProtoMessage()
func (*PublicKeyResponse) ProtoReflect ¶
func (x *PublicKeyResponse) ProtoReflect() protoreflect.Message
func (*PublicKeyResponse) Reset ¶
func (x *PublicKeyResponse) Reset()
func (*PublicKeyResponse) String ¶
func (x *PublicKeyResponse) String() string
type RewrapRequest ¶
type RewrapRequest struct { SignedRequestToken string `protobuf:"bytes,1,opt,name=signed_request_token,json=signedRequestToken,proto3" json:"signed_request_token,omitempty"` // contains filtered or unexported fields }
func (*RewrapRequest) Descriptor
deprecated
func (*RewrapRequest) Descriptor() ([]byte, []int)
Deprecated: Use RewrapRequest.ProtoReflect.Descriptor instead.
func (*RewrapRequest) GetSignedRequestToken ¶
func (x *RewrapRequest) GetSignedRequestToken() string
func (*RewrapRequest) ProtoMessage ¶
func (*RewrapRequest) ProtoMessage()
func (*RewrapRequest) ProtoReflect ¶
func (x *RewrapRequest) ProtoReflect() protoreflect.Message
func (*RewrapRequest) Reset ¶
func (x *RewrapRequest) Reset()
func (*RewrapRequest) String ¶
func (x *RewrapRequest) String() string
type RewrapResponse ¶
type RewrapResponse struct { Metadata map[string]*structpb.Value `` /* 157-byte string literal not displayed */ EntityWrappedKey []byte `protobuf:"bytes,2,opt,name=entity_wrapped_key,json=entityWrappedKey,proto3" json:"entity_wrapped_key,omitempty"` SessionPublicKey string `protobuf:"bytes,3,opt,name=session_public_key,json=sessionPublicKey,proto3" json:"session_public_key,omitempty"` SchemaVersion string `protobuf:"bytes,4,opt,name=schema_version,json=schemaVersion,proto3" json:"schema_version,omitempty"` // contains filtered or unexported fields }
func (*RewrapResponse) Descriptor
deprecated
func (*RewrapResponse) Descriptor() ([]byte, []int)
Deprecated: Use RewrapResponse.ProtoReflect.Descriptor instead.
func (*RewrapResponse) GetEntityWrappedKey ¶
func (x *RewrapResponse) GetEntityWrappedKey() []byte
func (*RewrapResponse) GetMetadata ¶
func (x *RewrapResponse) GetMetadata() map[string]*structpb.Value
func (*RewrapResponse) GetSchemaVersion ¶
func (x *RewrapResponse) GetSchemaVersion() string
func (*RewrapResponse) GetSessionPublicKey ¶
func (x *RewrapResponse) GetSessionPublicKey() string
func (*RewrapResponse) ProtoMessage ¶
func (*RewrapResponse) ProtoMessage()
func (*RewrapResponse) ProtoReflect ¶
func (x *RewrapResponse) ProtoReflect() protoreflect.Message
func (*RewrapResponse) Reset ¶
func (x *RewrapResponse) Reset()
func (*RewrapResponse) String ¶
func (x *RewrapResponse) String() string
type UnimplementedAccessServiceServer ¶
type UnimplementedAccessServiceServer struct { }
UnimplementedAccessServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAccessServiceServer) LegacyPublicKey ¶
func (UnimplementedAccessServiceServer) LegacyPublicKey(context.Context, *LegacyPublicKeyRequest) (*wrapperspb.StringValue, error)
func (UnimplementedAccessServiceServer) PublicKey ¶
func (UnimplementedAccessServiceServer) PublicKey(context.Context, *PublicKeyRequest) (*PublicKeyResponse, error)
func (UnimplementedAccessServiceServer) Rewrap ¶
func (UnimplementedAccessServiceServer) Rewrap(context.Context, *RewrapRequest) (*RewrapResponse, error)
type UnsafeAccessServiceServer ¶
type UnsafeAccessServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAccessServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AccessServiceServer will result in compilation errors.