kasregistry

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: BSD-3-Clause-Clear Imports: 18 Imported by: 0

Documentation

Overview

Package kasregistry is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	KeyAccessServerRegistryService_ListKeyAccessServers_FullMethodName  = "/kasregistry.KeyAccessServerRegistryService/ListKeyAccessServers"
	KeyAccessServerRegistryService_GetKeyAccessServer_FullMethodName    = "/kasregistry.KeyAccessServerRegistryService/GetKeyAccessServer"
	KeyAccessServerRegistryService_CreateKeyAccessServer_FullMethodName = "/kasregistry.KeyAccessServerRegistryService/CreateKeyAccessServer"
	KeyAccessServerRegistryService_UpdateKeyAccessServer_FullMethodName = "/kasregistry.KeyAccessServerRegistryService/UpdateKeyAccessServer"
	KeyAccessServerRegistryService_DeleteKeyAccessServer_FullMethodName = "/kasregistry.KeyAccessServerRegistryService/DeleteKeyAccessServer"
)

Variables

View Source
var File_kasregistry_key_access_server_registry_proto protoreflect.FileDescriptor
View Source
var KeyAccessServerRegistryService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "kasregistry.KeyAccessServerRegistryService",
	HandlerType: (*KeyAccessServerRegistryServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListKeyAccessServers",
			Handler:    _KeyAccessServerRegistryService_ListKeyAccessServers_Handler,
		},
		{
			MethodName: "GetKeyAccessServer",
			Handler:    _KeyAccessServerRegistryService_GetKeyAccessServer_Handler,
		},
		{
			MethodName: "CreateKeyAccessServer",
			Handler:    _KeyAccessServerRegistryService_CreateKeyAccessServer_Handler,
		},
		{
			MethodName: "UpdateKeyAccessServer",
			Handler:    _KeyAccessServerRegistryService_UpdateKeyAccessServer_Handler,
		},
		{
			MethodName: "DeleteKeyAccessServer",
			Handler:    _KeyAccessServerRegistryService_DeleteKeyAccessServer_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "kasregistry/key_access_server_registry.proto",
}

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

Functions

func RegisterKeyAccessServerRegistryServiceHandler

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

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

func RegisterKeyAccessServerRegistryServiceHandlerClient

func RegisterKeyAccessServerRegistryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client KeyAccessServerRegistryServiceClient) error

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

func RegisterKeyAccessServerRegistryServiceHandlerFromEndpoint

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

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

func RegisterKeyAccessServerRegistryServiceHandlerServer

func RegisterKeyAccessServerRegistryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server KeyAccessServerRegistryServiceServer) error

RegisterKeyAccessServerRegistryServiceHandlerServer registers the http handlers for service KeyAccessServerRegistryService to "mux". UnaryRPC :call KeyAccessServerRegistryServiceServer 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 RegisterKeyAccessServerRegistryServiceHandlerFromEndpoint instead.

func RegisterKeyAccessServerRegistryServiceServer

func RegisterKeyAccessServerRegistryServiceServer(s grpc.ServiceRegistrar, srv KeyAccessServerRegistryServiceServer)

Types

type CreateKeyAccessServerRequest

