Documentation ¶
Overview ¶
Package provider is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterProviderHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterProviderHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProviderClient) error
- func RegisterProviderHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterProviderHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProviderServer) error
- func RegisterProviderServer(s grpc.ServiceRegistrar, srv ProviderServer)
- type GetProviderRequest
- func (*GetProviderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetProviderRequest) GetId() string
- func (x *GetProviderRequest) GetKind() v1.ProviderKind
- func (*GetProviderRequest) ProtoMessage()
- func (x *GetProviderRequest) ProtoReflect() protoreflect.Message
- func (x *GetProviderRequest) Reset()
- func (x *GetProviderRequest) String() string
- type GetProviderResponse
- func (*GetProviderResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetProviderResponse) GetResults() []*v1.Provider
- func (*GetProviderResponse) ProtoMessage()
- func (x *GetProviderResponse) ProtoReflect() protoreflect.Message
- func (x *GetProviderResponse) Reset()
- func (x *GetProviderResponse) String() string
- type ListProviderKindsRequest
- type ListProviderKindsResponse
- func (*ListProviderKindsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListProviderKindsResponse) GetResults() []string
- func (*ListProviderKindsResponse) ProtoMessage()
- func (x *ListProviderKindsResponse) ProtoReflect() protoreflect.Message
- func (x *ListProviderKindsResponse) Reset()
- func (x *ListProviderKindsResponse) String() string
- type ListProvidersRequest
- func (*ListProvidersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListProvidersRequest) GetKind() v1.ProviderKind
- func (*ListProvidersRequest) ProtoMessage()
- func (x *ListProvidersRequest) ProtoReflect() protoreflect.Message
- func (x *ListProvidersRequest) Reset()
- func (x *ListProvidersRequest) String() string
- type ListProvidersResponse
- func (*ListProvidersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListProvidersResponse) GetResults() []*v1.Provider
- func (*ListProvidersResponse) ProtoMessage()
- func (x *ListProvidersResponse) ProtoReflect() protoreflect.Message
- func (x *ListProvidersResponse) Reset()
- func (x *ListProvidersResponse) String() string
- type ProviderClient
- type ProviderServer
- type UnimplementedProviderServer
- func (UnimplementedProviderServer) GetProvider(context.Context, *GetProviderRequest) (*GetProviderResponse, error)
- func (UnimplementedProviderServer) ListProviderKinds(context.Context, *ListProviderKindsRequest) (*ListProviderKindsResponse, error)
- func (UnimplementedProviderServer) ListProviders(context.Context, *ListProvidersRequest) (*ListProvidersResponse, error)
- type UnsafeProviderServer
Constants ¶
This section is empty.
Variables ¶
var File_aserto_tenant_provider_v1_provider_proto protoreflect.FileDescriptor
var Provider_ServiceDesc = grpc.ServiceDesc{ ServiceName: "aserto.tenant.provider.v1.Provider", HandlerType: (*ProviderServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListProviders", Handler: _Provider_ListProviders_Handler, }, { MethodName: "GetProvider", Handler: _Provider_GetProvider_Handler, }, { MethodName: "ListProviderKinds", Handler: _Provider_ListProviderKinds_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "aserto/tenant/provider/v1/provider.proto", }
Provider_ServiceDesc is the grpc.ServiceDesc for Provider service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterProviderHandler ¶
func RegisterProviderHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterProviderHandler registers the http handlers for service Provider to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterProviderHandlerClient ¶
func RegisterProviderHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProviderClient) error
RegisterProviderHandlerClient registers the http handlers for service Provider to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ProviderClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ProviderClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ProviderClient" to call the correct interceptors.
func RegisterProviderHandlerFromEndpoint ¶
func RegisterProviderHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterProviderHandlerFromEndpoint is same as RegisterProviderHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterProviderHandlerServer ¶
func RegisterProviderHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProviderServer) error
RegisterProviderHandlerServer registers the http handlers for service Provider to "mux". UnaryRPC :call ProviderServer 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 RegisterProviderHandlerFromEndpoint instead.
func RegisterProviderServer ¶
func RegisterProviderServer(s grpc.ServiceRegistrar, srv ProviderServer)
Types ¶
type GetProviderRequest ¶
type GetProviderRequest struct { Kind v1.ProviderKind `protobuf:"varint,1,opt,name=kind,proto3,enum=aserto.api.v1.ProviderKind" json:"kind,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetProviderRequest) Descriptor
deprecated
func (*GetProviderRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetProviderRequest.ProtoReflect.Descriptor instead.
func (*GetProviderRequest) GetId ¶
func (x *GetProviderRequest) GetId() string
func (*GetProviderRequest) GetKind ¶
func (x *GetProviderRequest) GetKind() v1.ProviderKind
func (*GetProviderRequest) ProtoMessage ¶
func (*GetProviderRequest) ProtoMessage()
func (*GetProviderRequest) ProtoReflect ¶
func (x *GetProviderRequest) ProtoReflect() protoreflect.Message
func (*GetProviderRequest) Reset ¶
func (x *GetProviderRequest) Reset()
func (*GetProviderRequest) String ¶
func (x *GetProviderRequest) String() string
type GetProviderResponse ¶
type GetProviderResponse struct { Results []*v1.Provider `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // contains filtered or unexported fields }
func (*GetProviderResponse) Descriptor
deprecated
func (*GetProviderResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetProviderResponse.ProtoReflect.Descriptor instead.
func (*GetProviderResponse) GetResults ¶
func (x *GetProviderResponse) GetResults() []*v1.Provider
func (*GetProviderResponse) ProtoMessage ¶
func (*GetProviderResponse) ProtoMessage()
func (*GetProviderResponse) ProtoReflect ¶
func (x *GetProviderResponse) ProtoReflect() protoreflect.Message
func (*GetProviderResponse) Reset ¶
func (x *GetProviderResponse) Reset()
func (*GetProviderResponse) String ¶
func (x *GetProviderResponse) String() string
type ListProviderKindsRequest ¶
type ListProviderKindsRequest struct {
// contains filtered or unexported fields
}
func (*ListProviderKindsRequest) Descriptor
deprecated
func (*ListProviderKindsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListProviderKindsRequest.ProtoReflect.Descriptor instead.
func (*ListProviderKindsRequest) ProtoMessage ¶
func (*ListProviderKindsRequest) ProtoMessage()
func (*ListProviderKindsRequest) ProtoReflect ¶
func (x *ListProviderKindsRequest) ProtoReflect() protoreflect.Message
func (*ListProviderKindsRequest) Reset ¶
func (x *ListProviderKindsRequest) Reset()
func (*ListProviderKindsRequest) String ¶
func (x *ListProviderKindsRequest) String() string
type ListProviderKindsResponse ¶
type ListProviderKindsResponse struct { Results []string `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // contains filtered or unexported fields }
func (*ListProviderKindsResponse) Descriptor
deprecated
func (*ListProviderKindsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListProviderKindsResponse.ProtoReflect.Descriptor instead.
func (*ListProviderKindsResponse) GetResults ¶
func (x *ListProviderKindsResponse) GetResults() []string
func (*ListProviderKindsResponse) ProtoMessage ¶
func (*ListProviderKindsResponse) ProtoMessage()
func (*ListProviderKindsResponse) ProtoReflect ¶
func (x *ListProviderKindsResponse) ProtoReflect() protoreflect.Message
func (*ListProviderKindsResponse) Reset ¶
func (x *ListProviderKindsResponse) Reset()
func (*ListProviderKindsResponse) String ¶
func (x *ListProviderKindsResponse) String() string
type ListProvidersRequest ¶
type ListProvidersRequest struct { Kind v1.ProviderKind `protobuf:"varint,1,opt,name=kind,proto3,enum=aserto.api.v1.ProviderKind" json:"kind,omitempty"` // contains filtered or unexported fields }
func (*ListProvidersRequest) Descriptor
deprecated
func (*ListProvidersRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListProvidersRequest.ProtoReflect.Descriptor instead.
func (*ListProvidersRequest) GetKind ¶
func (x *ListProvidersRequest) GetKind() v1.ProviderKind
func (*ListProvidersRequest) ProtoMessage ¶
func (*ListProvidersRequest) ProtoMessage()
func (*ListProvidersRequest) ProtoReflect ¶
func (x *ListProvidersRequest) ProtoReflect() protoreflect.Message
func (*ListProvidersRequest) Reset ¶
func (x *ListProvidersRequest) Reset()
func (*ListProvidersRequest) String ¶
func (x *ListProvidersRequest) String() string
type ListProvidersResponse ¶
type ListProvidersResponse struct { Results []*v1.Provider `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // contains filtered or unexported fields }
func (*ListProvidersResponse) Descriptor
deprecated
func (*ListProvidersResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListProvidersResponse.ProtoReflect.Descriptor instead.
func (*ListProvidersResponse) GetResults ¶
func (x *ListProvidersResponse) GetResults() []*v1.Provider
func (*ListProvidersResponse) ProtoMessage ¶
func (*ListProvidersResponse) ProtoMessage()
func (*ListProvidersResponse) ProtoReflect ¶
func (x *ListProvidersResponse) ProtoReflect() protoreflect.Message
func (*ListProvidersResponse) Reset ¶
func (x *ListProvidersResponse) Reset()
func (*ListProvidersResponse) String ¶
func (x *ListProvidersResponse) String() string
type ProviderClient ¶
type ProviderClient interface { ListProviders(ctx context.Context, in *ListProvidersRequest, opts ...grpc.CallOption) (*ListProvidersResponse, error) GetProvider(ctx context.Context, in *GetProviderRequest, opts ...grpc.CallOption) (*GetProviderResponse, error) ListProviderKinds(ctx context.Context, in *ListProviderKindsRequest, opts ...grpc.CallOption) (*ListProviderKindsResponse, error) }
ProviderClient is the client API for Provider 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 NewProviderClient ¶
func NewProviderClient(cc grpc.ClientConnInterface) ProviderClient
type ProviderServer ¶
type ProviderServer interface { ListProviders(context.Context, *ListProvidersRequest) (*ListProvidersResponse, error) GetProvider(context.Context, *GetProviderRequest) (*GetProviderResponse, error) ListProviderKinds(context.Context, *ListProviderKindsRequest) (*ListProviderKindsResponse, error) }
ProviderServer is the server API for Provider service. All implementations should embed UnimplementedProviderServer for forward compatibility
type UnimplementedProviderServer ¶
type UnimplementedProviderServer struct { }
UnimplementedProviderServer should be embedded to have forward compatible implementations.
func (UnimplementedProviderServer) GetProvider ¶
func (UnimplementedProviderServer) GetProvider(context.Context, *GetProviderRequest) (*GetProviderResponse, error)
func (UnimplementedProviderServer) ListProviderKinds ¶
func (UnimplementedProviderServer) ListProviderKinds(context.Context, *ListProviderKindsRequest) (*ListProviderKindsResponse, error)
func (UnimplementedProviderServer) ListProviders ¶
func (UnimplementedProviderServer) ListProviders(context.Context, *ListProvidersRequest) (*ListProvidersResponse, error)
type UnsafeProviderServer ¶
type UnsafeProviderServer interface {
// contains filtered or unexported methods
}
UnsafeProviderServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProviderServer will result in compilation errors.