namespaces

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: BSD-3-Clause-Clear Imports: 19 Imported by: 4

Documentation

Overview

Package namespaces is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	NamespaceService_GetNamespace_FullMethodName        = "/policy.namespaces.NamespaceService/GetNamespace"
	NamespaceService_ListNamespaces_FullMethodName      = "/policy.namespaces.NamespaceService/ListNamespaces"
	NamespaceService_CreateNamespace_FullMethodName     = "/policy.namespaces.NamespaceService/CreateNamespace"
	NamespaceService_UpdateNamespace_FullMethodName     = "/policy.namespaces.NamespaceService/UpdateNamespace"
	NamespaceService_DeactivateNamespace_FullMethodName = "/policy.namespaces.NamespaceService/DeactivateNamespace"
)

Variables

View Source
var File_policy_namespaces_namespaces_proto protoreflect.FileDescriptor
View Source
var NamespaceService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "policy.namespaces.NamespaceService",
	HandlerType: (*NamespaceServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetNamespace",
			Handler:    _NamespaceService_GetNamespace_Handler,
		},
		{
			MethodName: "ListNamespaces",
			Handler:    _NamespaceService_ListNamespaces_Handler,
		},
		{
			MethodName: "CreateNamespace",
			Handler:    _NamespaceService_CreateNamespace_Handler,
		},
		{
			MethodName: "UpdateNamespace",
			Handler:    _NamespaceService_UpdateNamespace_Handler,
		},
		{
			MethodName: "DeactivateNamespace",
			Handler:    _NamespaceService_DeactivateNamespace_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "policy/namespaces/namespaces.proto",
}

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

Functions

func RegisterNamespaceServiceHandler

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

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

func RegisterNamespaceServiceHandlerClient

func RegisterNamespaceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NamespaceServiceClient) error

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

func RegisterNamespaceServiceHandlerFromEndpoint

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

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

func RegisterNamespaceServiceHandlerServer

func RegisterNamespaceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NamespaceServiceServer) error

RegisterNamespaceServiceHandlerServer registers the http handlers for service NamespaceService to "mux". UnaryRPC :call NamespaceServiceServer 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 RegisterNamespaceServiceHandlerFromEndpoint instead.

func RegisterNamespaceServiceServer

func RegisterNamespaceServiceServer(s grpc.ServiceRegistrar, srv NamespaceServiceServer)

Types

type CreateNamespaceRequest

