Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterGatewayDAdminAPIServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterGatewayDAdminAPIServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ...) error
- func RegisterGatewayDAdminAPIServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterGatewayDAdminAPIServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, ...) error
- func RegisterGatewayDAdminAPIServiceServer(s grpc.ServiceRegistrar, srv GatewayDAdminAPIServiceServer)
- type GatewayDAdminAPIServiceClient
- type GatewayDAdminAPIServiceServer
- type Group
- type PluginConfig
- func (*PluginConfig) Descriptor() ([]byte, []int)deprecated
- func (x *PluginConfig) GetAuthors() []string
- func (x *PluginConfig) GetCategories() []string
- func (x *PluginConfig) GetConfig() map[string]string
- func (x *PluginConfig) GetDescription() string
- func (x *PluginConfig) GetHooks() []int32
- func (x *PluginConfig) GetId() *PluginID
- func (x *PluginConfig) GetLicense() string
- func (x *PluginConfig) GetProjectUrl() string
- func (x *PluginConfig) GetRequires() map[string]string
- func (x *PluginConfig) GetTags() []string
- func (*PluginConfig) ProtoMessage()
- func (x *PluginConfig) ProtoReflect() protoreflect.Message
- func (x *PluginConfig) Reset()
- func (x *PluginConfig) String() string
- type PluginConfigs
- type PluginID
- func (*PluginID) Descriptor() ([]byte, []int)deprecated
- func (x *PluginID) GetChecksum() string
- func (x *PluginID) GetName() string
- func (x *PluginID) GetRemoteUrl() string
- func (x *PluginID) GetVersion() string
- func (*PluginID) ProtoMessage()
- func (x *PluginID) ProtoReflect() protoreflect.Message
- func (x *PluginID) Reset()
- func (x *PluginID) String() string
- type UnimplementedGatewayDAdminAPIServiceServer
- func (UnimplementedGatewayDAdminAPIServiceServer) GetGlobalConfig(context.Context, *Group) (*structpb.Struct, error)
- func (UnimplementedGatewayDAdminAPIServiceServer) GetPluginConfig(context.Context, *emptypb.Empty) (*structpb.Struct, error)
- func (UnimplementedGatewayDAdminAPIServiceServer) GetPlugins(context.Context, *emptypb.Empty) (*PluginConfigs, error)
- func (UnimplementedGatewayDAdminAPIServiceServer) GetPools(context.Context, *emptypb.Empty) (*structpb.Struct, error)
- func (UnimplementedGatewayDAdminAPIServiceServer) GetProxies(context.Context, *emptypb.Empty) (*structpb.Struct, error)
- func (UnimplementedGatewayDAdminAPIServiceServer) GetServers(context.Context, *emptypb.Empty) (*structpb.Struct, error)
- func (UnimplementedGatewayDAdminAPIServiceServer) Version(context.Context, *emptypb.Empty) (*VersionResponse, error)
- type UnsafeGatewayDAdminAPIServiceServer
- type VersionResponse
- func (*VersionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VersionResponse) GetVersion() string
- func (x *VersionResponse) GetVersionInfo() string
- func (*VersionResponse) ProtoMessage()
- func (x *VersionResponse) ProtoReflect() protoreflect.Message
- func (x *VersionResponse) Reset()
- func (x *VersionResponse) String() string
Constants ¶
const ( GatewayDAdminAPIService_Version_FullMethodName = "/api.v1.GatewayDAdminAPIService/Version" GatewayDAdminAPIService_GetGlobalConfig_FullMethodName = "/api.v1.GatewayDAdminAPIService/GetGlobalConfig" GatewayDAdminAPIService_GetPluginConfig_FullMethodName = "/api.v1.GatewayDAdminAPIService/GetPluginConfig" GatewayDAdminAPIService_GetPlugins_FullMethodName = "/api.v1.GatewayDAdminAPIService/GetPlugins" GatewayDAdminAPIService_GetPools_FullMethodName = "/api.v1.GatewayDAdminAPIService/GetPools" GatewayDAdminAPIService_GetProxies_FullMethodName = "/api.v1.GatewayDAdminAPIService/GetProxies" GatewayDAdminAPIService_GetServers_FullMethodName = "/api.v1.GatewayDAdminAPIService/GetServers" )
Variables ¶
var File_api_v1_api_proto protoreflect.FileDescriptor
var GatewayDAdminAPIService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.v1.GatewayDAdminAPIService", HandlerType: (*GatewayDAdminAPIServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Version", Handler: _GatewayDAdminAPIService_Version_Handler, }, { MethodName: "GetGlobalConfig", Handler: _GatewayDAdminAPIService_GetGlobalConfig_Handler, }, { MethodName: "GetPluginConfig", Handler: _GatewayDAdminAPIService_GetPluginConfig_Handler, }, { MethodName: "GetPlugins", Handler: _GatewayDAdminAPIService_GetPlugins_Handler, }, { MethodName: "GetPools", Handler: _GatewayDAdminAPIService_GetPools_Handler, }, { MethodName: "GetProxies", Handler: _GatewayDAdminAPIService_GetProxies_Handler, }, { MethodName: "GetServers", Handler: _GatewayDAdminAPIService_GetServers_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/api.proto", }
GatewayDAdminAPIService_ServiceDesc is the grpc.ServiceDesc for GatewayDAdminAPIService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGatewayDAdminAPIServiceHandler ¶
func RegisterGatewayDAdminAPIServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterGatewayDAdminAPIServiceHandler registers the http handlers for service GatewayDAdminAPIService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterGatewayDAdminAPIServiceHandlerClient ¶
func RegisterGatewayDAdminAPIServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GatewayDAdminAPIServiceClient) error
RegisterGatewayDAdminAPIServiceHandlerClient registers the http handlers for service GatewayDAdminAPIService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GatewayDAdminAPIServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GatewayDAdminAPIServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "GatewayDAdminAPIServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterGatewayDAdminAPIServiceHandlerFromEndpoint ¶
func RegisterGatewayDAdminAPIServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterGatewayDAdminAPIServiceHandlerFromEndpoint is same as RegisterGatewayDAdminAPIServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterGatewayDAdminAPIServiceHandlerServer ¶
func RegisterGatewayDAdminAPIServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GatewayDAdminAPIServiceServer) error
RegisterGatewayDAdminAPIServiceHandlerServer registers the http handlers for service GatewayDAdminAPIService to "mux". UnaryRPC :call GatewayDAdminAPIServiceServer 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 RegisterGatewayDAdminAPIServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterGatewayDAdminAPIServiceServer ¶
func RegisterGatewayDAdminAPIServiceServer(s grpc.ServiceRegistrar, srv GatewayDAdminAPIServiceServer)
Types ¶
type GatewayDAdminAPIServiceClient ¶
type GatewayDAdminAPIServiceClient interface { // Version returns the version of the GatewayD. Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionResponse, error) // GetGlobalConfig returns the global configuration of the GatewayD. GetGlobalConfig(ctx context.Context, in *Group, opts ...grpc.CallOption) (*structpb.Struct, error) // GetPluginConfig returns the configuration of the specified plugin. GetPluginConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*structpb.Struct, error) // GetPlugins returns the list of plugins installed on the GatewayD. GetPlugins(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PluginConfigs, error) // GetPools returns the list of pools configured on the GatewayD. GetPools(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*structpb.Struct, error) // GetProxies returns the list of proxies configured on the GatewayD. GetProxies(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*structpb.Struct, error) // GetServers returns the list of servers configured on the GatewayD. GetServers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*structpb.Struct, error) }
GatewayDAdminAPIServiceClient is the client API for GatewayDAdminAPIService 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.
GatewayDAdminAPIService is the administration API of GatewayD.
func NewGatewayDAdminAPIServiceClient ¶
func NewGatewayDAdminAPIServiceClient(cc grpc.ClientConnInterface) GatewayDAdminAPIServiceClient
type GatewayDAdminAPIServiceServer ¶
type GatewayDAdminAPIServiceServer interface { // Version returns the version of the GatewayD. Version(context.Context, *emptypb.Empty) (*VersionResponse, error) // GetGlobalConfig returns the global configuration of the GatewayD. GetGlobalConfig(context.Context, *Group) (*structpb.Struct, error) // GetPluginConfig returns the configuration of the specified plugin. GetPluginConfig(context.Context, *emptypb.Empty) (*structpb.Struct, error) // GetPlugins returns the list of plugins installed on the GatewayD. GetPlugins(context.Context, *emptypb.Empty) (*PluginConfigs, error) // GetPools returns the list of pools configured on the GatewayD. GetPools(context.Context, *emptypb.Empty) (*structpb.Struct, error) // GetProxies returns the list of proxies configured on the GatewayD. GetProxies(context.Context, *emptypb.Empty) (*structpb.Struct, error) // GetServers returns the list of servers configured on the GatewayD. GetServers(context.Context, *emptypb.Empty) (*structpb.Struct, error) // contains filtered or unexported methods }
GatewayDAdminAPIServiceServer is the server API for GatewayDAdminAPIService service. All implementations must embed UnimplementedGatewayDAdminAPIServiceServer for forward compatibility.
GatewayDAdminAPIService is the administration API of GatewayD.
type Group ¶ added in v0.8.6
type Group struct { // GroupName is the name of the group. GroupName *string `protobuf:"bytes,1,opt,name=group_name,json=groupName,proto3,oneof" json:"group_name,omitempty"` // contains filtered or unexported fields }
Group is the object group to filter the global config by.
func (*Group) Descriptor
deprecated
added in
v0.8.6
func (*Group) GetGroupName ¶ added in v0.8.6
func (*Group) ProtoMessage ¶ added in v0.8.6
func (*Group) ProtoMessage()
func (*Group) ProtoReflect ¶ added in v0.8.6
func (x *Group) ProtoReflect() protoreflect.Message
type PluginConfig ¶
type PluginConfig struct { // ID is the identifier that uniquely identifies the plugin. Id *PluginID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Description is the description of the plugin. Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // Authors is the list of authors of the plugin. Authors []string `protobuf:"bytes,3,rep,name=authors,proto3" json:"authors,omitempty"` // License is the license of the plugin. License string `protobuf:"bytes,4,opt,name=license,proto3" json:"license,omitempty"` // ProjectURL is the project URL of the plugin. ProjectUrl string `protobuf:"bytes,5,opt,name=project_url,json=projectUrl,proto3" json:"project_url,omitempty"` // Config is the internal and external configuration of the plugin. Config map[string]string `` /* 153-byte string literal not displayed */ // Hooks is the list of hooks the plugin attaches to. Hooks []int32 `protobuf:"varint,7,rep,packed,name=hooks,proto3" json:"hooks,omitempty"` // Requires is the list of plugins the plugin depends on. Requires map[string]string `` /* 157-byte string literal not displayed */ // Tags is the list of tags of the plugin. Tags []string `protobuf:"bytes,9,rep,name=tags,proto3" json:"tags,omitempty"` // Categories is the list of categories of the plugin. Categories []string `protobuf:"bytes,10,rep,name=categories,proto3" json:"categories,omitempty"` // contains filtered or unexported fields }
PluginConfig is the configuration of the plugin.
func (*PluginConfig) Descriptor
deprecated
func (*PluginConfig) Descriptor() ([]byte, []int)
Deprecated: Use PluginConfig.ProtoReflect.Descriptor instead.
func (*PluginConfig) GetAuthors ¶
func (x *PluginConfig) GetAuthors() []string
func (*PluginConfig) GetCategories ¶
func (x *PluginConfig) GetCategories() []string
func (*PluginConfig) GetConfig ¶
func (x *PluginConfig) GetConfig() map[string]string
func (*PluginConfig) GetDescription ¶
func (x *PluginConfig) GetDescription() string
func (*PluginConfig) GetHooks ¶
func (x *PluginConfig) GetHooks() []int32
func (*PluginConfig) GetId ¶
func (x *PluginConfig) GetId() *PluginID
func (*PluginConfig) GetLicense ¶
func (x *PluginConfig) GetLicense() string
func (*PluginConfig) GetProjectUrl ¶
func (x *PluginConfig) GetProjectUrl() string
func (*PluginConfig) GetRequires ¶
func (x *PluginConfig) GetRequires() map[string]string
func (*PluginConfig) GetTags ¶
func (x *PluginConfig) GetTags() []string
func (*PluginConfig) ProtoMessage ¶
func (*PluginConfig) ProtoMessage()
func (*PluginConfig) ProtoReflect ¶
func (x *PluginConfig) ProtoReflect() protoreflect.Message
func (*PluginConfig) Reset ¶
func (x *PluginConfig) Reset()
func (*PluginConfig) String ¶
func (x *PluginConfig) String() string
type PluginConfigs ¶
type PluginConfigs struct { // Configs is the list of plugin configurations. Configs []*PluginConfig `protobuf:"bytes,1,rep,name=configs,proto3" json:"configs,omitempty"` // contains filtered or unexported fields }
PluginConfigs is the list of plugin configurations.
func (*PluginConfigs) Descriptor
deprecated
func (*PluginConfigs) Descriptor() ([]byte, []int)
Deprecated: Use PluginConfigs.ProtoReflect.Descriptor instead.
func (*PluginConfigs) GetConfigs ¶
func (x *PluginConfigs) GetConfigs() []*PluginConfig
func (*PluginConfigs) ProtoMessage ¶
func (*PluginConfigs) ProtoMessage()
func (*PluginConfigs) ProtoReflect ¶
func (x *PluginConfigs) ProtoReflect() protoreflect.Message
func (*PluginConfigs) Reset ¶
func (x *PluginConfigs) Reset()
func (*PluginConfigs) String ¶
func (x *PluginConfigs) String() string
type PluginID ¶
type PluginID struct { // Name is the name of the plugin. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Version is the version of the plugin. Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // RemoteURL is the remote URL of the plugin. RemoteUrl string `protobuf:"bytes,3,opt,name=remote_url,json=remoteUrl,proto3" json:"remote_url,omitempty"` // Checksum is the checksum of the plugin. Checksum string `protobuf:"bytes,4,opt,name=checksum,proto3" json:"checksum,omitempty"` // contains filtered or unexported fields }
PluginID is the identifier that uniquely identifies the plugin.
func (*PluginID) Descriptor
deprecated
func (*PluginID) GetChecksum ¶
func (*PluginID) GetRemoteUrl ¶
func (*PluginID) GetVersion ¶
func (*PluginID) ProtoMessage ¶
func (*PluginID) ProtoMessage()
func (*PluginID) ProtoReflect ¶
func (x *PluginID) ProtoReflect() protoreflect.Message
type UnimplementedGatewayDAdminAPIServiceServer ¶
type UnimplementedGatewayDAdminAPIServiceServer struct{}
UnimplementedGatewayDAdminAPIServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedGatewayDAdminAPIServiceServer) GetGlobalConfig ¶
func (UnimplementedGatewayDAdminAPIServiceServer) GetPluginConfig ¶
func (UnimplementedGatewayDAdminAPIServiceServer) GetPlugins ¶
func (UnimplementedGatewayDAdminAPIServiceServer) GetPlugins(context.Context, *emptypb.Empty) (*PluginConfigs, error)
func (UnimplementedGatewayDAdminAPIServiceServer) GetProxies ¶
func (UnimplementedGatewayDAdminAPIServiceServer) GetServers ¶
func (UnimplementedGatewayDAdminAPIServiceServer) Version ¶
func (UnimplementedGatewayDAdminAPIServiceServer) Version(context.Context, *emptypb.Empty) (*VersionResponse, error)
type UnsafeGatewayDAdminAPIServiceServer ¶
type UnsafeGatewayDAdminAPIServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGatewayDAdminAPIServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GatewayDAdminAPIServiceServer will result in compilation errors.
type VersionResponse ¶
type VersionResponse struct { // Version is the version of the GatewayD. Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // VersionInfo is the detailed version info of the GatewayD. VersionInfo string `protobuf:"bytes,2,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` // contains filtered or unexported fields }
VersionResponse is the response returned by the Version RPC.
func (*VersionResponse) Descriptor
deprecated
func (*VersionResponse) Descriptor() ([]byte, []int)
Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead.
func (*VersionResponse) GetVersion ¶
func (x *VersionResponse) GetVersion() string
func (*VersionResponse) GetVersionInfo ¶
func (x *VersionResponse) GetVersionInfo() string
func (*VersionResponse) ProtoMessage ¶
func (*VersionResponse) ProtoMessage()
func (*VersionResponse) ProtoReflect ¶
func (x *VersionResponse) ProtoReflect() protoreflect.Message
func (*VersionResponse) Reset ¶
func (x *VersionResponse) Reset()
func (*VersionResponse) String ¶
func (x *VersionResponse) String() string