registry

package
v0.0.40 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: Apache-2.0 Imports: 18 Imported by: 2

Documentation

Overview

Package registry is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_aserto_tenant_registry_v1_registry_proto protoreflect.FileDescriptor
View Source
var Registry_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "aserto.tenant.registry.v1.Registry",
	HandlerType: (*RegistryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListOrgs",
			Handler:    _Registry_ListOrgs_Handler,
		},
		{
			MethodName: "ListPolicyRepos",
			Handler:    _Registry_ListPolicyRepos_Handler,
		},
		{
			MethodName: "DeletePolicyRepo",
			Handler:    _Registry_DeletePolicyRepo_Handler,
		},
		{
			MethodName: "ListTags",
			Handler:    _Registry_ListTags_Handler,
		},
		{
			MethodName: "CreatePolicyRepo",
			Handler:    _Registry_CreatePolicyRepo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "aserto/tenant/registry/v1/registry.proto",
}

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

Functions

func RegisterRegistryHandler

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

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

func RegisterRegistryHandlerClient

func RegisterRegistryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RegistryClient) error

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

func RegisterRegistryHandlerFromEndpoint

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

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

func RegisterRegistryHandlerServer

func RegisterRegistryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RegistryServer) error

RegisterRegistryHandlerServer registers the http handlers for service Registry to "mux". UnaryRPC :call RegistryServer 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 RegisterRegistryHandlerFromEndpoint instead.

func RegisterRegistryServer

func RegisterRegistryServer(s grpc.ServiceRegistrar, srv RegistryServer)

Types

type CreatePolicyRepoRequest added in v0.0.40

type CreatePolicyRepoRequest struct {
	ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	Repo         *Repo  `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"`
	// contains filtered or unexported fields
}

func (*CreatePolicyRepoRequest) Descriptor deprecated added in v0.0.40

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

Deprecated: Use CreatePolicyRepoRequest.ProtoReflect.Descriptor instead.

func (*CreatePolicyRepoRequest) GetConnectionId added in v0.0.40

func (x *CreatePolicyRepoRequest) GetConnectionId() string

func (*CreatePolicyRepoRequest) GetRepo added in v0.0.40

func (x *CreatePolicyRepoRequest) GetRepo() *Repo

func (*CreatePolicyRepoRequest) ProtoMessage added in v0.0.40

func (*CreatePolicyRepoRequest) ProtoMessage()

func (*CreatePolicyRepoRequest) ProtoReflect added in v0.0.40

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

func (*CreatePolicyRepoRequest) Reset added in v0.0.40

func (x *CreatePolicyRepoRequest) Reset()

func (*CreatePolicyRepoRequest) String added in v0.0.40

func (x *CreatePolicyRepoRequest) String() string

type CreatePolicyRepoResponse added in v0.0.40

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

func (*CreatePolicyRepoResponse) Descriptor deprecated added in v0.0.40

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

Deprecated: Use CreatePolicyRepoResponse.ProtoReflect.Descriptor instead.

func (*CreatePolicyRepoResponse) ProtoMessage added in v0.0.40

func (*CreatePolicyRepoResponse) ProtoMessage()

func (*CreatePolicyRepoResponse) ProtoReflect added in v0.0.40

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

func (*CreatePolicyRepoResponse) Reset added in v0.0.40

func (x *CreatePolicyRepoResponse) Reset()

func (*CreatePolicyRepoResponse) String added in v0.0.40

func (x *CreatePolicyRepoResponse) String() string

type DeletePolicyRepoRequest added in v0.0.40

type DeletePolicyRepoRequest struct {
	ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	Repo         *Repo  `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"`
	Tag          string `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"`
	// contains filtered or unexported fields
}

func (*DeletePolicyRepoRequest) Descriptor deprecated added in v0.0.40

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

Deprecated: Use DeletePolicyRepoRequest.ProtoReflect.Descriptor instead.

func (*DeletePolicyRepoRequest) GetConnectionId added in v0.0.40

func (x *DeletePolicyRepoRequest) GetConnectionId() string

func (*DeletePolicyRepoRequest) GetRepo added in v0.0.40

func (x *DeletePolicyRepoRequest) GetRepo() *Repo

func (*DeletePolicyRepoRequest) GetTag added in v0.0.40

func (x *DeletePolicyRepoRequest) GetTag() string

func (*DeletePolicyRepoRequest) ProtoMessage added in v0.0.40