type CreateNamespaceRequest struct {

	// Required
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Optional
	Metadata *common.MetadataMutable `protobuf:"bytes,100,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateNamespaceRequest) Descriptor deprecated

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

Deprecated: Use CreateNamespaceRequest.ProtoReflect.Descriptor instead.

func (*CreateNamespaceRequest) GetMetadata

func (x *CreateNamespaceRequest) GetMetadata() *common.MetadataMutable

func (*CreateNamespaceRequest) GetName

func (x *CreateNamespaceRequest) GetName() string

func (*CreateNamespaceRequest) ProtoMessage

func (*CreateNamespaceRequest) ProtoMessage()

func (*CreateNamespaceRequest) ProtoReflect

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

func (*CreateNamespaceRequest) Reset

func (x *CreateNamespaceRequest) Reset()

func (*CreateNamespaceRequest) String

func (x *CreateNamespaceRequest) String() string

type CreateNamespaceResponse

type CreateNamespaceResponse struct {
	Namespace *policy.Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateNamespaceResponse) Descriptor deprecated

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

Deprecated: Use CreateNamespaceResponse.ProtoReflect.Descriptor instead.

func (*CreateNamespaceResponse) GetNamespace

func (x *CreateNamespaceResponse) GetNamespace() *policy.Namespace

func (*CreateNamespaceResponse) ProtoMessage

func (*CreateNamespaceResponse) ProtoMessage()

func (*CreateNamespaceResponse) ProtoReflect

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

func (*CreateNamespaceResponse) Reset

func (x *CreateNamespaceResponse) Reset()

func (*CreateNamespaceResponse) String

func (x *CreateNamespaceResponse) String() string

type DeactivateNamespaceRequest

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

func (*DeactivateNamespaceRequest) Descriptor deprecated

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

Deprecated: Use DeactivateNamespaceRequest.ProtoReflect.Descriptor instead.

func (*DeactivateNamespaceRequest) GetId

func (*DeactivateNamespaceRequest) ProtoMessage

func (*DeactivateNamespaceRequest) ProtoMessage()

func (*DeactivateNamespaceRequest) ProtoReflect

func (*DeactivateNamespaceRequest) Reset

func (x *DeactivateNamespaceRequest) Reset()

func (*DeactivateNamespaceRequest) String

func (x *DeactivateNamespaceRequest) String() string

type DeactivateNamespaceResponse

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

func (*DeactivateNamespaceResponse) Descriptor deprecated

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

Deprecated: Use DeactivateNamespaceResponse.ProtoReflect.Descriptor instead.

func (*DeactivateNamespaceResponse) ProtoMessage

func (*DeactivateNamespaceResponse) ProtoMessage()

func (*DeactivateNamespaceResponse) ProtoReflect

func (*DeactivateNamespaceResponse) Reset

func (x *DeactivateNamespaceResponse) Reset()

func (*DeactivateNamespaceResponse) String

func (x *DeactivateNamespaceResponse) String() string

type GetNamespaceRequest

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

func (*GetNamespaceRequest) Descriptor deprecated

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

Deprecated: Use GetNamespaceRequest.ProtoReflect.Descriptor instead.

func (*GetNamespaceRequest) GetId

func (x *GetNamespaceRequest) GetId() string

func (*GetNamespaceRequest) ProtoMessage

func (*GetNamespaceRequest) ProtoMessage()

func (*GetNamespaceRequest) ProtoReflect

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

func (*GetNamespaceRequest) Reset

func (x *GetNamespaceRequest) Reset()

func (*GetNamespaceRequest) String

func (x *GetNamespaceRequest) String() string

type GetNamespaceResponse

type GetNamespaceResponse struct {
	Namespace *policy.Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

func (*GetNamespaceResponse) Descriptor deprecated

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

Deprecated: Use GetNamespaceResponse.ProtoReflect.Descriptor instead.

func (*GetNamespaceResponse) GetNamespace

func (x *GetNamespaceResponse) GetNamespace() *policy.Namespace

func (*GetNamespaceResponse) ProtoMessage

func (*GetNamespaceResponse) ProtoMessage()

func (*GetNamespaceResponse) ProtoReflect

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

func (*GetNamespaceResponse) Reset

func (x *GetNamespaceResponse) Reset()

func (*GetNamespaceResponse) String

func (x *GetNamespaceResponse) String() string

type ListNamespacesRequest

type ListNamespacesRequest struct {

	// ACTIVE by default when not specified
	State common.ActiveStateEnum `protobuf:"varint,1,opt,name=state,proto3,enum=common.ActiveStateEnum" json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*ListNamespacesRequest) Descriptor deprecated

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

Deprecated: Use ListNamespacesRequest.ProtoReflect.Descriptor instead.

func (*ListNamespacesRequest) GetState

func (*ListNamespacesRequest) ProtoMessage

func (*ListNamespacesRequest) ProtoMessage()

func (*ListNamespacesRequest) ProtoReflect

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

func (*ListNamespacesRequest) Reset

func (x *ListNamespacesRequest) Reset()

func (*ListNamespacesRequest) String

func (x *ListNamespacesRequest) String() string

type ListNamespacesResponse

type ListNamespacesResponse struct {
	Namespaces []*policy.Namespace `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces,omitempty"`
	// contains filtered or unexported fields
}

func (*ListNamespacesResponse) Descriptor deprecated

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

Deprecated: Use ListNamespacesResponse.ProtoReflect.Descriptor instead.

func (*ListNamespacesResponse) GetNamespaces

func (x *ListNamespacesResponse) GetNamespaces() []*policy.Namespace

func (*ListNamespacesResponse) ProtoMessage