type CreateKeyAccessServerRequest struct {

	// Required
	Uri       string     `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
	PublicKey *PublicKey `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// Common metadata
	Metadata *common.MetadataMutable `protobuf:"bytes,100,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateKeyAccessServerRequest) Descriptor deprecated

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

Deprecated: Use CreateKeyAccessServerRequest.ProtoReflect.Descriptor instead.

func (*CreateKeyAccessServerRequest) GetMetadata

func (*CreateKeyAccessServerRequest) GetPublicKey

func (x *CreateKeyAccessServerRequest) GetPublicKey() *PublicKey

func (*CreateKeyAccessServerRequest) GetUri

func (*CreateKeyAccessServerRequest) ProtoMessage

func (*CreateKeyAccessServerRequest) ProtoMessage()

func (*CreateKeyAccessServerRequest) ProtoReflect

func (*CreateKeyAccessServerRequest) Reset

func (x *CreateKeyAccessServerRequest) Reset()

func (*CreateKeyAccessServerRequest) String

type CreateKeyAccessServerResponse

type CreateKeyAccessServerResponse struct {
	KeyAccessServer *KeyAccessServer `protobuf:"bytes,1,opt,name=key_access_server,json=keyAccessServer,proto3" json:"key_access_server,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateKeyAccessServerResponse) Descriptor deprecated

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

Deprecated: Use CreateKeyAccessServerResponse.ProtoReflect.Descriptor instead.

func (*CreateKeyAccessServerResponse) GetKeyAccessServer

func (x *CreateKeyAccessServerResponse) GetKeyAccessServer() *KeyAccessServer

func (*CreateKeyAccessServerResponse) ProtoMessage

func (*CreateKeyAccessServerResponse) ProtoMessage()

func (*CreateKeyAccessServerResponse) ProtoReflect

func (*CreateKeyAccessServerResponse) Reset

func (x *CreateKeyAccessServerResponse) Reset()

func (*CreateKeyAccessServerResponse) String

type DeleteKeyAccessServerRequest

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

func (*DeleteKeyAccessServerRequest) Descriptor deprecated

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

Deprecated: Use DeleteKeyAccessServerRequest.ProtoReflect.Descriptor instead.

func (*DeleteKeyAccessServerRequest) GetId

func (*DeleteKeyAccessServerRequest) ProtoMessage

func (*DeleteKeyAccessServerRequest) ProtoMessage()

func (*DeleteKeyAccessServerRequest) ProtoReflect

func (*DeleteKeyAccessServerRequest) Reset

func (x *DeleteKeyAccessServerRequest) Reset()

func (*DeleteKeyAccessServerRequest) String

type DeleteKeyAccessServerResponse

type DeleteKeyAccessServerResponse struct {
	KeyAccessServer *KeyAccessServer `protobuf:"bytes,1,opt,name=key_access_server,json=keyAccessServer,proto3" json:"key_access_server,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteKeyAccessServerResponse) Descriptor deprecated

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

Deprecated: Use DeleteKeyAccessServerResponse.ProtoReflect.Descriptor instead.

func (*DeleteKeyAccessServerResponse) GetKeyAccessServer

func (x *DeleteKeyAccessServerResponse) GetKeyAccessServer() *KeyAccessServer

func (*DeleteKeyAccessServerResponse) ProtoMessage

func (*DeleteKeyAccessServerResponse) ProtoMessage()

func (*DeleteKeyAccessServerResponse) ProtoReflect

func (*DeleteKeyAccessServerResponse) Reset

func (x *DeleteKeyAccessServerResponse) Reset()

func (*DeleteKeyAccessServerResponse) String

type GetKeyAccessServerRequest

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

func (*GetKeyAccessServerRequest) Descriptor deprecated

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

Deprecated: Use GetKeyAccessServerRequest.ProtoReflect.Descriptor instead.

func (*GetKeyAccessServerRequest) GetId

func (x *GetKeyAccessServerRequest) GetId() string

func (*GetKeyAccessServerRequest) ProtoMessage

func (*GetKeyAccessServerRequest) ProtoMessage()

func (*GetKeyAccessServerRequest) ProtoReflect

func (*GetKeyAccessServerRequest) Reset

func (x *GetKeyAccessServerRequest) Reset()

func (*GetKeyAccessServerRequest) String

func (x *GetKeyAccessServerRequest) String() string

type GetKeyAccessServerResponse

type GetKeyAccessServerResponse struct {
	KeyAccessServer *KeyAccessServer `protobuf:"bytes,1,opt,name=key_access_server,json=keyAccessServer,proto3" json:"key_access_server,omitempty"`
	// contains filtered or unexported fields
}

func (*GetKeyAccessServerResponse) Descriptor deprecated

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

Deprecated: Use GetKeyAccessServerResponse.ProtoReflect.Descriptor instead.

func (*GetKeyAccessServerResponse) GetKeyAccessServer

func (x *GetKeyAccessServerResponse) GetKeyAccessServer() *KeyAccessServer

func (*GetKeyAccessServerResponse) ProtoMessage

func (*GetKeyAccessServerResponse) ProtoMessage()

func (*GetKeyAccessServerResponse) ProtoReflect

func (*GetKeyAccessServerResponse) Reset

func (x *GetKeyAccessServerResponse) Reset()

func (*GetKeyAccessServerResponse) String

func (x *GetKeyAccessServerResponse) String() string

type KeyAccessServer

type KeyAccessServer struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Address of a KAS instance
	Uri       string     `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"`
	PublicKey *PublicKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// Common metadata
	Metadata *common.Metadata `protobuf:"bytes,100,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

Descriptor for a KAS

func (*KeyAccessServer) Descriptor deprecated

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

Deprecated: Use KeyAccessServer.ProtoReflect.Descriptor instead.

func (*KeyAccessServer) GetId

func (x *KeyAccessServer) GetId() string

func (*KeyAccessServer) GetMetadata

func (x *KeyAccessServer) GetMetadata() *common.Metadata

func (*KeyAccessServer) GetPublicKey

func (x *KeyAccessServer) GetPublicKey() *PublicKey

func (*KeyAccessServer) GetUri

func (x *KeyAccessServer) GetUri() string

func (*KeyAccessServer) ProtoMessage

func (*KeyAccessServer) ProtoMessage()

func (*KeyAccessServer) ProtoReflect

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

func (*KeyAccessServer) Reset

func (x *KeyAccessServer) Reset()

func (*KeyAccessServer) String

func (x *KeyAccessServer) String() string

type KeyAccessServerRegistryServiceClient

type KeyAccessServerRegistryServiceClient interface {
	ListKeyAccessServers(ctx context.Context, in *ListKeyAccessServersRequest, opts ...grpc.CallOption) (*ListKeyAccessServersResponse, error)
	GetKeyAccessServer(ctx context.Context, in *GetKeyAccessServerRequest, opts ...grpc.CallOption) (*GetKeyAccessServerResponse, error)
	CreateKeyAccessServer(ctx context.Context, in *CreateKeyAccessServerRequest, opts ...grpc.CallOption) (*CreateKeyAccessServerResponse, error)
	UpdateKeyAccessServer(ctx context.Context, in *UpdateKeyAccessServerRequest, opts ...grpc.CallOption) (*UpdateKeyAccessServerResponse, error)
	DeleteKeyAccessServer(ctx context.Context, in *DeleteKeyAccessServerRequest, opts ...grpc.CallOption) (*DeleteKeyAccessServerResponse, error)
}

KeyAccessServerRegistryServiceClient is the client API for KeyAccessServerRegistryService 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 KeyAccessServerRegistryServiceServer

type KeyAccessServerRegistryServiceServer interface {
	ListKeyAccessServers(context.Context, *ListKeyAccessServersRequest) (*ListKeyAccessServersResponse, error)
	GetKeyAccessServer(context.Context, *GetKeyAccessServerRequest) (*GetKeyAccessServerResponse, error)
	CreateKeyAccessServer(context.Context, *CreateKeyAccessServerRequest) (*CreateKeyAccessServerResponse, error)
	UpdateKeyAccessServer(context.Context, *UpdateKeyAccessServerRequest) (*UpdateKeyAccessServerResponse, error)
	DeleteKeyAccessServer(context.Context, *DeleteKeyAccessServerRequest) (*DeleteKeyAccessServerResponse, error)
	// contains filtered or unexported methods
}

KeyAccessServerRegistryServiceServer is the server API for KeyAccessServerRegistryService service. All implementations must embed UnimplementedKeyAccessServerRegistryServiceServer for forward compatibility

type ListKeyAccessServersRequest

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

func (*ListKeyAccessServersRequest) Descriptor deprecated

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

Deprecated: Use ListKeyAccessServersRequest.ProtoReflect.Descriptor instead.

func (*ListKeyAccessServersRequest) ProtoMessage

func (*ListKeyAccessServersRequest) ProtoMessage()

func (*ListKeyAccessServersRequest) ProtoReflect

func (*ListKeyAccessServersRequest) Reset

func (x *ListKeyAccessServersRequest) Reset()

func (*ListKeyAccessServersRequest) String

func (x *ListKeyAccessServersRequest) String() string

type ListKeyAccessServersResponse

type ListKeyAccessServersResponse struct {
	KeyAccessServers []*KeyAccessServer `protobuf:"bytes,1,rep,name=key_access_servers,json=keyAccessServers,proto3" json:"key_access_servers,omitempty"`
	// contains filtered or unexported fields
}

func (*ListKeyAccessServersResponse) Descriptor deprecated

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

Deprecated: Use ListKeyAccessServersResponse.ProtoReflect.Descriptor instead.

func (*ListKeyAccessServersResponse) GetKeyAccessServers

func (x *ListKeyAccessServersResponse) GetKeyAccessServers() []*KeyAccessServer

func (*ListKeyAccessServersResponse) ProtoMessage

func (*ListKeyAccessServersResponse) ProtoMessage()

func (*ListKeyAccessServersResponse) ProtoReflect

func (*ListKeyAccessServersResponse) Reset

func (x *ListKeyAccessServersResponse) Reset()

func (*ListKeyAccessServersResponse) String

type PublicKey

type PublicKey struct {

	// Types that are assignable to PublicKey:
	//
	//	*PublicKey_Remote
	//	*PublicKey_Local
	PublicKey isPublicKey_PublicKey `protobuf_oneof:"public_key"`
	// contains filtered or unexported fields
}

func (*PublicKey) Descriptor deprecated

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

Deprecated: Use PublicKey.ProtoReflect.Descriptor instead.

func (*PublicKey) GetLocal

func (x *PublicKey) GetLocal() string

func (*PublicKey) GetPublicKey

func (m *PublicKey) GetPublicKey() isPublicKey_PublicKey

func (*PublicKey) GetRemote

func (x *PublicKey) GetRemote() string

func (*PublicKey) ProtoMessage

func (*PublicKey) ProtoMessage()

func (*PublicKey) ProtoReflect

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

func (*PublicKey) Reset

func (x *PublicKey) Reset()

func (*PublicKey) String

func (x *PublicKey) String() string

type PublicKey_Local

type PublicKey_Local struct {
	// public key - optional since can also be retrieved via url
	Local string `protobuf:"bytes,2,opt,name=local,proto3,oneof"`
}

type PublicKey_Remote

type PublicKey_Remote struct {
	// kas public key url - optional since can also be retrieved via public key
	Remote string `protobuf:"bytes,1,opt,name=remote,proto3,oneof"`
}

type UnimplementedKeyAccessServerRegistryServiceServer

type UnimplementedKeyAccessServerRegistryServiceServer struct {
}

UnimplementedKeyAccessServerRegistryServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedKeyAccessServerRegistryServiceServer) CreateKeyAccessServer

func (UnimplementedKeyAccessServerRegistryServiceServer) DeleteKeyAccessServer

func (UnimplementedKeyAccessServerRegistryServiceServer) GetKeyAccessServer

func (UnimplementedKeyAccessServerRegistryServiceServer) ListKeyAccessServers

func (UnimplementedKeyAccessServerRegistryServiceServer) UpdateKeyAccessServer

type UnsafeKeyAccessServerRegistryServiceServer

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

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

type UpdateKeyAccessServerRequest

type UpdateKeyAccessServerRequest struct {

	// Required
	Id        string     `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Uri       string     `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"`
	PublicKey *PublicKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// Common metadata
	Metadata               *common.MetadataMutable   `protobuf:"bytes,100,opt,name=metadata,proto3" json:"metadata,omitempty"`
	MetadataUpdateBehavior common.MetadataUpdateEnum `` /* 163-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*UpdateKeyAccessServerRequest) Descriptor deprecated

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

Deprecated: Use UpdateKeyAccessServerRequest.ProtoReflect.Descriptor instead.

func (*UpdateKeyAccessServerRequest) GetId

func (*UpdateKeyAccessServerRequest) GetMetadata

func (*UpdateKeyAccessServerRequest) GetMetadataUpdateBehavior

func (x *UpdateKeyAccessServerRequest) GetMetadataUpdateBehavior() common.MetadataUpdateEnum

func (*UpdateKeyAccessServerRequest) GetPublicKey

func (x *UpdateKeyAccessServerRequest) GetPublicKey() *PublicKey

func (*UpdateKeyAccessServerRequest) GetUri

func (*UpdateKeyAccessServerRequest) ProtoMessage

func (*UpdateKeyAccessServerRequest) ProtoMessage()

func (*UpdateKeyAccessServerRequest) ProtoReflect

func (*UpdateKeyAccessServerRequest) Reset

func (x *UpdateKeyAccessServerRequest) Reset()

func (*UpdateKeyAccessServerRequest) String

type UpdateKeyAccessServerResponse

type UpdateKeyAccessServerResponse struct {
	KeyAccessServer *KeyAccessServer `protobuf:"bytes,1,opt,name=key_access_server,json=keyAccessServer,proto3" json:"key_access_server,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateKeyAccessServerResponse) Descriptor deprecated

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

Deprecated: Use UpdateKeyAccessServerResponse.ProtoReflect.Descriptor instead.

func (*UpdateKeyAccessServerResponse) GetKeyAccessServer

func (x *UpdateKeyAccessServerResponse) GetKeyAccessServer() *KeyAccessServer

func (*UpdateKeyAccessServerResponse) ProtoMessage

func (*UpdateKeyAccessServerResponse) ProtoMessage()

func (*UpdateKeyAccessServerResponse) ProtoReflect

func (*UpdateKeyAccessServerResponse) Reset

func (x *UpdateKeyAccessServerResponse) Reset()

func (*UpdateKeyAccessServerResponse) String

Jump to

Keyboard shortcuts

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