func (*DeletePolicyRepoRequest) ProtoMessage()

func (*DeletePolicyRepoRequest) ProtoReflect added in v0.0.40

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

func (*DeletePolicyRepoRequest) Reset added in v0.0.40

func (x *DeletePolicyRepoRequest) Reset()

func (*DeletePolicyRepoRequest) String added in v0.0.40

func (x *DeletePolicyRepoRequest) String() string

type DeletePolicyRepoResponse added in v0.0.40

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

func (*DeletePolicyRepoResponse) Descriptor deprecated added in v0.0.40

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

Deprecated: Use DeletePolicyRepoResponse.ProtoReflect.Descriptor instead.

func (*DeletePolicyRepoResponse) ProtoMessage added in v0.0.40

func (*DeletePolicyRepoResponse) ProtoMessage()

func (*DeletePolicyRepoResponse) ProtoReflect added in v0.0.40

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

func (*DeletePolicyRepoResponse) Reset added in v0.0.40

func (x *DeletePolicyRepoResponse) Reset()

func (*DeletePolicyRepoResponse) String added in v0.0.40

func (x *DeletePolicyRepoResponse) String() string

type ListOrgsRequest

type ListOrgsRequest struct {
	ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ListOrgsRequest) Descriptor deprecated

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

Deprecated: Use ListOrgsRequest.ProtoReflect.Descriptor instead.

func (*ListOrgsRequest) GetConnectionId

func (x *ListOrgsRequest) GetConnectionId() string

func (*ListOrgsRequest) ProtoMessage

func (*ListOrgsRequest) ProtoMessage()

func (*ListOrgsRequest) ProtoReflect

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

func (*ListOrgsRequest) Reset

func (x *ListOrgsRequest) Reset()

func (*ListOrgsRequest) String

func (x *ListOrgsRequest) String() string

type ListOrgsResponse

type ListOrgsResponse struct {
	Orgs []string `protobuf:"bytes,1,rep,name=orgs,proto3" json:"orgs,omitempty"`
	// contains filtered or unexported fields
}

func (*ListOrgsResponse) Descriptor deprecated

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

Deprecated: Use ListOrgsResponse.ProtoReflect.Descriptor instead.

func (*ListOrgsResponse) GetOrgs added in v0.0.40

func (x *ListOrgsResponse) GetOrgs() []string

func (*ListOrgsResponse) ProtoMessage

func (*ListOrgsResponse) ProtoMessage()

func (*ListOrgsResponse) ProtoReflect

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

func (*ListOrgsResponse) Reset

func (x *ListOrgsResponse) Reset()

func (*ListOrgsResponse) String

func (x *ListOrgsResponse) String() string

type ListPolicyReposRequest added in v0.0.40