func (*ListNamespacesResponse) ProtoMessage()

func (*ListNamespacesResponse) ProtoReflect

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

func (*ListNamespacesResponse) Reset

func (x *ListNamespacesResponse) Reset()

func (*ListNamespacesResponse) String

func (x *ListNamespacesResponse) String() string

type NamespaceServiceClient

type NamespaceServiceClient interface {
	GetNamespace(ctx context.Context, in *GetNamespaceRequest, opts ...grpc.CallOption) (*GetNamespaceResponse, error)
	ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error)
	CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*CreateNamespaceResponse, error)
	UpdateNamespace(ctx context.Context, in *UpdateNamespaceRequest, opts ...grpc.CallOption) (*UpdateNamespaceResponse, error)
	DeactivateNamespace(ctx context.Context, in *DeactivateNamespaceRequest, opts ...grpc.CallOption) (*DeactivateNamespaceResponse, error)
}

NamespaceServiceClient is the client API for NamespaceService 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 NamespaceServiceServer

type NamespaceServiceServer interface {
	GetNamespace(context.Context, *GetNamespaceRequest) (*GetNamespaceResponse, error)
	ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error)
	CreateNamespace(context.Context, *CreateNamespaceRequest) (*CreateNamespaceResponse, error)
	UpdateNamespace(context.Context, *UpdateNamespaceRequest) (*UpdateNamespaceResponse, error)
	DeactivateNamespace(context.Context, *DeactivateNamespaceRequest) (*DeactivateNamespaceResponse, error)
	// contains filtered or unexported methods
}

NamespaceServiceServer is the server API for NamespaceService service. All implementations must embed UnimplementedNamespaceServiceServer for forward compatibility

type UnimplementedNamespaceServiceServer

type UnimplementedNamespaceServiceServer struct {
}

UnimplementedNamespaceServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedNamespaceServiceServer) CreateNamespace

func (UnimplementedNamespaceServiceServer) DeactivateNamespace

func (UnimplementedNamespaceServiceServer) GetNamespace

func (UnimplementedNamespaceServiceServer) ListNamespaces

func (UnimplementedNamespaceServiceServer) UpdateNamespace

type UnsafeNamespaceServiceServer

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

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

type UpdateNamespaceRequest

type UpdateNamespaceRequest struct {

	// Required
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Optional
	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 (*UpdateNamespaceRequest) Descriptor deprecated

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

Deprecated: Use UpdateNamespaceRequest.ProtoReflect.Descriptor instead.

func (*UpdateNamespaceRequest) GetId

func (x *UpdateNamespaceRequest) GetId() string

func (*UpdateNamespaceRequest) GetMetadata

func (x *UpdateNamespaceRequest) GetMetadata() *common.MetadataMutable

func (*UpdateNamespaceRequest) GetMetadataUpdateBehavior

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

func (*UpdateNamespaceRequest) ProtoMessage

func (*UpdateNamespaceRequest) ProtoMessage()

func (*UpdateNamespaceRequest) ProtoReflect

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

func (*UpdateNamespaceRequest) Reset

func (x *UpdateNamespaceRequest) Reset()

func (*UpdateNamespaceRequest) String

func (x *UpdateNamespaceRequest) String() string

type UpdateNamespaceResponse

type UpdateNamespaceResponse struct {
	Namespace *policy.Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateNamespaceResponse) Descriptor deprecated

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

Deprecated: Use UpdateNamespaceResponse.ProtoReflect.Descriptor instead.

func (*UpdateNamespaceResponse) GetNamespace

func (x *UpdateNamespaceResponse) GetNamespace() *policy.Namespace

func (*UpdateNamespaceResponse) ProtoMessage

func (*UpdateNamespaceResponse) ProtoMessage()

func (*UpdateNamespaceResponse) ProtoReflect

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

func (*UpdateNamespaceResponse) Reset

func (x *UpdateNamespaceResponse) Reset()

func (*UpdateNamespaceResponse) String

func (x *UpdateNamespaceResponse) String() string

Jump to

Keyboard shortcuts

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