type ListPolicyReposRequest struct {
	ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	Org          string `protobuf:"bytes,2,opt,name=org,proto3" json:"org,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPolicyReposRequest) Descriptor deprecated added in v0.0.40

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

Deprecated: Use ListPolicyReposRequest.ProtoReflect.Descriptor instead.

func (*ListPolicyReposRequest) GetConnectionId added in v0.0.40

func (x *ListPolicyReposRequest) GetConnectionId() string

func (*ListPolicyReposRequest) GetOrg added in v0.0.40

func (x *ListPolicyReposRequest) GetOrg() string

func (*ListPolicyReposRequest) ProtoMessage added in v0.0.40

func (*ListPolicyReposRequest) ProtoMessage()

func (*ListPolicyReposRequest) ProtoReflect added in v0.0.40

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

func (*ListPolicyReposRequest) Reset added in v0.0.40

func (x *ListPolicyReposRequest) Reset()

func (*ListPolicyReposRequest) String added in v0.0.40

func (x *ListPolicyReposRequest) String() string

type ListPolicyReposResponse added in v0.0.40

type ListPolicyReposResponse struct {
	PolicyRepos []*Repo `protobuf:"bytes,1,rep,name=policy_repos,json=policyRepos,proto3" json:"policy_repos,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPolicyReposResponse) Descriptor deprecated added in v0.0.40

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

Deprecated: Use ListPolicyReposResponse.ProtoReflect.Descriptor instead.

func (*ListPolicyReposResponse) GetPolicyRepos added in v0.0.40

func (x *ListPolicyReposResponse) GetPolicyRepos() []*Repo

func (*ListPolicyReposResponse) ProtoMessage added in v0.0.40

func (*ListPolicyReposResponse) ProtoMessage()

func (*ListPolicyReposResponse) ProtoReflect added in v0.0.40

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

func (*ListPolicyReposResponse) Reset added in v0.0.40

func (x *ListPolicyReposResponse) Reset()

func (*ListPolicyReposResponse) String added in v0.0.40

func (x *ListPolicyReposResponse) String() string

type ListTagsRequest

type ListTagsRequest struct {
	ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	Repo         *Repo  `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"`
	// contains filtered or unexported fields
}

func (*ListTagsRequest) Descriptor deprecated

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

Deprecated: Use ListTagsRequest.ProtoReflect.Descriptor instead.

func (*ListTagsRequest) GetConnectionId

func (x *ListTagsRequest) GetConnectionId() string

func (*ListTagsRequest) GetRepo added in v0.0.40

func (x *ListTagsRequest) GetRepo() *Repo

func (*ListTagsRequest) ProtoMessage

func (*ListTagsRequest) ProtoMessage()

func (*ListTagsRequest) ProtoReflect

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

func (*ListTagsRequest) Reset

func (x *ListTagsRequest) Reset()

func (*ListTagsRequest) String

func (x *ListTagsRequest) String() string

type ListTagsResponse

type ListTagsResponse struct {
	Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

func (*ListTagsResponse) Descriptor deprecated

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

Deprecated: Use ListTagsResponse.ProtoReflect.Descriptor instead.

func (*ListTagsResponse) GetTags

func (x *ListTagsResponse) GetTags() []string

func (*ListTagsResponse) ProtoMessage

func (*ListTagsResponse) ProtoMessage()

func (*ListTagsResponse) ProtoReflect

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

func (*ListTagsResponse) Reset

func (x *ListTagsResponse) Reset()

func (*ListTagsResponse) String

func (x *ListTagsResponse) String() string

type RegistryClient

type RegistryClient interface {
	ListOrgs(ctx context.Context, in *ListOrgsRequest, opts ...grpc.CallOption) (*ListOrgsResponse, error)
	ListPolicyRepos(ctx context.Context, in *ListPolicyReposRequest, opts ...grpc.CallOption) (*ListPolicyReposResponse, error)
	DeletePolicyRepo(ctx context.Context, in *DeletePolicyRepoRequest, opts ...grpc.CallOption) (*DeletePolicyRepoResponse, error)
	ListTags(ctx context.Context, in *ListTagsRequest, opts ...grpc.CallOption) (*ListTagsResponse, error)
	CreatePolicyRepo(ctx context.Context, in *CreatePolicyRepoRequest, opts ...grpc.CallOption) (*CreatePolicyRepoResponse, error)
}

RegistryClient is the client API for Registry 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 NewRegistryClient

func NewRegistryClient(cc grpc.ClientConnInterface) RegistryClient

type RegistryServer

RegistryServer is the server API for Registry service. All implementations should embed UnimplementedRegistryServer for forward compatibility

type Repo added in v0.0.40

type Repo struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Org  string `protobuf:"bytes,2,opt,name=org,proto3" json:"org,omitempty"`
	// contains filtered or unexported fields
}

func (*Repo) Descriptor deprecated added in v0.0.40

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

Deprecated: Use Repo.ProtoReflect.Descriptor instead.

func (*Repo) GetName added in v0.0.40

func (x *Repo) GetName() string

func (*Repo) GetOrg added in v0.0.40

func (x *Repo) GetOrg() string

func (*Repo) ProtoMessage added in v0.0.40

func (*Repo) ProtoMessage()

func (*Repo) ProtoReflect added in v0.0.40

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

func (*Repo) Reset added in v0.0.40

func (x *Repo) Reset()

func (*Repo) String added in v0.0.40

func (x *Repo) String() string

type UnimplementedRegistryServer

type UnimplementedRegistryServer struct {
}

UnimplementedRegistryServer should be embedded to have forward compatible implementations.

func (UnimplementedRegistryServer) CreatePolicyRepo added in v0.0.40

func (UnimplementedRegistryServer) DeletePolicyRepo added in v0.0.40

func (UnimplementedRegistryServer) ListOrgs

func (UnimplementedRegistryServer) ListPolicyRepos added in v0.0.40

func (UnimplementedRegistryServer) ListTags

type UnsafeRegistryServer

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

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

Jump to

Keyboard shortcuts

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